From ec42f52013bb025e539e508ee9a47ea5ba0f1945 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 23 Mar 2021 22:53:00 -0400 Subject: [PATCH] radeonsi: allow DCC_DECOMPRESS via CB with MSAA textures The shader-based codepath doesn't support it. Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_blit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index 2dc5b71..75eda35 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -440,7 +440,7 @@ static void si_blit_decompress_color(struct si_context *sctx, struct si_texture first_level, last_level, level_mask); if (need_dcc_decompress) { - assert(sctx->chip_class == GFX8); + assert(sctx->chip_class == GFX8 || tex->buffer.b.b.nr_storage_samples >= 2); custom_blend = sctx->custom_blend_dcc_decompress; assert(vi_dcc_enabled(tex, first_level)); @@ -1327,11 +1327,12 @@ void si_decompress_dcc(struct si_context *sctx, struct si_texture *tex) if (!tex->surface.meta_offset || !sctx->has_graphics) return; - if (sctx->chip_class == GFX8) { + if (sctx->chip_class == GFX8 || tex->buffer.b.b.nr_storage_samples >= 2) { si_blit_decompress_color(sctx, tex, 0, tex->buffer.b.b.last_level, 0, util_max_layer(&tex->buffer.b.b, 0), true, false); } else { struct pipe_resource *ptex = &tex->buffer.b.b; + assert(ptex->nr_storage_samples <= 1); /* DCC decompression using a compute shader. */ for (unsigned level = 0; level < tex->surface.num_meta_levels; level++) { -- 2.7.4