Commit 467c9a0f authored by Iago Toral's avatar Iago Toral Committed by Marge Bot

nir: add a bool bitsize lowering pass

The pass lowers 1-bit booleans produced by NIR to the native bitsize
of the operations that produce them.

v2: change on lower_load_const_instr after upstream changes. Added
    TODO2 to explain it, as it was not properly tested yet (see
    already existing TODO) (Neil)
Reviewed-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <>
Reviewed-by: Kristian H. Kristensen's avatarKristian H. Kristensen <>
Part-of: <!3885>
parent 75674ed4
......@@ -239,6 +239,7 @@ NIR_FILES = \
nir/nir_lower_atomics_to_ssbo.c \
nir/nir_lower_bitmap.c \
nir/nir_lower_bit_size.c \
nir/nir_lower_bool_to_bitsize.c \
nir/nir_lower_bool_to_float.c \
nir/nir_lower_bool_to_int32.c \
nir/nir_lower_clamp_color_outputs.c \
......@@ -118,6 +118,7 @@ files_libnir = files(
......@@ -3868,6 +3868,7 @@ bool nir_lower_flrp(nir_shader *shader, unsigned lowering_mask,
bool always_precise, bool have_ffma);
bool nir_lower_alu_to_scalar(nir_shader *shader, nir_instr_filter_cb cb, const void *data);
bool nir_lower_bool_to_bitsize(nir_shader *shader);
bool nir_lower_bool_to_float(nir_shader *shader);
bool nir_lower_bool_to_int32(nir_shader *shader);
bool nir_lower_int_to_float(nir_shader *shader);
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment