Skip to content

nir/lower_locals_to_regs: Add bool bitsize knob

Alyssa Rosenzweig requested to merge alyssa/mesa:llvmpipe/fix-nir-validate into main
GLSL booleans (and hence bool derefs) may be translated either as 1-bit or
32-bit NIR registers, depending whether the backend uses nir_lower_bool_to_int32
or not. Add a knob for this and choose the right type for different backends.

Fixes nir_validate failure on
dEQP-VK.subgroups.ballot_broadcast.graphics.subgroupbroadcast_bvec3 run under
lavapipe. That test indexes into a bvec3 array, and gallivm first lowers bools
and then lowers derefs to registers, resulting in random 1-bit booleans mixed in
with 32-bit bools.
Edited by Alyssa Rosenzweig

Merge request reports