Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: src/gpu/vk/GrVkCaps.cpp

Issue 1837213003: Enable dual source blending for Vulkan (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/gpu/vk/GrVkPipelineStateBuilder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 VkPhysicalDeviceMemoryProperties memoryProperties; 55 VkPhysicalDeviceMemoryProperties memoryProperties;
56 GR_VK_CALL(vkInterface, GetPhysicalDeviceMemoryProperties(physDev, &memoryPr operties)); 56 GR_VK_CALL(vkInterface, GetPhysicalDeviceMemoryProperties(physDev, &memoryPr operties));
57 57
58 this->initGrCaps(properties, memoryProperties, featureFlags); 58 this->initGrCaps(properties, memoryProperties, featureFlags);
59 this->initGLSLCaps(properties, featureFlags); 59 this->initGLSLCaps(properties, featureFlags);
60 this->initConfigTexturableTable(vkInterface, physDev); 60 this->initConfigTexturableTable(vkInterface, physDev);
61 this->initConfigRenderableTable(vkInterface, physDev); 61 this->initConfigRenderableTable(vkInterface, physDev);
62 this->initStencilFormats(vkInterface, physDev); 62 this->initStencilFormats(vkInterface, physDev);
63 63
64 if (SkToBool(extensionFlags & kNV_glsl_shader_GrVkExtensionFlag)) { 64 if (SkToBool(extensionFlags & kNV_glsl_shader_GrVkExtensionFlag)) {
65 fCanUseGLSLForShaderModule = true; 65 // Currently disabling this feature since it does not play well with val idation layers which
66 // expect a SPIR-V shader
67 // fCanUseGLSLForShaderModule = true;
66 } 68 }
67 69
68 this->applyOptionsOverrides(contextOptions); 70 this->applyOptionsOverrides(contextOptions);
69 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get()); 71 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get());
70 glslCaps->applyOptionsOverrides(contextOptions); 72 glslCaps->applyOptionsOverrides(contextOptions);
71 } 73 }
72 74
73 int get_max_sample_count(VkSampleCountFlags flags) { 75 int get_max_sample_count(VkSampleCountFlags flags) {
74 SkASSERT(flags & VK_SAMPLE_COUNT_1_BIT); 76 SkASSERT(flags & VK_SAMPLE_COUNT_1_BIT);
75 if (!(flags & VK_SAMPLE_COUNT_2_BIT)) { 77 if (!(flags & VK_SAMPLE_COUNT_2_BIT)) {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } 142 }
141 143
142 // Vulkan is based off ES 3.0 so the following should all be supported 144 // Vulkan is based off ES 3.0 so the following should all be supported
143 glslCaps->fUsesPrecisionModifiers = true; 145 glslCaps->fUsesPrecisionModifiers = true;
144 glslCaps->fFlatInterpolationSupport = true; 146 glslCaps->fFlatInterpolationSupport = true;
145 147
146 // GrShaderCaps 148 // GrShaderCaps
147 149
148 glslCaps->fShaderDerivativeSupport = true; 150 glslCaps->fShaderDerivativeSupport = true;
149 glslCaps->fGeometryShaderSupport = SkToBool(featureFlags & kGeometryShader_G rVkFeatureFlag); 151 glslCaps->fGeometryShaderSupport = SkToBool(featureFlags & kGeometryShader_G rVkFeatureFlag);
150 #if 0 152
151 // For now disabling dual source blending till we get it hooked up in the re st of system
152 glslCaps->fDualSourceBlendingSupport = SkToBool(featureFlags & kDualSrcBlend _GrVkFeatureFlag); 153 glslCaps->fDualSourceBlendingSupport = SkToBool(featureFlags & kDualSrcBlend _GrVkFeatureFlag);
153 #endif 154
154 glslCaps->fIntegerSupport = true; 155 glslCaps->fIntegerSupport = true;
155 156
156 glslCaps->fMaxVertexSamplers = 157 glslCaps->fMaxVertexSamplers =
157 glslCaps->fMaxGeometrySamplers = 158 glslCaps->fMaxGeometrySamplers =
158 glslCaps->fMaxFragmentSamplers = SkTMin(properties.limits.maxPerStageDescrip torSampledImages, 159 glslCaps->fMaxFragmentSamplers = SkTMin(properties.limits.maxPerStageDescrip torSampledImages,
159 properties.limits.maxPerStageDescrip torSamplers); 160 properties.limits.maxPerStageDescrip torSamplers);
160 glslCaps->fMaxCombinedSamplers = SkTMin(properties.limits.maxDescriptorSetSa mpledImages, 161 glslCaps->fMaxCombinedSamplers = SkTMin(properties.limits.maxDescriptorSetSa mpledImages,
161 properties.limits.maxDescriptorSetSa mplers); 162 properties.limits.maxDescriptorSetSa mplers);
162 } 163 }
163 164
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // internal Format stencil bits total bits packed? 275 // internal Format stencil bits total bits packed?
275 gS8 = { VK_FORMAT_S8_UINT, 8, 8, false }, 276 gS8 = { VK_FORMAT_S8_UINT, 8, 8, false },
276 gD24S8 = { VK_FORMAT_D24_UNORM_S8_UINT, 8, 32, true }; 277 gD24S8 = { VK_FORMAT_D24_UNORM_S8_UINT, 8, 32, true };
277 278
278 // I'm simply assuming that these two will be supported since they are used in example code. 279 // I'm simply assuming that these two will be supported since they are used in example code.
279 // TODO: Actaully figure this out 280 // TODO: Actaully figure this out
280 SET_CONFIG_CAN_STENCIL(gS8); 281 SET_CONFIG_CAN_STENCIL(gS8);
281 SET_CONFIG_CAN_STENCIL(gD24S8); 282 SET_CONFIG_CAN_STENCIL(gD24S8);
282 } 283 }
283 284
OLDNEW
« no previous file with comments | « no previous file | src/gpu/vk/GrVkPipelineStateBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698