aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-01-11 09:17:52 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-11 09:17:52 -0800
commit65859ec6ac3b9ab5bc3d2b60243d64f88189f53f (patch)
treebc7ab7f58387340861388d34b50169adb706d0da /src/gpu/gl
parent6f0ff91c6561549a1ea8de3e8896b80a584c45b9 (diff)
Fix uninit texture key with odd number of textures
Diffstat (limited to 'src/gpu/gl')
-rw-r--r--src/gpu/gl/GrGLProgramDesc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp
index 032562550c..45e01e7c84 100644
--- a/src/gpu/gl/GrGLProgramDesc.cpp
+++ b/src/gpu/gl/GrGLProgramDesc.cpp
@@ -30,6 +30,10 @@ static void add_texture_key(GrProcessorKeyBuilder* b, const GrProcessor& proc,
k16[i] = caps.configTextureSwizzle(access.getTexture()->config()).asKey() |
(isExternal ? 0xFF00 : 0x0000);
}
+ // zero the last 16 bits if the number of textures is odd.
+ if (numTextures & 0x1) {
+ k16[numTextures] = 0;
+ }
}
/**