[Mesa-dev] [PATCH] mesa/compute: Fix indirect dispatch buffer size check on 32-bit systems

Jason Ekstrand jason at jlekstrand.net
Fri May 6 00:41:51 UTC 2016


Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Thu, May 5, 2016 at 5:38 PM, Jordan Justen <jordan.l.justen at intel.com>
wrote:

> 2655265fcba9017e793026c76e490e04db088c8f, but for compute.
>
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> Cc: Kenneth Graunke <kenneth at whitecape.org>
> ---
>
>  I don't know if there is a test that this fixes, but it seems like we
>  should handle it the same as the draw case.
>
>  Note that the draw indirect param is a pointer, whereas it is a
>  GLintptr for dispatch indirect.
>
>  src/mesa/main/api_validate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
> index 6ec65e5..9d29f8d 100644
> --- a/src/mesa/main/api_validate.c
> +++ b/src/mesa/main/api_validate.c
> @@ -1107,7 +1107,7 @@ valid_dispatch_indirect(struct gl_context *ctx,
>                          GLintptr indirect,
>                          GLsizei size, const char *name)
>  {
> -   GLintptr end = indirect + size;
> +   const uint64_t end = (uint64_t) indirect + size;
>
>     if (!check_valid_to_compute(ctx, name))
>        return GL_FALSE;
> --
> 2.8.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160505/648bf089/attachment.html>


More information about the mesa-dev mailing list