radeonsi: don't clear framebuffer.state before dcc decomp

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 804e292440 we can safely drop it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6099
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15261>
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2022-03-07 11:02:45 +01:00
committed by Marge Bot
parent 01442cf4d4
commit 968d68125c

View File

@@ -2788,7 +2788,6 @@ static void si_set_framebuffer_state(struct pipe_context *ctx,
bool old_has_stencil = bool old_has_stencil =
old_has_zsbuf && old_has_zsbuf &&
((struct si_texture *)sctx->framebuffer.state.zsbuf->texture)->surface.has_stencil; ((struct si_texture *)sctx->framebuffer.state.zsbuf->texture)->surface.has_stencil;
bool unbound = false;
int i; int i;
/* Reject zero-sized framebuffers due to a hw bug on GFX6 that occurs /* 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) if (!surf->dcc_incompatible)
continue; 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 (vi_dcc_enabled(tex, surf->base.u.tex.level))
if (!si_texture_disable_dcc(sctx, tex)) if (!si_texture_disable_dcc(sctx, tex))
si_decompress_dcc(sctx, tex); si_decompress_dcc(sctx, tex);