commit | 65859ec6ac3b9ab5bc3d2b60243d64f88189f53f | [log] [tgz] |
---|---|---|
author | bsalomon <bsalomon@google.com> | Mon Jan 11 09:17:52 2016 -0800 |
committer | Commit bot <commit-bot@chromium.org> | Mon Jan 11 09:17:52 2016 -0800 |
tree | bc7ab7f58387340861388d34b50169adb706d0da | |
parent | 6f0ff91c6561549a1ea8de3e8896b80a584c45b9 [diff] [blame] |
Fix uninit texture key with odd number of textures GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1575993003 Review URL: https://codereview.chromium.org/1575993003
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp index 0325625..45e01e7 100644 --- a/src/gpu/gl/GrGLProgramDesc.cpp +++ b/src/gpu/gl/GrGLProgramDesc.cpp
@@ -30,6 +30,10 @@ 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; + } } /**