nir/lower_io: fix boolean output stores

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: c217ee8d35 ("nir: Insert b2b1s around booleans in nir_lower_to")
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36966>
This commit is contained in:
Georg Lehmann
2025-08-24 12:31:19 +02:00
committed by Marge Bot
parent 13a9f27432
commit e270a7480b
+1 -1
View File
@@ -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);