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>
This commit is contained in:
Tapani Pälli 2019-11-12 13:43:21 +02:00
parent 1a093a06d6
commit 66d24a9ef7
1 changed files with 14 additions and 4 deletions

View File

@ -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) {