From 239840556f99aaa1b71c450a3b389bd9be1a24f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 8 Jan 2025 15:03:32 -0500 Subject: [PATCH] radeonsi/gfx12: use ACO if LLVM is 19 or older LLVM 19 is missing a SALU hazard fix. Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_pipe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 13673399c22..4e95822bddc 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -1190,9 +1190,10 @@ static struct pipe_screen *radeonsi_screen_create_impl(struct radeon_winsys *ws, #if AMD_LLVM_AVAILABLE /* 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. + * alternative that has the workaround and is always available. Same for GFX12. */ - if (sscreen->info.gfx_level == GFX11_5 && LLVM_VERSION_MAJOR < 19) + if ((sscreen->info.gfx_level == GFX12 && LLVM_VERSION_MAJOR < 20) || + (sscreen->info.gfx_level == GFX11_5 && LLVM_VERSION_MAJOR < 19)) sscreen->use_aco = true; else if (sscreen->info.gfx_level >= GFX10) sscreen->use_aco = (sscreen->debug_flags & DBG(USE_ACO));