| 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 fMustDoCopiesFromOrigin = false; | 19 fMustDoCopiesFromOrigin = false; |
| 20 fAllowInitializationErrorOnTearDown = false; | 20 fAllowInitializationErrorOnTearDown = false; |
| 21 fSupportsCopiesAsDraws = false; |
| 21 | 22 |
| 22 /************************************************************************** | 23 /************************************************************************** |
| 23 * GrDrawTargetCaps fields | 24 * GrDrawTargetCaps fields |
| 24 **************************************************************************/ | 25 **************************************************************************/ |
| 25 fMipMapSupport = true; // always available in Vulkan | 26 fMipMapSupport = true; // always available in Vulkan |
| 26 fSRGBSupport = true; // always available in Vulkan | 27 fSRGBSupport = true; // always available in Vulkan |
| 27 fNPOTTextureTileSupport = true; // always available in Vulkan | 28 fNPOTTextureTileSupport = true; // always available in Vulkan |
| 28 fTwoSidedStencilSupport = true; // always available in Vulkan | 29 fTwoSidedStencilSupport = true; // always available in Vulkan |
| 29 fStencilWrapOpsSupport = true; // always available in Vulkan | 30 fStencilWrapOpsSupport = true; // always available in Vulkan |
| 30 fDiscardRenderTargetSupport = true; | 31 fDiscardRenderTargetSupport = true; |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 | 254 |
| 254 void GrVkCaps::ConfigInfo::init(const GrVkInterface* interface, | 255 void GrVkCaps::ConfigInfo::init(const GrVkInterface* interface, |
| 255 VkPhysicalDevice physDev, | 256 VkPhysicalDevice physDev, |
| 256 VkFormat format) { | 257 VkFormat format) { |
| 257 VkFormatProperties props; | 258 VkFormatProperties props; |
| 258 memset(&props, 0, sizeof(VkFormatProperties)); | 259 memset(&props, 0, sizeof(VkFormatProperties)); |
| 259 GR_VK_CALL(interface, GetPhysicalDeviceFormatProperties(physDev, format, &pr
ops)); | 260 GR_VK_CALL(interface, GetPhysicalDeviceFormatProperties(physDev, format, &pr
ops)); |
| 260 InitConfigFlags(props.linearTilingFeatures, &fLinearFlags); | 261 InitConfigFlags(props.linearTilingFeatures, &fLinearFlags); |
| 261 InitConfigFlags(props.optimalTilingFeatures, &fOptimalFlags); | 262 InitConfigFlags(props.optimalTilingFeatures, &fOptimalFlags); |
| 262 } | 263 } |
| OLD | NEW |