Mesa (master): radeonsi: don't add the tess ring buffers into the cs_preamble state

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 26 07:16:56 UTC 2020


Module: Mesa
Branch: master
Commit: 428360662f300c44729dada9cd57c5b9a04befe8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=428360662f300c44729dada9cd57c5b9a04befe8

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Tue Jun 16 13:56:10 2020 -0400

radeonsi: don't add the tess ring buffers into the cs_preamble state

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5603>

---

 src/gallium/drivers/radeonsi/si_gfx_cs.c        | 5 +++++
 src/gallium/drivers/radeonsi/si_state_shaders.c | 3 ---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_gfx_cs.c b/src/gallium/drivers/radeonsi/si_gfx_cs.c
index 2e7b34e3a09..188bda0858c 100644
--- a/src/gallium/drivers/radeonsi/si_gfx_cs.c
+++ b/src/gallium/drivers/radeonsi/si_gfx_cs.c
@@ -415,6 +415,11 @@ void si_begin_new_gfx_cs(struct si_context *ctx)
       return;
    }
 
+   if (ctx->tess_rings) {
+      radeon_add_to_buffer_list(ctx, ctx->gfx_cs, si_resource(ctx->tess_rings),
+                                RADEON_USAGE_READWRITE, RADEON_PRIO_SHADER_RINGS);
+   }
+
    /* set all valid group as dirty so they get reemited on
     * next draw command
     */
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 396737bd2c2..cee13524edc 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -3640,9 +3640,6 @@ static void si_init_tess_factor_ring(struct si_context *sctx)
 
    si_cs_preamble_add_vgt_flush(sctx);
 
-   si_pm4_add_bo(sctx->cs_preamble_state, si_resource(sctx->tess_rings), RADEON_USAGE_READWRITE,
-                 RADEON_PRIO_SHADER_RINGS);
-
    uint64_t factor_va =
       si_resource(sctx->tess_rings)->gpu_address + sctx->screen->tess_offchip_ring_size;
 



More information about the mesa-commit mailing list