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 #include "glsl/GrGLSLProgramBuilder.h" | 8 #include "glsl/GrGLSLProgramBuilder.h" |
9 | 9 |
10 #include "GrPipeline.h" | 10 #include "GrPipeline.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 processor.gatherCoordTransforms(&procCoords); | 62 processor.gatherCoordTransforms(&procCoords); |
63 } | 63 } |
64 } | 64 } |
65 | 65 |
66 this->emitAndInstallPrimProc(primProc, inputColor, inputCoverage); | 66 this->emitAndInstallPrimProc(primProc, inputColor, inputCoverage); |
67 | 67 |
68 int numProcs = this->pipeline().numFragmentProcessors(); | 68 int numProcs = this->pipeline().numFragmentProcessors(); |
69 this->emitAndInstallFragProcs(0, this->pipeline().numColorFragmentProcessors
(), inputColor); | 69 this->emitAndInstallFragProcs(0, this->pipeline().numColorFragmentProcessors
(), inputColor); |
70 this->emitAndInstallFragProcs(this->pipeline().numColorFragmentProcessors(),
numProcs, | 70 this->emitAndInstallFragProcs(this->pipeline().numColorFragmentProcessors(),
numProcs, |
71 inputCoverage); | 71 inputCoverage); |
72 if (primProc.getPixelLocalStorageState() != | 72 if (primProc.getPixelLocalStorageState() != |
73 GrPixelLocalStorageState::kDraw_GrPixelLocalStorageState) { | 73 GrPixelLocalStorageState::kDraw_GrPixelLocalStorageState) { |
74 this->emitAndInstallXferProc(this->pipeline().getXferProcessor(), *input
Color, | 74 this->emitAndInstallXferProc(this->pipeline().getXferProcessor(), *input
Color, |
75 *inputCoverage, this->pipeline().ignoresCov
erage(), | 75 *inputCoverage, this->pipeline().ignoresCov
erage(), |
76 primProc.getPixelLocalStorageState()); | 76 primProc.getPixelLocalStorageState()); |
77 this->emitFSOutputSwizzle(this->pipeline().getXferProcessor().hasSeconda
ryOutput()); | 77 this->emitFSOutputSwizzle(this->pipeline().getXferProcessor().hasSeconda
ryOutput()); |
78 } | 78 } |
79 | 79 |
80 return this->checkSamplerCounts(); | 80 return this->checkSamplerCounts(); |
81 } | 81 } |
82 | 82 |
83 void GrGLSLProgramBuilder::emitAndInstallPrimProc(const GrPrimitiveProcessor& pr
oc, | 83 void GrGLSLProgramBuilder::emitAndInstallPrimProc(const GrPrimitiveProcessor& pr
oc, |
84 GrGLSLExpr4* outputColor, | 84 GrGLSLExpr4* outputColor, |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 delete fFragmentProcessors[i]; | 363 delete fFragmentProcessors[i]; |
364 } | 364 } |
365 } | 365 } |
366 | 366 |
367 void GrGLSLProgramBuilder::finalizeShaders() { | 367 void GrGLSLProgramBuilder::finalizeShaders() { |
368 this->varyingHandler()->finalize(); | 368 this->varyingHandler()->finalize(); |
369 fVS.finalize(kVertex_GrShaderFlag); | 369 fVS.finalize(kVertex_GrShaderFlag); |
370 fFS.finalize(kFragment_GrShaderFlag); | 370 fFS.finalize(kFragment_GrShaderFlag); |
371 | 371 |
372 } | 372 } |
OLD | NEW |