OLD | NEW |
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 #ifndef GrGLSLProgramBuilder_DEFINED | 8 #ifndef GrGLSLProgramBuilder_DEFINED |
9 #define GrGLSLProgramBuilder_DEFINED | 9 #define GrGLSLProgramBuilder_DEFINED |
10 | 10 |
11 #include "GrGeometryProcessor.h" | 11 #include "GrGeometryProcessor.h" |
12 #include "GrGpu.h" | 12 #include "GrGpu.h" |
13 #include "glsl/GrGLSLFragmentShaderBuilder.h" | 13 #include "glsl/GrGLSLFragmentShaderBuilder.h" |
14 #include "glsl/GrGLSLGeometryShaderBuilder.h" | 14 #include "glsl/GrGLSLGeometryShaderBuilder.h" |
15 #include "glsl/GrGLSLPrimitiveProcessor.h" | 15 #include "glsl/GrGLSLPrimitiveProcessor.h" |
16 #include "glsl/GrGLSLProgramDataManager.h" | 16 #include "glsl/GrGLSLProgramDataManager.h" |
17 #include "glsl/GrGLSLUniformHandler.h" | 17 #include "glsl/GrGLSLUniformHandler.h" |
18 #include "glsl/GrGLSLTextureSampler.h" | 18 #include "glsl/GrGLSLSampler.h" |
19 #include "glsl/GrGLSLVertexShaderBuilder.h" | 19 #include "glsl/GrGLSLVertexShaderBuilder.h" |
20 #include "glsl/GrGLSLXferProcessor.h" | 20 #include "glsl/GrGLSLXferProcessor.h" |
21 | 21 |
22 class GrGLSLCaps; | 22 class GrGLSLCaps; |
23 class GrGLSLShaderVar; | 23 class GrGLSLShaderVar; |
24 class GrGLSLVaryingHandler; | 24 class GrGLSLVaryingHandler; |
25 | 25 |
26 typedef SkSTArray<8, GrGLSLFragmentProcessor*, true> GrGLSLFragProcs; | 26 typedef SkSTArray<8, GrGLSLFragmentProcessor*, true> GrGLSLFragProcs; |
27 | 27 |
28 class GrGLSLProgramBuilder { | 28 class GrGLSLProgramBuilder { |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 void emitAndInstallFragProcs(int procOffset, int numProcs, GrGLSLExpr4* inOu
t); | 139 void emitAndInstallFragProcs(int procOffset, int numProcs, GrGLSLExpr4* inOu
t); |
140 void emitAndInstallFragProc(const GrFragmentProcessor&, | 140 void emitAndInstallFragProc(const GrFragmentProcessor&, |
141 int index, | 141 int index, |
142 const GrGLSLExpr4& input, | 142 const GrGLSLExpr4& input, |
143 GrGLSLExpr4* output); | 143 GrGLSLExpr4* output); |
144 void emitAndInstallXferProc(const GrXferProcessor&, | 144 void emitAndInstallXferProc(const GrXferProcessor&, |
145 const GrGLSLExpr4& colorIn, | 145 const GrGLSLExpr4& colorIn, |
146 const GrGLSLExpr4& coverageIn, | 146 const GrGLSLExpr4& coverageIn, |
147 bool ignoresCoverage, | 147 bool ignoresCoverage, |
148 GrPixelLocalStorageState plsState); | 148 GrPixelLocalStorageState plsState); |
149 void emitSamplers(const GrProcessor& processor, | 149 void emitSamplers(const GrProcessor& processor, GrGLSLSampler::SamplerArray*
outTexSamplers); |
150 GrGLSLTextureSampler::TextureSamplerArray* outSamplers); | |
151 void emitFSOutputSwizzle(bool hasSecondaryOutput); | 150 void emitFSOutputSwizzle(bool hasSecondaryOutput); |
152 bool checkSamplerCounts(); | 151 bool checkSamplerCounts(); |
153 | 152 |
154 #ifdef SK_DEBUG | 153 #ifdef SK_DEBUG |
155 void verify(const GrPrimitiveProcessor&); | 154 void verify(const GrPrimitiveProcessor&); |
156 void verify(const GrXferProcessor&); | 155 void verify(const GrXferProcessor&); |
157 void verify(const GrFragmentProcessor&); | 156 void verify(const GrFragmentProcessor&); |
158 #endif | 157 #endif |
159 | 158 |
160 GrGLSLPrimitiveProcessor::TransformsIn fCoordTransforms; | 159 GrGLSLPrimitiveProcessor::TransformsIn fCoordTransforms; |
161 GrGLSLPrimitiveProcessor::TransformsOut fOutCoords; | 160 GrGLSLPrimitiveProcessor::TransformsOut fOutCoords; |
162 int fNumVertexSamplers; | 161 int fNumVertexSamplers; |
163 int fNumGeometrySamplers; | 162 int fNumGeometrySamplers; |
164 int fNumFragmentSamplers; | 163 int fNumFragmentSamplers; |
165 }; | 164 }; |
166 | 165 |
167 #endif | 166 #endif |
OLD | NEW |