Refactor data conversions for state commands
This mainly enforces the rules as descripted in ES 3.10, section
2.2.1 and 2.2.2, by enhancing the "queryconversions" to support
more rules, removing the scattered type convertors in "utilities"
, "mathutil" and "queryutils", and forcing to only use the
convertors in "queryconversions".
BUG=angleproject:2165
Change-Id: I73c1dc850e2b3b8a479ece1d9c5eb7ae4ce851fe
Reviewed-on: https://chromium-review.googlesource.com/680094
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 9c3c55d..f653245 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -118,7 +118,7 @@
gl::Error error = query->isResultAvailable(&available);
if (!error.isError())
{
- *params = gl::ConvertFromGLboolean<T>(available);
+ *params = gl::CastFromStateValue<T>(pname, static_cast<GLuint>(available));
}
return error;
}