From e270a7480bdcb789087fd44bb44521222b5062fd Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Sun, 24 Aug 2025 12:31:19 +0200 Subject: [PATCH] nir/lower_io: fix boolean output stores MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stores don't have a definition, we have to check the bit size of the source. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13762 Fixes: c217ee8d35f ("nir: Insert b2b1s around booleans in nir_lower_to") Reviewed-by: Konstantin Seurer Reviewed-by: Mary Guillemard Reviewed-by: Marek Olšák Part-of: --- src/compiler/nir/nir_lower_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c index 3c57301bd67..b0265df6fa5 100644 --- a/src/compiler/nir/nir_lower_io.c +++ b/src/compiler/nir/nir_lower_io.c @@ -636,7 +636,7 @@ lower_store(nir_intrinsic_instr *intrin, struct lower_io_state *state, write_mask >>= num_comps; offset = nir_iadd_imm(b, offset, slot_size); } - } else if (intrin->def.bit_size == 1) { + } else if (intrin->src[1].ssa->bit_size == 1) { /* Booleans are 32-bit */ assert(glsl_type_is_boolean(type)); nir_def *b32_val = nir_b2b32(&state->builder, intrin->src[1].ssa);