aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLProgramStage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl/GrGLProgramStage.cpp')
-rw-r--r--src/gpu/gl/GrGLProgramStage.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLProgramStage.cpp b/src/gpu/gl/GrGLProgramStage.cpp
index 12c3894131..b1a37fe374 100644
--- a/src/gpu/gl/GrGLProgramStage.cpp
+++ b/src/gpu/gl/GrGLProgramStage.cpp
@@ -27,3 +27,14 @@ void GrGLProgramStage::setData(const GrGLUniformManager&,
int stageNum) {
}
+GrGLProgramStage::StageKey GrGLProgramStage::GenTextureKey(const GrCustomStage& stage,
+ const GrGLCaps& caps) {
+ StageKey key = 0;
+ for (unsigned int index = 0; index < stage.numTextures(); ++index) {
+ if (stage.textureAccess(index)) {
+ key = (key << index) |
+ GrGLShaderBuilder::KeyForTextureAccess(*stage.textureAccess(index), caps);
+ }
+ }
+ return key;
+}