| 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 #ifndef GrVkCaps_DEFINED | 8 #ifndef GrVkCaps_DEFINED |
| 9 #define GrVkCaps_DEFINED | 9 #define GrVkCaps_DEFINED |
| 10 | 10 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 int maxSampledTextures() const { | 74 int maxSampledTextures() const { |
| 75 return fMaxSampledTextures; | 75 return fMaxSampledTextures; |
| 76 } | 76 } |
| 77 | 77 |
| 78 | 78 |
| 79 GrGLSLCaps* glslCaps() const { return reinterpret_cast<GrGLSLCaps*>(fShaderC
aps.get()); } | 79 GrGLSLCaps* glslCaps() const { return reinterpret_cast<GrGLSLCaps*>(fShaderC
aps.get()); } |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 void init(const GrContextOptions& contextOptions, const GrVkInterface* vkInt
erface, | 82 void init(const GrContextOptions& contextOptions, const GrVkInterface* vkInt
erface, |
| 83 VkPhysicalDevice device); | 83 VkPhysicalDevice device); |
| 84 void initGrCaps(const VkPhysicalDeviceProperties&, |
| 85 const VkPhysicalDeviceFeatures&, |
| 86 const VkPhysicalDeviceMemoryProperties&); |
| 87 void initGLSLCaps(const VkPhysicalDeviceFeatures& features); |
| 84 void initSampleCount(const VkPhysicalDeviceProperties& properties); | 88 void initSampleCount(const VkPhysicalDeviceProperties& properties); |
| 85 void initGLSLCaps(const GrVkInterface* interface, VkPhysicalDevice physDev); | |
| 86 void initConfigRenderableTable(const GrVkInterface* interface, VkPhysicalDev
ice physDev); | 89 void initConfigRenderableTable(const GrVkInterface* interface, VkPhysicalDev
ice physDev); |
| 87 void initConfigTexturableTable(const GrVkInterface* interface, VkPhysicalDev
ice physDev); | 90 void initConfigTexturableTable(const GrVkInterface* interface, VkPhysicalDev
ice physDev); |
| 88 void initStencilFormats(const GrVkInterface* interface, VkPhysicalDevice phy
sDev); | 91 void initStencilFormats(const GrVkInterface* interface, VkPhysicalDevice phy
sDev); |
| 89 | 92 |
| 90 | 93 |
| 91 bool fConfigTextureSupport[kGrPixelConfigCnt]; | 94 bool fConfigTextureSupport[kGrPixelConfigCnt]; |
| 92 // For Vulkan we track whether a config is supported linearly (without need
for swizzling) | 95 // For Vulkan we track whether a config is supported linearly (without need
for swizzling) |
| 93 bool fConfigLinearTextureSupport[kGrPixelConfigCnt]; | 96 bool fConfigLinearTextureSupport[kGrPixelConfigCnt]; |
| 94 | 97 |
| 95 // The first entry for each config is without msaa and the second is with. | 98 // The first entry for each config is without msaa and the second is with. |
| 96 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; | 99 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; |
| 97 // The first entry for each config is without msaa and the second is with. | 100 // The first entry for each config is without msaa and the second is with. |
| 98 bool fConfigLinearRenderSupport[kGrPixelConfigCnt][2]; | 101 bool fConfigLinearRenderSupport[kGrPixelConfigCnt][2]; |
| 99 | 102 |
| 100 SkTArray<StencilFormat, true> fLinearStencilFormats; | 103 SkTArray<StencilFormat, true> fLinearStencilFormats; |
| 101 SkTArray<StencilFormat, true> fStencilFormats; | 104 SkTArray<StencilFormat, true> fStencilFormats; |
| 102 | 105 |
| 103 int fMaxSampledTextures; | 106 int fMaxSampledTextures; |
| 104 | 107 |
| 105 typedef GrCaps INHERITED; | 108 typedef GrCaps INHERITED; |
| 106 }; | 109 }; |
| 107 | 110 |
| 108 #endif | 111 #endif |
| OLD | NEW |