intel/fs: Allow UB, B, and HF types in brw_nir_reduction_op_identity
Because byte immediates aren't a thing on GEN hardware, we return a signed or unsigned word immediate in the byte case. Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
This commit is contained in:
parent
10532c6831
commit
3515c0e9cf
|
@ -3870,8 +3870,14 @@ brw_nir_reduction_op_identity(const fs_builder &bld,
|
||||||
{
|
{
|
||||||
nir_const_value value = nir_alu_binop_identity(op, type_sz(type) * 8);
|
nir_const_value value = nir_alu_binop_identity(op, type_sz(type) * 8);
|
||||||
switch (type_sz(type)) {
|
switch (type_sz(type)) {
|
||||||
|
case 1:
|
||||||
|
if (type == BRW_REGISTER_TYPE_UB) {
|
||||||
|
return brw_imm_uw(value.u8);
|
||||||
|
} else {
|
||||||
|
assert(type == BRW_REGISTER_TYPE_B);
|
||||||
|
return brw_imm_w(value.i8);
|
||||||
|
}
|
||||||
case 2:
|
case 2:
|
||||||
assert(type != BRW_REGISTER_TYPE_HF);
|
|
||||||
return retype(brw_imm_uw(value.u16), type);
|
return retype(brw_imm_uw(value.u16), type);
|
||||||
case 4:
|
case 4:
|
||||||
return retype(brw_imm_ud(value.u32), type);
|
return retype(brw_imm_ud(value.u32), type);
|
||||||
|
|
Loading…
Reference in New Issue