[Mesa-dev] [PATCH] st/mesa: check the texture image level in st_texture_match_image

Ilia Mirkin imirkin at alum.mit.edu
Fri Jun 24 16:02:24 UTC 2016


On Fri, Jun 24, 2016 at 11:59 AM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> Otherwise, 1x1 images of arbitrarily high level are accepted.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96639#add_comment

Please nuke the #add_comment bit. With that,

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

> Cc: 11.2 12.0 <mesa-stable at lists.freedesktop.org>
> ---
>  src/mesa/state_tracker/st_texture.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
> index 52b0943..54dd932 100644
> --- a/src/mesa/state_tracker/st_texture.c
> +++ b/src/mesa/state_tracker/st_texture.c
> @@ -226,6 +226,11 @@ st_texture_match_image(struct st_context *st,
>         ptLayers != pt->array_size)
>        return GL_FALSE;
>
> +   /* Test that the image level fits .
> +    */
> +   if (image->Level > pt->last_level)
> +      return GL_FALSE;
> +
>     return GL_TRUE;
>  }
>
> --
> 2.7.4
>
> _______________________________________________
> 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