[Mesa-dev] [PATCH] radeonsi: fix an assertion failure in si_decompress_sampler_color_textures
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Thu Nov 3 18:50:53 UTC 2016
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
On Thu, Nov 3, 2016 at 7:22 PM, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> This fixes a crash in Deus Ex: Mankind Divided. Release builds were
> unaffected, so it's not too serious.
>
> Cc: 11.2 12.0 13.0 <mesa-stable at lists.freedesktop.org>
> ---
> src/gallium/drivers/radeonsi/si_blit.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
> index e086ed8..075d76a 100644
> --- a/src/gallium/drivers/radeonsi/si_blit.c
> +++ b/src/gallium/drivers/radeonsi/si_blit.c
> @@ -479,21 +479,23 @@ si_decompress_sampler_color_textures(struct si_context *sctx,
> while (mask) {
> struct pipe_sampler_view *view;
> struct r600_texture *tex;
>
> i = u_bit_scan(&mask);
>
> view = textures->views.views[i];
> assert(view);
>
> tex = (struct r600_texture *)view->texture;
> - assert(tex->cmask.size || tex->fmask.size || tex->dcc_offset);
> + /* CMASK or DCC can be discarded and we can still end up here. */
> + if (!tex->cmask.size && !tex->fmask.size && !tex->dcc_offset)
> + continue;
>
> si_blit_decompress_color(&sctx->b.b, tex,
> view->u.tex.first_level, view->u.tex.last_level,
> 0, util_max_layer(&tex->resource.b.b, view->u.tex.first_level),
> false);
> }
> }
>
> static void
> si_decompress_image_color_textures(struct si_context *sctx,
> --
> 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