radeonsi/gfx12: use ACO if LLVM is 19 or older

LLVM 19 is missing a SALU hazard fix.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32957>
This commit is contained in:
Marek Olšák
2025-01-08 15:03:32 -05:00
parent b05fa7d575
commit 239840556f

View File

@@ -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));