summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>2022-02-03 09:35:07 +0100
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>2022-02-03 10:34:12 +0100
commiteaa87b1a4659c1c06b0ac9e5659943c888dff6d3 (patch)
treee2119c7c108cdd32d1d987c8b103cac5079ff088
parent52c850445ed5d7d58b0be4cdd5b6a17dd288bf52 (diff)
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: 9ff086052ab ("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>
-rw-r--r--src/gallium/drivers/radeonsi/si_get.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c
index 795461a1c90..985daa1c776 100644
--- a/src/gallium/drivers/radeonsi/si_get.c
+++ b/src/gallium/drivers/radeonsi/si_get.c
@@ -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,