summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2016-11-03 19:16:51 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2016-11-09 14:07:47 +0000
commitaa947e7a6352916a19e6d8bdd8e23c8a55c793ed (patch)
treecb2ebbb8254a987d136ffd4cf6bac7377264cabe /src/gallium
parentd54699135f1f2c69206107ba161c1bfd9ca16b78 (diff)
downloadexternal_mesa3d-aa947e7a6352916a19e6d8bdd8e23c8a55c793ed.zip
external_mesa3d-aa947e7a6352916a19e6d8bdd8e23c8a55c793ed.tar.gz
external_mesa3d-aa947e7a6352916a19e6d8bdd8e23c8a55c793ed.tar.bz2
radeonsi: fix an assertion failure in si_decompress_sampler_color_textures
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@lists.freedesktop.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commit 00baaa4752ab7e721218a2840cf0952d8c7c6eca)
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_blit.c4
1 files changed, 3 insertions, 1 deletions
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,