aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLProgram.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl/GrGLProgram.cpp')
-rw-r--r--src/gpu/gl/GrGLProgram.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index 3c3d852511..fcf00af552 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -971,3 +971,16 @@ GrGLProgramStage* GrGLProgram::GenStageCode(const GrCustomStage* stage,
return glStage;
}
+
+void GrGLProgram::setData(const GrDrawState& drawState) const {
+ for (int s = 0; s < GrDrawState::kNumStages; ++s) {
+ if (NULL != fProgramStage[s]) {
+ const GrSamplerState& sampler = drawState.getSampler(s);
+ GrAssert(NULL != sampler.getCustomStage());
+ fProgramStage[s]->setData(fUniformManager,
+ *sampler.getCustomStage(),
+ drawState.getRenderTarget(),
+ s);
+ }
+ }
+}