[Mesa-dev] [PATCH] mesa/queryobject: return INVALID_VALUE if offset < 0 (v2)
Ilia Mirkin
imirkin at alum.mit.edu
Sun May 22 21:24:04 UTC 2016
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
On Sun, May 22, 2016 at 5:21 PM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This fixes:
> GL45-CTS.direct_state_access.queries_errors
>
> The ARB_direct_state_access spec agrees.
>
> v2: move check down further (Ilia)
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/mesa/main/queryobj.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
> index 7a70b59..1fa0279 100644
> --- a/src/mesa/main/queryobj.c
> +++ b/src/mesa/main/queryobj.c
> @@ -766,6 +766,11 @@ get_query_object(struct gl_context *ctx, const char *func,
> return;
> }
>
> + if (offset < 0) {
> + _mesa_error(ctx, GL_INVALID_VALUE, "%s(offset is negative)", func);
> + return;
> + }
> +
> switch (pname) {
> case GL_QUERY_RESULT:
> case GL_QUERY_RESULT_NO_WAIT:
> --
> 2.5.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list