Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Unified Diff: src/gpu/gl/GrGLProgramDesc.cpp

Issue 1575993003: Fix uninit texture key with odd number of textures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgramDesc.cpp
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp
index 032562550cec5d5541f5405f77fcb861e8b046ed..45e01e7c84c2b13a5170bce2e09edaa8e2e3482c 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;
+ }
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698