OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrVkCaps.h" | 8 #include "GrVkCaps.h" |
9 | 9 |
10 #include "GrVkUtil.h" | 10 #include "GrVkUtil.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 VkSampleCountFlags colorSamples = properties.limits.framebufferColorSampleCo
unts; | 95 VkSampleCountFlags colorSamples = properties.limits.framebufferColorSampleCo
unts; |
96 VkSampleCountFlags stencilSamples = properties.limits.framebufferStencilSamp
leCounts; | 96 VkSampleCountFlags stencilSamples = properties.limits.framebufferStencilSamp
leCounts; |
97 | 97 |
98 fMaxColorSampleCount = get_max_sample_count(colorSamples); | 98 fMaxColorSampleCount = get_max_sample_count(colorSamples); |
99 fMaxStencilSampleCount = get_max_sample_count(stencilSamples); | 99 fMaxStencilSampleCount = get_max_sample_count(stencilSamples); |
100 } | 100 } |
101 | 101 |
102 void GrVkCaps::initGrCaps(const VkPhysicalDeviceProperties& properties, | 102 void GrVkCaps::initGrCaps(const VkPhysicalDeviceProperties& properties, |
103 const VkPhysicalDeviceFeatures& features, | 103 const VkPhysicalDeviceFeatures& features, |
104 const VkPhysicalDeviceMemoryProperties& memoryProperit
es) { | 104 const VkPhysicalDeviceMemoryProperties& memoryProperit
es) { |
| 105 fMaxVertexAttributes = properties.limits.maxVertexInputAttributes; |
105 // We could actually query and get a max size for each config, however maxIm
ageDimension2D will | 106 // We could actually query and get a max size for each config, however maxIm
ageDimension2D will |
106 // give the minimum max size across all configs. So for simplicity we will u
se that for now. | 107 // give the minimum max size across all configs. So for simplicity we will u
se that for now. |
107 fMaxRenderTargetSize = properties.limits.maxImageDimension2D; | 108 fMaxRenderTargetSize = properties.limits.maxImageDimension2D; |
108 fMaxTextureSize = properties.limits.maxImageDimension2D; | 109 fMaxTextureSize = properties.limits.maxImageDimension2D; |
109 | 110 |
110 this->initSampleCount(properties); | 111 this->initSampleCount(properties); |
111 | 112 |
112 // Assuming since we will always map in the end to upload the data we might
as well just map | 113 // Assuming since we will always map in the end to upload the data we might
as well just map |
113 // from the get go. There is no hard data to suggest this is faster or slowe
r. | 114 // from the get go. There is no hard data to suggest this is faster or slowe
r. |
114 fGeometryBufferMapThreshold = 0; | 115 fGeometryBufferMapThreshold = 0; |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 // internal Format stencil bits total bits
packed? | 271 // internal Format stencil bits total bits
packed? |
271 gS8 = { VK_FORMAT_S8_UINT, 8, 8,
false }, | 272 gS8 = { VK_FORMAT_S8_UINT, 8, 8,
false }, |
272 gD24S8 = { VK_FORMAT_D24_UNORM_S8_UINT, 8, 32,
true }; | 273 gD24S8 = { VK_FORMAT_D24_UNORM_S8_UINT, 8, 32,
true }; |
273 | 274 |
274 // I'm simply assuming that these two will be supported since they are used
in example code. | 275 // I'm simply assuming that these two will be supported since they are used
in example code. |
275 // TODO: Actaully figure this out | 276 // TODO: Actaully figure this out |
276 SET_CONFIG_CAN_STENCIL(gS8); | 277 SET_CONFIG_CAN_STENCIL(gS8); |
277 SET_CONFIG_CAN_STENCIL(gD24S8); | 278 SET_CONFIG_CAN_STENCIL(gD24S8); |
278 } | 279 } |
279 | 280 |
OLD | NEW |