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/GrVkDescriptorSetManager.h" | 10 #include "vk/GrVkDescriptorSetManager.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 } | 51 } |
52 | 52 |
53 void GrVkPipelineStateBuilder::finalizeFragmentOutputColor(GrGLSLShaderVar& outp
utColor) { | 53 void GrVkPipelineStateBuilder::finalizeFragmentOutputColor(GrGLSLShaderVar& outp
utColor) { |
54 outputColor.setLayoutQualifier("location = 0, index = 0"); | 54 outputColor.setLayoutQualifier("location = 0, index = 0"); |
55 } | 55 } |
56 | 56 |
57 void GrVkPipelineStateBuilder::finalizeFragmentSecondaryColor(GrGLSLShaderVar& o
utputColor) { | 57 void GrVkPipelineStateBuilder::finalizeFragmentSecondaryColor(GrGLSLShaderVar& o
utputColor) { |
58 outputColor.setLayoutQualifier("location = 0, index = 1"); | 58 outputColor.setLayoutQualifier("location = 0, index = 1"); |
59 } | 59 } |
60 | 60 |
61 | |
62 bool GrVkPipelineStateBuilder::CreateVkShaderModule(const GrVkGpu* gpu, | 61 bool GrVkPipelineStateBuilder::CreateVkShaderModule(const GrVkGpu* gpu, |
63 VkShaderStageFlagBits stage, | 62 VkShaderStageFlagBits stage, |
64 const GrGLSLShaderBuilder& b
uilder, | 63 const GrGLSLShaderBuilder& b
uilder, |
65 VkShaderModule* shaderModule
, | 64 VkShaderModule* shaderModule
, |
66 VkPipelineShaderStageCreateI
nfo* stageInfo) { | 65 VkPipelineShaderStageCreateI
nfo* stageInfo) { |
67 SkString shaderString; | 66 SkString shaderString; |
68 for (int i = 0; i < builder.fCompilerStrings.count(); ++i) { | 67 for (int i = 0; i < builder.fCompilerStrings.count(); ++i) { |
69 if (builder.fCompilerStrings[i]) { | 68 if (builder.fCompilerStrings[i]) { |
70 shaderString.append(builder.fCompilerStrings[i]); | 69 shaderString.append(builder.fCompilerStrings[i]); |
71 shaderString.append("\n"); | 70 shaderString.append("\n"); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 fUniformHandles, | 160 fUniformHandles, |
162 fUniformHandler.fUniforms, | 161 fUniformHandler.fUniforms, |
163 fUniformHandler.fCurrentVertexUBOOffset, | 162 fUniformHandler.fCurrentVertexUBOOffset, |
164 fUniformHandler.fCurrentFragmentUBOOffset, | 163 fUniformHandler.fCurrentFragmentUBOOffset, |
165 (uint32_t)fUniformHandler.numSamplers(), | 164 (uint32_t)fUniformHandler.numSamplers(), |
166 fGeometryProcessor, | 165 fGeometryProcessor, |
167 fXferProcessor, | 166 fXferProcessor, |
168 fFragmentProcessors); | 167 fFragmentProcessors); |
169 } | 168 } |
170 | 169 |
OLD | NEW |