From 6b27a4a39352891aca8cc252ee98530837df70ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 25 Apr 2026 23:00:09 -0400 Subject: [PATCH] radeonsi: fix a typo in si_shader_update_spi_shader_formats The failure is reproducible with: AMD_DEBUG=mono piglit/bin/fbo-drawbuffers-none use_frag_out -auto -fbo Fixes: 88986dcc9c8 - radeonsi: account for outputs_written when updating spi_shader_col_format Reviewed-by: Pierre-Eric Pelloux-Prayer (cherry picked from commit 5e6952307d930642b61d78c71a9ce56e3069a5d6) Part-of: --- .pick_status.json | 2 +- src/gallium/drivers/radeonsi/si_shader_variant_info.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index b3a641a76dd..208892885df 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -644,7 +644,7 @@ "description": "radeonsi: fix a typo in si_shader_update_spi_shader_formats", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "88986dcc9c81342a26951d576924d00a21d812c7", "notes": null diff --git a/src/gallium/drivers/radeonsi/si_shader_variant_info.c b/src/gallium/drivers/radeonsi/si_shader_variant_info.c index 99d47b699c2..376268707ff 100644 --- a/src/gallium/drivers/radeonsi/si_shader_variant_info.c +++ b/src/gallium/drivers/radeonsi/si_shader_variant_info.c @@ -38,7 +38,7 @@ void si_shader_update_spi_shader_formats(struct si_shader *shader, nir_shader *n for (i = 0; i < num_targets; i++) { unsigned spi_format = (spi_shader_col_format >> (i * 4)) & 0xf; - if (spi_format && (colors_written & 1u << num_mrts)) { + if (spi_format && (colors_written & 1u << i)) { value |= spi_format << (num_mrts * 4); num_mrts++; }