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

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

Issue 1856283003: Fix vulkan dual source blending (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.cpp » ('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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 fMapBufferFlags = kCanMap_MapFlag | kSubset_MapFlag; 120 fMapBufferFlags = kCanMap_MapFlag | kSubset_MapFlag;
121 121
122 fStencilWrapOpsSupport = true; 122 fStencilWrapOpsSupport = true;
123 fOversizedStencilSupport = true; 123 fOversizedStencilSupport = true;
124 fSampleShadingSupport = SkToBool(featureFlags & kSampleRateShading_GrVkFeatu reFlag); 124 fSampleShadingSupport = SkToBool(featureFlags & kSampleRateShading_GrVkFeatu reFlag);
125 } 125 }
126 126
127 void GrVkCaps::initGLSLCaps(const VkPhysicalDeviceProperties& properties, 127 void GrVkCaps::initGLSLCaps(const VkPhysicalDeviceProperties& properties,
128 uint32_t featureFlags) { 128 uint32_t featureFlags) {
129 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get()); 129 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get());
130 glslCaps->fVersionDeclString = "#version 310 es\n"; 130 glslCaps->fVersionDeclString = "#version 330\n";
131
131 132
132 // fConfigOutputSwizzle will default to RGBA so we only need to set it for a lpha only config. 133 // fConfigOutputSwizzle will default to RGBA so we only need to set it for a lpha only config.
133 for (int i = 0; i < kGrPixelConfigCnt; ++i) { 134 for (int i = 0; i < kGrPixelConfigCnt; ++i) {
134 GrPixelConfig config = static_cast<GrPixelConfig>(i); 135 GrPixelConfig config = static_cast<GrPixelConfig>(i);
135 if (GrPixelConfigIsAlphaOnly(config)) { 136 if (GrPixelConfigIsAlphaOnly(config)) {
136 glslCaps->fConfigTextureSwizzle[i] = GrSwizzle::RRRR(); 137 glslCaps->fConfigTextureSwizzle[i] = GrSwizzle::RRRR();
137 glslCaps->fConfigOutputSwizzle[i] = GrSwizzle::AAAA(); 138 glslCaps->fConfigOutputSwizzle[i] = GrSwizzle::AAAA();
138 } else { 139 } else {
139 glslCaps->fConfigTextureSwizzle[i] = GrSwizzle::RGBA(); 140 glslCaps->fConfigTextureSwizzle[i] = GrSwizzle::RGBA();
140 } 141 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 222
222 void GrVkCaps::ConfigInfo::init(const GrVkInterface* interface, 223 void GrVkCaps::ConfigInfo::init(const GrVkInterface* interface,
223 VkPhysicalDevice physDev, 224 VkPhysicalDevice physDev,
224 VkFormat format) { 225 VkFormat format) {
225 VkFormatProperties props; 226 VkFormatProperties props;
226 memset(&props, 0, sizeof(VkFormatProperties)); 227 memset(&props, 0, sizeof(VkFormatProperties));
227 GR_VK_CALL(interface, GetPhysicalDeviceFormatProperties(physDev, format, &pr ops)); 228 GR_VK_CALL(interface, GetPhysicalDeviceFormatProperties(physDev, format, &pr ops));
228 InitConfigFlags(props.linearTilingFeatures, &fLinearFlags); 229 InitConfigFlags(props.linearTilingFeatures, &fLinearFlags);
229 InitConfigFlags(props.optimalTilingFeatures, &fOptimalFlags); 230 InitConfigFlags(props.optimalTilingFeatures, &fOptimalFlags);
230 } 231 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/vk/GrVkPipelineStateBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698