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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user