From 968d68125c234bc347fde8fad543f0fc7d80d8b0 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Mon, 7 Mar 2022 11:02:45 +0100 Subject: [PATCH] radeonsi: don't clear framebuffer.state before dcc decomp MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This causes inconsistencies between sctx->framebuffer.state and other sctx->framebuffer properties (like compressed_cb_mask). The point of this code was to fix an issue with vi_separate_dcc_stop_query, which was removed by 804e2924406 we can safely drop it. Reviewed-by: Marek Olšák Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6099 Cc: mesa-stable Part-of: --- src/gallium/drivers/radeonsi/si_state.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index f4c3454..fbb214c 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2788,7 +2788,6 @@ static void si_set_framebuffer_state(struct pipe_context *ctx, bool old_has_stencil = old_has_zsbuf && ((struct si_texture *)sctx->framebuffer.state.zsbuf->texture)->surface.has_stencil; - bool unbound = false; int i; /* Reject zero-sized framebuffers due to a hw bug on GFX6 that occurs @@ -2813,16 +2812,6 @@ static void si_set_framebuffer_state(struct pipe_context *ctx, if (!surf->dcc_incompatible) continue; - /* Since the DCC decompression calls back into set_framebuffer- - * _state, we need to unbind the framebuffer, so that - * vi_separate_dcc_stop_query isn't called twice with the same - * color buffer. - */ - if (!unbound) { - util_copy_framebuffer_state(&sctx->framebuffer.state, NULL); - unbound = true; - } - if (vi_dcc_enabled(tex, surf->base.u.tex.level)) if (!si_texture_disable_dcc(sctx, tex)) si_decompress_dcc(sctx, tex); -- 2.7.4