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

Side by Side Diff: src/gpu/vk/GrVkPipelineStateBuilder.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 | « src/gpu/vk/GrVkPipelineStateBuilder.h ('k') | no next file » | 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 2016 Google Inc. 2 * Copyright 2016 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 "vk/GrVkPipelineStateBuilder.h" 8 #include "vk/GrVkPipelineStateBuilder.h"
9 9
10 #include "vk/GrVkGpu.h" 10 #include "vk/GrVkGpu.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 return fGpu->caps(); 46 return fGpu->caps();
47 } 47 }
48 const GrGLSLCaps* GrVkPipelineStateBuilder::glslCaps() const { 48 const GrGLSLCaps* GrVkPipelineStateBuilder::glslCaps() const {
49 return fGpu->vkCaps().glslCaps(); 49 return fGpu->vkCaps().glslCaps();
50 } 50 }
51 51
52 void GrVkPipelineStateBuilder::finalizeFragmentOutputColor(GrGLSLShaderVar& outp utColor) { 52 void GrVkPipelineStateBuilder::finalizeFragmentOutputColor(GrGLSLShaderVar& outp utColor) {
53 outputColor.setLayoutQualifier("location = 0"); 53 outputColor.setLayoutQualifier("location = 0");
54 } 54 }
55 55
56 void GrVkPipelineStateBuilder::finalizeFragmentSecondaryColor(GrGLSLShaderVar& o utputColor) {
57 outputColor.setLayoutQualifier("location = 1");
58 }
59
56 VkShaderStageFlags visibility_to_vk_stage_flags(uint32_t visibility) { 60 VkShaderStageFlags visibility_to_vk_stage_flags(uint32_t visibility) {
57 VkShaderStageFlags flags = 0; 61 VkShaderStageFlags flags = 0;
58 62
59 if (visibility & kVertex_GrShaderFlag) { 63 if (visibility & kVertex_GrShaderFlag) {
60 flags |= VK_SHADER_STAGE_VERTEX_BIT; 64 flags |= VK_SHADER_STAGE_VERTEX_BIT;
61 } 65 }
62 if (visibility & kGeometry_GrShaderFlag) { 66 if (visibility & kGeometry_GrShaderFlag) {
63 flags |= VK_SHADER_STAGE_GEOMETRY_BIT; 67 flags |= VK_SHADER_STAGE_GEOMETRY_BIT;
64 } 68 }
65 if (visibility & kFragment_GrShaderFlag) { 69 if (visibility & kFragment_GrShaderFlag) {
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 dsLayout, 295 dsLayout,
292 fUniformHandles, 296 fUniformHandles,
293 fUniformHandler.fUniforms, 297 fUniformHandler.fUniforms,
294 fUniformHandler.fCurrentVertexUBOOffset, 298 fUniformHandler.fCurrentVertexUBOOffset,
295 fUniformHandler.fCurrentFragmentUBOOffset, 299 fUniformHandler.fCurrentFragmentUBOOffset,
296 numSamplers, 300 numSamplers,
297 fGeometryProcessor, 301 fGeometryProcessor,
298 fXferProcessor, 302 fXferProcessor,
299 fFragmentProcessors); 303 fFragmentProcessors);
300 } 304 }
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkPipelineStateBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698