radeonsi: don't clear framebuffer.state before dcc decomp
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 7 Mar 2022 10:02:45 +0000 (11:02 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 11 Mar 2022 08:31:36 +0000 (08:31 +0000)
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 <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>

src/gallium/drivers/radeonsi/si_state.c

index f4c3454..fbb214c 100644 (file)
@@ -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);