From aa947e7a6352916a19e6d8bdd8e23c8a55c793ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 3 Nov 2016 19:16:51 +0100 Subject: radeonsi: fix an assertion failure in si_decompress_sampler_color_textures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Nicolai Hähnle (cherry picked from commit 00baaa4752ab7e721218a2840cf0952d8c7c6eca) --- src/gallium/drivers/radeonsi/si_blit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gallium') diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index db41f56..dd8f83b 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -487,7 +487,9 @@ si_decompress_sampler_color_textures(struct si_context *sctx, 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, -- cgit v1.1