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