intel/brw: Clear write_accumulator flag when changing the destination

If the destination was the accumulator but is no longer, having the flag
set is not correct. On Xe2 this also causes a validation error.

v2: Reword the comment to be more clear. Suggested by Jordan.

Fixes: efa4e4bc5f ("intel/fs: Introduce regioning lowering pass.")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28404>
This commit is contained in:
Ian Romanick
2024-03-25 14:22:59 -07:00
committed by Marge Bot
parent b5f4b16811
commit be4fa59a72

View File

@@ -550,6 +550,12 @@ namespace {
ibld.at(block, inst->next).MOV(subscript(inst->dst, raw_type, j),
subscript(tmp, raw_type, j));
/* If the destination was an accumulator, after lowering it will be a
* GRF. Clear writes_accumulator for the instruction.
*/
if (inst->dst.is_accumulator())
inst->writes_accumulator = false;
/* Point the original instruction at the temporary, making sure to keep
* any destination modifiers in the instruction.
*/