summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2019-11-12 13:43:21 +0200
committerMarge Bot <eric+marge@anholt.net>2020-02-05 16:57:21 +0000
commit03b457e0f2d49ac9f33fa8cd041834599c547412 (patch)
tree45c7d0d78bdae1524bcb87b97f81955e7226e188
parenta3e4b96ea6dce86a66023202a709031b424052d7 (diff)
downloadmesa-03b457e0f2d49ac9f33fa8cd041834599c547412.tar.gz
mesa: allow bit queries for EXT_disjoint_timer_query
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2090 Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3707> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3707>
-rw-r--r--src/mesa/main/queryobj.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index b2740c5ea75..981ccf8f9c0 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -663,11 +663,21 @@ _mesa_GetQueryIndexediv(GLenum target, GLuint index, GLenum pname,
* <pname> is not CURRENT_QUERY_EXT."
*
* Same rule is present also in ES 3.2 spec.
+ *
+ * EXT_disjoint_timer_query extends this with GL_QUERY_COUNTER_BITS.
*/
- if (_mesa_is_gles(ctx) && pname != GL_CURRENT_QUERY) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryivEXT(%s)",
- _mesa_enum_to_string(pname));
- return;
+ if (_mesa_is_gles(ctx)) {
+ switch (pname) {
+ case GL_CURRENT_QUERY:
+ break;
+ case GL_QUERY_COUNTER_BITS:
+ if (_mesa_has_EXT_disjoint_timer_query(ctx))
+ break;
+ /* fallthrough */
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryivEXT(%s)",
+ _mesa_enum_to_string(pname));
+ }
}
if (target == GL_TIMESTAMP) {