brw: Consider bfloat16 in copy propagation

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
This commit is contained in:
Caio Oliveira 2025-03-27 22:46:11 -07:00 committed by Marge Bot
parent 129c074811
commit 5936768ce0

View file

@ -793,6 +793,12 @@ try_copy_propagate(brw_shader &s, brw_inst *inst,
(reg_offset(inst->dst) % (REG_SIZE * reg_unit(devinfo))) != (reg_offset(entry->src) % (REG_SIZE * reg_unit(devinfo))))
return false;
/* BFloat16 sources always must be packed and not scalars,
* so don't propagate those cases.
*/
if (brw_type_is_bfloat(inst->src[arg].type) && entry_stride != 1)
return false;
/*
* Bail if the composition of both regions would be affected by the Xe2+
* regioning restrictions that apply to integer types smaller than a dword.
@ -1740,6 +1746,12 @@ try_copy_propagate_def(brw_shader &s,
(reg_offset(inst->dst) % (REG_SIZE * reg_unit(devinfo))) != (reg_offset(val) % (REG_SIZE * reg_unit(devinfo))))
return false;
/* BFloat16 sources always must be packed and not scalars,
* so don't propagate those cases.
*/
if (brw_type_is_bfloat(inst->src[arg].type) && entry_stride != 1)
return false;
/* The <8;8,0> regions used for FS attributes in multipolygon
* dispatch mode could violate regioning restrictions, don't copy
* propagate them in such cases.