[Mesa-dev] [PATCH 4/4] mesa: Return 0 for GL_CURRENT_QUERY with a mismatched query target.
Brian Paul
brianp at vmware.com
Fri Oct 19 15:04:04 PDT 2012
On 10/19/2012 12:53 PM, Eric Anholt wrote:
> With the previous two commits, this fixes piglit
> GL_ARB_occlusion_query2/api.
> ---
> src/mesa/main/queryobj.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
> index d2f064e..32aa519 100644
> --- a/src/mesa/main/queryobj.c
> +++ b/src/mesa/main/queryobj.c
> @@ -531,7 +531,7 @@ _mesa_GetQueryIndexediv(GLenum target, GLuint index, GLenum pname,
> }
> break;
> case GL_CURRENT_QUERY_ARB:
> - *params = q ? q->Id : 0;
> + *params = (q&& q->Target == target) ? q->Id : 0;
> break;
> default:
> _mesa_error(ctx, GL_INVALID_ENUM, "glGetQuery{Indexed}iv(pname)");
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list