radeonsi: strengthen the VGT_FLUSH condition in begin_new_gfx_cs
authorMarek Olšák <marek.olsak@amd.com>
Wed, 18 Aug 2021 15:12:30 +0000 (11:12 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 10 Sep 2021 23:32:03 +0000 (23:32 +0000)
Cc: mesa-stable
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>

src/gallium/drivers/radeonsi/si_gfx_cs.c

index 02421e3..3bd8417 100644 (file)
@@ -355,8 +355,8 @@ void si_begin_new_gfx_cs(struct si_context *ctx, bool first_cs)
                  SI_CONTEXT_INV_L2 | SI_CONTEXT_START_PIPELINE_STATS;
    ctx->pipeline_stats_enabled = -1;
 
-   /* We don't know if the last draw call used GS fast launch, so assume it didn't. */
-   if (ctx->chip_class == GFX10 && ctx->ngg_culling & SI_NGG_CULL_GS_FAST_LAUNCH_ALL)
+   /* We don't know if the last draw used NGG. */
+   if (ctx->screen->info.has_vgt_flush_ngg_legacy_bug)
       ctx->flags |= SI_CONTEXT_VGT_FLUSH;
 
    if (ctx->border_color_buffer) {