From debedefbeb2eaaf52a599e382fcdd45d2e591024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 19 Mar 2026 21:12:55 -0400 Subject: [PATCH] radeonsi: stop setting si_shader_info::output_semantic for FS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FS doesn't use it anymore. Acked-by: Pierre-Eric Acked-by: Timur Kristóf Part-of: --- src/gallium/drivers/radeonsi/si_shader_info.c | 20 +++++++++++-------- src/gallium/drivers/radeonsi/si_shader_info.h | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader_info.c b/src/gallium/drivers/radeonsi/si_shader_info.c index 2f0f06bfaf2..37efe926424 100644 --- a/src/gallium/drivers/radeonsi/si_shader_info.c +++ b/src/gallium/drivers/radeonsi/si_shader_info.c @@ -252,12 +252,14 @@ static void gather_io_instrinsic(const nir_shader *nir, struct si_shader_info *i } } - /* No 2 outputs can use the same driver location. */ - assert((info->output_semantic[loc] == slot_semantic || - info->output_semantic[loc] == NUM_TOTAL_VARYING_SLOTS) && - "nir_recompute_io_bases wasn't called"); + if (nir->info.stage != MESA_SHADER_FRAGMENT) { + /* No 2 outputs can use the same driver location. */ + assert((info->output_semantic[loc] == slot_semantic || + info->output_semantic[loc] == NUM_TOTAL_VARYING_SLOTS) && + "nir_recompute_io_bases wasn't called"); - info->output_semantic[loc] = slot_semantic; + info->output_semantic[loc] = slot_semantic; + } if (!is_output_load && mask) { /* Output stores. */ @@ -759,9 +761,11 @@ void si_nir_gather_info(struct si_screen *sscreen, struct nir_shader *nir, assert(info->input_semantic[i] != NUM_TOTAL_VARYING_SLOTS && "nir_recompute_io_bases wasn't called"); } - for (unsigned i = 0; i < info->num_outputs; i++) { - assert(info->output_semantic[i] != NUM_TOTAL_VARYING_SLOTS && - "nir_recompute_io_bases wasn't called"); + if (nir->info.stage != MESA_SHADER_FRAGMENT) { + for (unsigned i = 0; i < info->num_outputs; i++) { + assert(info->output_semantic[i] != NUM_TOTAL_VARYING_SLOTS && + "nir_recompute_io_bases wasn't called"); + } } if (nir->info.stage == MESA_SHADER_FRAGMENT) { diff --git a/src/gallium/drivers/radeonsi/si_shader_info.h b/src/gallium/drivers/radeonsi/si_shader_info.h index 829e92c3256..b988f4cc0c5 100644 --- a/src/gallium/drivers/radeonsi/si_shader_info.h +++ b/src/gallium/drivers/radeonsi/si_shader_info.h @@ -92,7 +92,7 @@ struct si_shader_info { uint8_t num_inputs; uint8_t num_outputs; uint8_t input_semantic[PIPE_MAX_SHADER_INPUTS]; - uint8_t output_semantic[PIPE_MAX_SHADER_OUTPUTS]; + uint8_t output_semantic[PIPE_MAX_SHADER_OUTPUTS]; /* unset for FS */ uint8_t num_vs_inputs; uint8_t num_vbos_in_user_sgprs;