OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |