From 3d97cd6961e3e7749b6c737ab051a9161c127ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 12 Jul 2025 01:52:34 -0400 Subject: [PATCH] radeonsi: recompute FS output IO bases to prevent an LLVM crash Fixes: 7a506d0a414 - glsl: remove gl_nir_opt_dead_builtin_varyings Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: (cherry picked from commit bde0610c0fa209421b50076ceaba0d908f90e63a) --- .pick_status.json | 2 +- src/gallium/drivers/radeonsi/si_shader_nir.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 0cf790d2eb8..c8531ac6e05 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2524,7 +2524,7 @@ "description": "radeonsi: recompute FS output IO bases to prevent an LLVM crash", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "7a506d0a4145dd74a48affa1b08bfefd53d94a04", "notes": null diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index 9a11c159356..56747b96215 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -390,8 +390,10 @@ char *si_finalize_nir(struct pipe_screen *screen, struct nir_shader *nir) NIR_PASS(_, nir, nir_remove_dead_variables, nir_var_shader_in | nir_var_shader_out, NULL); } - if (nir->info.stage == MESA_SHADER_FRAGMENT) + if (nir->info.stage == MESA_SHADER_FRAGMENT) { NIR_PASS(_, nir, si_nir_lower_color_inputs_to_sysvals); + NIR_PASS(_, nir, nir_recompute_io_bases, nir_var_shader_out); + } NIR_PASS(_, nir, nir_lower_explicit_io, nir_var_mem_shared, nir_address_format_32bit_offset);