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 = true; // always available in Vulkan | 25 fNPOTTextureTileSupport = true; // always available in Vulkan |
26 fTwoSidedStencilSupport = true; // always available in Vulkan | 26 fTwoSidedStencilSupport = true; // always available in Vulkan |
27 fStencilWrapOpsSupport = true; // always available in Vulkan | 27 fStencilWrapOpsSupport = true; // always available in Vulkan |
28 fDiscardRenderTargetSupport = false; //TODO: figure this out | 28 fDiscardRenderTargetSupport = true; |
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; | 34 fUseDrawInsteadOfClear = false; |
35 | 35 |
36 fMapBufferFlags = kNone_MapFlags; //TODO: figure this out | 36 fMapBufferFlags = kNone_MapFlags; //TODO: figure this out |
37 fBufferMapThreshold = SK_MaxS32; //TODO: figure this out | 37 fBufferMapThreshold = SK_MaxS32; //TODO: figure this out |
38 | 38 |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 237 |
238 void GrVkCaps::ConfigInfo::init(const GrVkInterface* interface, | 238 void GrVkCaps::ConfigInfo::init(const GrVkInterface* interface, |
239 VkPhysicalDevice physDev, | 239 VkPhysicalDevice physDev, |
240 VkFormat format) { | 240 VkFormat format) { |
241 VkFormatProperties props; | 241 VkFormatProperties props; |
242 memset(&props, 0, sizeof(VkFormatProperties)); | 242 memset(&props, 0, sizeof(VkFormatProperties)); |
243 GR_VK_CALL(interface, GetPhysicalDeviceFormatProperties(physDev, format, &pr
ops)); | 243 GR_VK_CALL(interface, GetPhysicalDeviceFormatProperties(physDev, format, &pr
ops)); |
244 InitConfigFlags(props.linearTilingFeatures, &fLinearFlags); | 244 InitConfigFlags(props.linearTilingFeatures, &fLinearFlags); |
245 InitConfigFlags(props.optimalTilingFeatures, &fOptimalFlags); | 245 InitConfigFlags(props.optimalTilingFeatures, &fOptimalFlags); |
246 } | 246 } |
OLD | NEW |