Module: Mesa Branch: main Commit: e40bd6158810b7f790f4fc20f41e69f329a55aa1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e40bd6158810b7f790f4fc20f41e69f329a55aa1
Author: Marek Olšák <[email protected]> Date: Sun Sep 26 04:29:57 2021 -0400 radeonsi: strenthen the ngg->legacy hw workaround, fix fast launch hangs too Cc: 20.1 20.2 <[email protected]> Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048> --- src/gallium/drivers/radeonsi/si_gfx_cs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_gfx_cs.c b/src/gallium/drivers/radeonsi/si_gfx_cs.c index 4b561ac1be3..007a52372ed 100644 --- a/src/gallium/drivers/radeonsi/si_gfx_cs.c +++ b/src/gallium/drivers/radeonsi/si_gfx_cs.c @@ -358,8 +358,12 @@ 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 used NGG. */ - if (ctx->screen->info.has_vgt_flush_ngg_legacy_bug) + /* We don't know if the last draw used NGG or NGG fast launch because it can be a different + * process. When switching NGG->legacy or NGG->FAST_LAUNCH, we need to flush VGT for certain + * hw generations. + */ + if ((ctx->screen->info.has_vgt_flush_ngg_legacy_bug && !ctx->ngg) || + (ctx->chip_class == GFX10 && ctx->ngg_culling & SI_NGG_CULL_GS_FAST_LAUNCH_ALL)) ctx->flags |= SI_CONTEXT_VGT_FLUSH; if (ctx->border_color_buffer) {
