Workaround for bug in llvm that causes the GPU to hang in presence of nested loops because there is an exec mask issue. The proper solution is to fix LLVM but this might require a bunch of work.
This fixes a bunch of GPU hangs that happen with DXVK.
Vega10: Totals from affected shaders: SGPRS: 110456 -> 110456 (0.00 %)
VGPRS: 122800 -> 122800 (0.00 %) Spilled SGPRs: 7478 -> 7478 (0.00 %) Spilled VGPRs: 36 -> 36 (0.00 %) Code Size: 9901104 -> 9922928 (0.22 %) bytes Max Waves: 7143 -> 7143 (0.00 %)
Code size slightly increases because it inserts more branch instructions but that's expected. I don't see any real performance changes.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105613 Cc: firstname.lastname@example.org
135e4d434f radv: add a workaround for DXVK hangs by setting amdgpu-skip-threshold
src/amd/vulkan/radv_shader.c | 79 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 78 insertions(+), 1 deletion(-)