load_front_face and load_helper_invocation produce booleans.
On Broadwell:
total instructions in shared programs:
11638956 ->
11638011 (-0.01%)
instructions in affected programs: 115093 -> 114148 (-0.82%)
helped: 628
HURT: 14
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
}
return nir_alu_type_get_base_type(output_type) == type;
+ } else if (src.ssa->parent_instr->type == nir_instr_type_intrinsic) {
+ nir_intrinsic_instr *intr = nir_instr_as_intrinsic(src.ssa->parent_instr);
+
+ if (type == nir_type_bool) {
+ return intr->intrinsic == nir_intrinsic_load_front_face ||
+ intr->intrinsic == nir_intrinsic_load_helper_invocation;
+ }
}
/* don't know */