From a7cb1433e3944925903c70c80446de69ac608e87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 15 Sep 2024 09:37:47 -0400 Subject: [PATCH] radeonsi: use ACO on GFX11.5 with LLVM 18 or older to work around GPU hangs Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_pipe.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 4e466979de3..9fe1c71a21a 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -1185,7 +1185,13 @@ static struct pipe_screen *radeonsi_screen_create_impl(struct radeon_winsys *ws, sscreen->info.register_shadowing_required = true; #if AMD_LLVM_AVAILABLE - sscreen->use_aco = (sscreen->debug_flags & DBG(USE_ACO)); + /* For GFX11.5, LLVM < 19 is missing a workaround that can cause GPU hangs. ACO is the only + * alternative that has the workaround and is always available. + */ + if (sscreen->info.gfx_level == GFX11_5 && LLVM_VERSION_MAJOR < 19) + sscreen->use_aco = true; + else + sscreen->use_aco = (sscreen->debug_flags & DBG(USE_ACO)); #else sscreen->use_aco = true; #endif