[Mesa-dev] [PATCH] main/queryobj: add GL_QUERY_TARGET support to GetQueryObjectiv()

Ilia Mirkin imirkin at alum.mit.edu
Mon May 4 07:15:14 PDT 2015


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

On Mon, May 4, 2015 at 10:06 AM, Martin Peres
<martin.peres at linux.intel.com> wrote:
> This was missing from my patchset to support the query-related entry
> points of Direct State Access.
>
> Reported-by: Ilia Mirkin <imirkin at alum.mit.edu>
> Signed-off-by: Martin Peres <martin.peres at linux.intel.com>
> ---
>  src/mesa/main/queryobj.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
> index fbccf3f..5ff1b95 100644
> --- a/src/mesa/main/queryobj.c
> +++ b/src/mesa/main/queryobj.c
> @@ -776,6 +776,9 @@ _mesa_GetQueryObjectiv(GLuint id, GLenum pname, GLint *params)
>              ctx->Driver.CheckQuery( ctx, q );
>           *params = q->Ready;
>           break;
> +      case GL_QUERY_TARGET:
> +         *params = q->Target;
> +         break;
>        default:
>           _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryObjectivARB(pname)");
>           return;
> @@ -827,6 +830,9 @@ _mesa_GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
>              ctx->Driver.CheckQuery( ctx, q );
>           *params = q->Ready;
>           break;
> +      case GL_QUERY_TARGET:
> +         *params = q->Target;
> +         break;
>        default:
>           _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryObjectuivARB(pname)");
>           return;
> @@ -867,6 +873,9 @@ _mesa_GetQueryObjecti64v(GLuint id, GLenum pname, GLint64EXT *params)
>              ctx->Driver.CheckQuery( ctx, q );
>           *params = q->Ready;
>           break;
> +      case GL_QUERY_TARGET:
> +         *params = q->Target;
> +         break;
>        default:
>           _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryObjecti64vARB(pname)");
>           return;
> @@ -907,6 +916,9 @@ _mesa_GetQueryObjectui64v(GLuint id, GLenum pname, GLuint64EXT *params)
>              ctx->Driver.CheckQuery( ctx, q );
>           *params = q->Ready;
>           break;
> +      case GL_QUERY_TARGET:
> +         *params = q->Target;
> +         break;
>        default:
>           _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryObjectui64vARB(pname)");
>           return;
> --
> 2.3.7
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list