| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 this->initSampleCount(properties); | 109 this->initSampleCount(properties); |
| 110 | 110 |
| 111 // Assuming since we will always map in the end to upload the data we might
as well just map | 111 // Assuming since we will always map in the end to upload the data we might
as well just map |
| 112 // from the get go. There is no hard data to suggest this is faster or slowe
r. | 112 // from the get go. There is no hard data to suggest this is faster or slowe
r. |
| 113 fGeometryBufferMapThreshold = 0; | 113 fGeometryBufferMapThreshold = 0; |
| 114 | 114 |
| 115 fMapBufferFlags = kCanMap_MapFlag | kSubset_MapFlag; | 115 fMapBufferFlags = kCanMap_MapFlag | kSubset_MapFlag; |
| 116 | 116 |
| 117 fStencilWrapOpsSupport = true; | 117 fStencilWrapOpsSupport = true; |
| 118 fOversizedStencilSupport = true; | 118 fOversizedStencilSupport = true; |
| 119 fSampleShadingSupport = SkToBool(featureFlags & kSampleRateShading_GrVkFeatu
reFlag); |
| 119 } | 120 } |
| 120 | 121 |
| 121 void GrVkCaps::initGLSLCaps(const VkPhysicalDeviceProperties& properties, | 122 void GrVkCaps::initGLSLCaps(const VkPhysicalDeviceProperties& properties, |
| 122 uint32_t featureFlags) { | 123 uint32_t featureFlags) { |
| 123 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get()); | 124 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get()); |
| 124 glslCaps->fVersionDeclString = "#version 310 es\n"; | 125 glslCaps->fVersionDeclString = "#version 310 es\n"; |
| 125 | 126 |
| 126 // fConfigOutputSwizzle will default to RGBA so we only need to set it for a
lpha only config. | 127 // fConfigOutputSwizzle will default to RGBA so we only need to set it for a
lpha only config. |
| 127 for (int i = 0; i < kGrPixelConfigCnt; ++i) { | 128 for (int i = 0; i < kGrPixelConfigCnt; ++i) { |
| 128 GrPixelConfig config = static_cast<GrPixelConfig>(i); | 129 GrPixelConfig config = static_cast<GrPixelConfig>(i); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 // internal Format stencil bits total bits
packed? | 270 // internal Format stencil bits total bits
packed? |
| 270 gS8 = { VK_FORMAT_S8_UINT, 8, 8,
false }, | 271 gS8 = { VK_FORMAT_S8_UINT, 8, 8,
false }, |
| 271 gD24S8 = { VK_FORMAT_D24_UNORM_S8_UINT, 8, 32,
true }; | 272 gD24S8 = { VK_FORMAT_D24_UNORM_S8_UINT, 8, 32,
true }; |
| 272 | 273 |
| 273 // I'm simply assuming that these two will be supported since they are used
in example code. | 274 // I'm simply assuming that these two will be supported since they are used
in example code. |
| 274 // TODO: Actaully figure this out | 275 // TODO: Actaully figure this out |
| 275 SET_CONFIG_CAN_STENCIL(gS8); | 276 SET_CONFIG_CAN_STENCIL(gS8); |
| 276 SET_CONFIG_CAN_STENCIL(gD24S8); | 277 SET_CONFIG_CAN_STENCIL(gD24S8); |
| 277 } | 278 } |
| 278 | 279 |
| OLD | NEW |