From d84e0096a5daa7c8bdd29c16b4bb15e7d062d80e Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Wed, 5 Jan 2022 16:06:25 +0100 Subject: [PATCH] radeonsi/gfx8: use the proper dcc clear size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dcc_fast_clear_size is assigned using addrlib's dccFastClearSize, which is computed using the whole surface size (including layers) so we don't need to multiply dcc_fast_clear_size by num_layers. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4530 Cc: mesa-stable Reviewed-by: Marek Olšák Part-of: --- src/gallium/drivers/radeonsi/si_clear.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_clear.c b/src/gallium/drivers/radeonsi/si_clear.c index 971c9195c95..405d5188aeb 100644 --- a/src/gallium/drivers/radeonsi/si_clear.c +++ b/src/gallium/drivers/radeonsi/si_clear.c @@ -352,7 +352,7 @@ bool vi_dcc_get_clear_info(struct si_context *sctx, struct si_texture *tex, unsi return false; dcc_offset += tex->surface.u.legacy.color.dcc_level[level].dcc_offset; - clear_size = tex->surface.u.legacy.color.dcc_level[level].dcc_fast_clear_size * num_layers; + clear_size = tex->surface.u.legacy.color.dcc_level[level].dcc_fast_clear_size; } si_init_buffer_clear(out, dcc_buffer, dcc_offset, clear_size, clear_value);