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 = false; //TODO: figure this out | 23 fMipMapSupport = true; // always available in Vulkan |
24 fNPOTTextureTileSupport = false; //TODO: figure this out | 24 fNPOTTextureTileSupport = false; //TODO: figure this out |
25 fTwoSidedStencilSupport = false; //TODO: figure this out | 25 fTwoSidedStencilSupport = false; //TODO: figure this out |
26 fStencilWrapOpsSupport = false; //TODO: figure this out | 26 fStencilWrapOpsSupport = false; //TODO: figure this out |
27 fDiscardRenderTargetSupport = false; //TODO: figure this out | 27 fDiscardRenderTargetSupport = false; //TODO: figure this out |
28 fReuseScratchTextures = true; //TODO: figure this out | 28 fReuseScratchTextures = true; //TODO: figure this out |
29 fGpuTracingSupport = false; //TODO: figure this out | 29 fGpuTracingSupport = false; //TODO: figure this out |
30 fCompressedTexSubImageSupport = false; //TODO: figure this out | 30 fCompressedTexSubImageSupport = false; //TODO: figure this out |
31 fOversizedStencilSupport = false; //TODO: figure this out | 31 fOversizedStencilSupport = false; //TODO: figure this out |
32 | 32 |
33 fUseDrawInsteadOfClear = false; //TODO: figure this out | 33 fUseDrawInsteadOfClear = false; //TODO: figure this out |
(...skipping 203 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 |