[Mesa-dev] [PATCH] radeonsi: fix an assertion failure in si_decompress_sampler_color_textures
Nicolai Hähnle
nhaehnle at gmail.com
Thu Nov 3 19:07:06 UTC 2016
On 03.11.2016 19:22, Marek Olšák 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>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
> ---
> 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,
>
More information about the mesa-dev
mailing list