From 4753235406ab207b0f60010358861109b4840c78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 10 Nov 2020 23:05:30 -0500 Subject: [PATCH] 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 Part-of: --- 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;