OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "GrGLNvprProgramBuilder.h" | 8 #include "GrGLNvprProgramBuilder.h" |
9 #include "../GrGpuGL.h" | 9 #include "../GrGpuGL.h" |
10 | 10 |
11 #define GL_CALL(X) GR_GL_CALL(this->gpu()->glInterface(), X) | 11 #define GL_CALL(X) GR_GL_CALL(this->gpu()->glInterface(), X) |
12 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(this->gpu()->glInterface(), R, X) | 12 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(this->gpu()->glInterface(), R, X) |
13 | 13 |
14 GrGLNvprProgramBuilder::GrGLNvprProgramBuilder(GrGpuGL* gpu, | 14 GrGLNvprProgramBuilder::GrGLNvprProgramBuilder(GrGpuGL* gpu, |
15 const GrOptDrawState& optState) | 15 const GrOptDrawState& optState, |
16 : INHERITED(gpu, optState) | 16 const GrProgramDesc& desc) |
| 17 : INHERITED(gpu, optState, desc) |
17 , fSeparableVaryingInfos(kVarsPerBlock) { | 18 , fSeparableVaryingInfos(kVarsPerBlock) { |
18 } | 19 } |
19 | 20 |
20 void GrGLNvprProgramBuilder::emitTransforms(const GrPendingFragmentStage& proces
sorStage, | 21 void GrGLNvprProgramBuilder::emitTransforms(const GrPendingFragmentStage& proces
sorStage, |
21 GrGLProcessor::TransformedCoordsArra
y* outCoords, | 22 GrGLProcessor::TransformedCoordsArra
y* outCoords, |
22 GrGLInstalledFragProc* ifp) { | 23 GrGLInstalledFragProc* ifp) { |
23 const GrFragmentProcessor* effect = processorStage.getProcessor(); | 24 const GrFragmentProcessor* effect = processorStage.getProcessor(); |
24 int numTransforms = effect->numTransforms(); | 25 int numTransforms = effect->numTransforms(); |
25 | 26 |
26 ifp->fTransforms.push_back_n(numTransforms); | 27 ifp->fTransforms.push_back_n(numTransforms); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 } | 68 } |
68 } | 69 } |
69 | 70 |
70 GrGLProgram* GrGLNvprProgramBuilder::createProgram(GrGLuint programID) { | 71 GrGLProgram* GrGLNvprProgramBuilder::createProgram(GrGLuint programID) { |
71 // this is just for nvpr es, which has separable varyings that are plugged i
n after | 72 // this is just for nvpr es, which has separable varyings that are plugged i
n after |
72 // building | 73 // building |
73 this->resolveSeparableVaryings(programID); | 74 this->resolveSeparableVaryings(programID); |
74 return SkNEW_ARGS(GrGLNvprProgram, (fGpu, fDesc, fUniformHandles, programID,
fUniforms, | 75 return SkNEW_ARGS(GrGLNvprProgram, (fGpu, fDesc, fUniformHandles, programID,
fUniforms, |
75 fFragmentProcessors.get(), fSeparableVar
yingInfos)); | 76 fFragmentProcessors.get(), fSeparableVar
yingInfos)); |
76 } | 77 } |
OLD | NEW |