Make conversion from GL types to native bools consistant.
Some places would compare with "== GL_TRUE" and others with "!= GL_FALSE".
This behaviour is not in the OpenGL spec but "!= GL_FALSE" is the most
standard and follows the same rules as C and C++.
Remove un-necessary validation that params are either GL_TRUE or
GL_FALSE.
Update some internal storage from GLboolean to bool.
BUG=angleproject:2258
Change-Id: I12adbe2d24318a206521ca6ad1099ee7e2bf677e
Reviewed-on: https://chromium-review.googlesource.com/779799
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/renderer/gl/ProgramGL.cpp b/src/libANGLE/renderer/gl/ProgramGL.cpp
index 26dcae5..16455de 100644
--- a/src/libANGLE/renderer/gl/ProgramGL.cpp
+++ b/src/libANGLE/renderer/gl/ProgramGL.cpp
@@ -16,6 +16,7 @@
#include "libANGLE/Context.h"
#include "libANGLE/ProgramLinkedResources.h"
#include "libANGLE/Uniform.h"
+#include "libANGLE/queryconversions.h"
#include "libANGLE/renderer/gl/ContextGL.h"
#include "libANGLE/renderer/gl/FunctionsGL.h"
#include "libANGLE/renderer/gl/ShaderGL.h"
@@ -576,7 +577,7 @@
GLint isRowMajorMatrix = 0;
mFunctions->getActiveUniformsiv(mProgramID, 1, &uniformIndex, GL_UNIFORM_IS_ROW_MAJOR,
&isRowMajorMatrix);
- memberInfoOut->isRowMajorMatrix = isRowMajorMatrix != GL_FALSE;
+ memberInfoOut->isRowMajorMatrix = gl::ConvertToBool(isRowMajorMatrix);
return true;
}