diff options
author | 2016-01-11 09:17:52 -0800 | |
---|---|---|
committer | 2016-01-11 09:17:52 -0800 | |
commit | 65859ec6ac3b9ab5bc3d2b60243d64f88189f53f (patch) | |
tree | bc7ab7f58387340861388d34b50169adb706d0da /src/gpu/gl | |
parent | 6f0ff91c6561549a1ea8de3e8896b80a584c45b9 (diff) |
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
Diffstat (limited to 'src/gpu/gl')
-rw-r--r-- | src/gpu/gl/GrGLProgramDesc.cpp | 4 |
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; + } } /** |