brw: Mark src3 of BFN as is_control_source

This prevents lower_regioning from doing bad things when the destination
and all the other sources are UW.

Other solutions considered:

- Have the type of src[3] match the destination type. This also required
  changes in combine_constants to allow the type be UD or UW.
- Make a new subclass brw_bfn_inst, and store the Boolean function
  selector outside the src[] array. This was a lot more code and a lot
  more churn (+47,-27 vs +4).

Fixes: b948e6d503 ("brw: Use BFN to implement nir_opt_bitfield_select")
Suggested-by: Curro
Suggested-by: Ken
Closes: #14095
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37891>
This commit is contained in:
Ian Romanick
2025-10-14 14:22:44 -07:00
committed by Marge Bot
parent d0af217911
commit 85db960e37
+4
View File
@@ -284,6 +284,10 @@ brw_inst::is_control_source(unsigned arg) const
case SHADER_OPCODE_REDUCE:
return arg != 0;
case BRW_OPCODE_BFN:
/* src[3] holds the Boolean function selector. */
return arg == 3;
default:
return false;
}