Mesa (master): radeonsi: don't do VGT_FLUSH before fast launch on gfx10.3

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 18 06:41:16 UTC 2020


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Tue Nov 10 23:05:30 2020 -0500

radeonsi: don't do VGT_FLUSH before fast launch on gfx10.3

I don't see any hangs here. Blender and the Factorio trace work fine.

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

---

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

diff --git a/src/gallium/drivers/radeonsi/si_gfx_cs.c b/src/gallium/drivers/radeonsi/si_gfx_cs.c
index 2ce9540b0aa..18cd4e63bde 100644
--- a/src/gallium/drivers/radeonsi/si_gfx_cs.c
+++ b/src/gallium/drivers/radeonsi/si_gfx_cs.c
@@ -426,7 +426,7 @@ void si_begin_new_gfx_cs(struct si_context *ctx, bool first_cs)
                  SI_CONTEXT_INV_L2 | SI_CONTEXT_START_PIPELINE_STATS;
 
    /* We don't know if the last draw call used GS fast launch, so assume it didn't. */
-   if (ctx->ngg_culling & SI_NGG_CULL_GS_FAST_LAUNCH_ALL)
+   if (ctx->chip_class == GFX10 && ctx->ngg_culling & SI_NGG_CULL_GS_FAST_LAUNCH_ALL)
       ctx->flags |= SI_CONTEXT_VGT_FLUSH;
 
    radeon_add_to_buffer_list(ctx, ctx->gfx_cs, ctx->border_color_buffer,
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
index 80c6a33aef9..4c739eeef2d 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -2129,7 +2129,8 @@ static void si_draw_vbo(struct pipe_context *ctx,
        * This is the setting that is used by the draw.
        */
       uint8_t ngg_culling = si_get_vs(sctx)->current->key.opt.ngg_culling;
-      if (!(old_ngg_culling & SI_NGG_CULL_GS_FAST_LAUNCH_ALL) &&
+      if (sctx->chip_class == GFX10 &&
+          !(old_ngg_culling & SI_NGG_CULL_GS_FAST_LAUNCH_ALL) &&
           ngg_culling & SI_NGG_CULL_GS_FAST_LAUNCH_ALL)
          sctx->flags |= SI_CONTEXT_VGT_FLUSH;
 



More information about the mesa-commit mailing list