radeonsi: limit loop unrolling for LLVM < 13

Without this change LLVM 12 hits this error:

"""
LLVM ERROR: Error while trying to spill SGPR0_SGPR1 from class SReg_64:
Cannot scavenge register without an emergency spill slot!
"""

when running glcts KHR-GL46.arrays_of_arrays_gl.AtomicUsage test.

Fixes: 9ff086052a ("radeonsi: unroll loops of up to 128 iterations")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14848>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2022-02-03 09:35:07 +01:00
parent 52c850445e
commit eaa87b1a46

View file

@ -1072,8 +1072,8 @@ void si_init_screen_get_functions(struct si_screen *sscreen)
.has_udot_4x8 = sscreen->info.has_accelerated_dot_product,
.has_dot_2x16 = sscreen->info.has_accelerated_dot_product,
.optimize_sample_mask_in = true,
.max_unroll_iterations = 128,
.max_unroll_iterations_aggressive = 128,
.max_unroll_iterations = LLVM_VERSION_MAJOR >= 13 ? 128 : 32,
.max_unroll_iterations_aggressive = LLVM_VERSION_MAJOR >= 13 ? 128 : 32,
.use_interpolated_input_intrinsics = true,
.lower_uniforms_to_ubo = true,
.support_16bit_alu = sscreen->options.fp16,