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" |
11 #include "glsl/GrGLSLCaps.h" | 11 #include "glsl/GrGLSLCaps.h" |
12 #include "vk/GrVkInterface.h" | 12 #include "vk/GrVkInterface.h" |
13 #include "vk/GrVkBackendContext.h" | 13 #include "vk/GrVkBackendContext.h" |
14 | 14 |
15 GrVkCaps::GrVkCaps(const GrContextOptions& contextOptions, const GrVkInterface*
vkInterface, | 15 GrVkCaps::GrVkCaps(const GrContextOptions& contextOptions, const GrVkInterface*
vkInterface, |
16 VkPhysicalDevice physDev, uint32_t featureFlags, uint32_t ext
ensionFlags) | 16 VkPhysicalDevice physDev, uint32_t featureFlags, uint32_t ext
ensionFlags) |
17 : INHERITED(contextOptions) { | 17 : INHERITED(contextOptions) { |
18 fCanUseGLSLForShaderModule = false; | 18 fCanUseGLSLForShaderModule = false; |
19 | 19 |
20 /************************************************************************** | 20 /************************************************************************** |
21 * GrDrawTargetCaps fields | 21 * GrDrawTargetCaps fields |
22 **************************************************************************/ | 22 **************************************************************************/ |
23 fMipMapSupport = true; // always available in Vulkan | 23 fMipMapSupport = true; // always available in Vulkan |
24 fSRGBSupport = true; // always available in Vulkan | 24 fSRGBSupport = true; // always available in Vulkan |
25 fNPOTTextureTileSupport = false; //TODO: figure this out | 25 fNPOTTextureTileSupport = true; // always available in Vulkan |
26 fTwoSidedStencilSupport = true; // always available in Vulkan | 26 fTwoSidedStencilSupport = true; // always available in Vulkan |
27 fStencilWrapOpsSupport = false; //TODO: figure this out | 27 fStencilWrapOpsSupport = false; //TODO: figure this out |
28 fDiscardRenderTargetSupport = false; //TODO: figure this out | 28 fDiscardRenderTargetSupport = false; //TODO: figure this out |
29 fReuseScratchTextures = true; //TODO: figure this out | 29 fReuseScratchTextures = true; //TODO: figure this out |
30 fGpuTracingSupport = false; //TODO: figure this out | 30 fGpuTracingSupport = false; //TODO: figure this out |
31 fCompressedTexSubImageSupport = false; //TODO: figure this out | 31 fCompressedTexSubImageSupport = false; //TODO: figure this out |
32 fOversizedStencilSupport = false; //TODO: figure this out | 32 fOversizedStencilSupport = false; //TODO: figure this out |
33 | 33 |
34 fUseDrawInsteadOfClear = false; //TODO: figure this out | 34 fUseDrawInsteadOfClear = false; //TODO: figure this out |
35 | 35 |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 238 |
239 void GrVkCaps::ConfigInfo::init(const GrVkInterface* interface, | 239 void GrVkCaps::ConfigInfo::init(const GrVkInterface* interface, |
240 VkPhysicalDevice physDev, | 240 VkPhysicalDevice physDev, |
241 VkFormat format) { | 241 VkFormat format) { |
242 VkFormatProperties props; | 242 VkFormatProperties props; |
243 memset(&props, 0, sizeof(VkFormatProperties)); | 243 memset(&props, 0, sizeof(VkFormatProperties)); |
244 GR_VK_CALL(interface, GetPhysicalDeviceFormatProperties(physDev, format, &pr
ops)); | 244 GR_VK_CALL(interface, GetPhysicalDeviceFormatProperties(physDev, format, &pr
ops)); |
245 InitConfigFlags(props.linearTilingFeatures, &fLinearFlags); | 245 InitConfigFlags(props.linearTilingFeatures, &fLinearFlags); |
246 InitConfigFlags(props.optimalTilingFeatures, &fOptimalFlags); | 246 InitConfigFlags(props.optimalTilingFeatures, &fOptimalFlags); |
247 } | 247 } |
OLD | NEW |