Commit 4fbec003 by Corentin Wallez

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/303391Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tryjob-Request: Corentin Wallez <cwallez@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 4e7196a1
...@@ -356,7 +356,7 @@ void ProgramGL::gatherUniformBlockInfo(std::vector<gl::UniformBlock> *uniformBlo ...@@ -356,7 +356,7 @@ void ProgramGL::gatherUniformBlockInfo(std::vector<gl::UniformBlock> *uniformBlo
GLuint uniformIndex = 0; GLuint uniformIndex = 0;
mFunctions->getUniformIndices(mProgramID, 1, &uniformName, &uniformIndex); 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 // 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 // TODO: Clean this up by using a class to wrap around the uniforms so manual removal is
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment