Check for GL_INVALID_INDEX instead of -1 for GetUniformIndices
While they have the same bit representation, the variable was unsigned
so the comparison would always fail, which triggered a compilation
warning.
BUG=
Change-Id: Idbbdb942b71d59f95e65c072dbbfdf31d14eda05
Reviewed-on: https://chromium-review.googlesource.com/303391
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/renderer/gl/ProgramGL.cpp b/src/libANGLE/renderer/gl/ProgramGL.cpp
index 55194b1..b05d7f5 100644
--- a/src/libANGLE/renderer/gl/ProgramGL.cpp
+++ b/src/libANGLE/renderer/gl/ProgramGL.cpp
@@ -356,7 +356,7 @@
GLuint uniformIndex = 0;
mFunctions->getUniformIndices(mProgramID, 1, &uniformName, &uniformIndex);
- if (uniformIndex == -1)
+ if (uniformIndex == GL_INVALID_INDEX)
{
// Uniform member has been optimized out, remove it from the list
// TODO: Clean this up by using a class to wrap around the uniforms so manual removal is