intel/brw: Fix validation of accumulator register

The `stride` and `offset` attributes are meaningful for the "virtual"
register files (VGRFs, UNIFORMs and ATTRs).  Accumulator is an ARF so
validation should check `hstride` (part of the <V,W,H> triple) and `subnr`
instead.

Fixes: 12d7aaf2b8 ("intel/compiler: add more validation for acc register usage")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28059>
This commit is contained in:
Caio Oliveira 2024-03-07 13:58:55 -08:00 committed by Marge Bot
parent db8022dc4d
commit e324fbbe68

View file

@ -191,8 +191,8 @@ fs_visitor::validate()
*/
if (intel_needs_workaround(devinfo, 14014617373) &&
inst->dst.is_accumulator() &&
inst->dst.offset == 0) {
fsv_assert_eq(inst->dst.stride, 1);
phys_subnr(devinfo, inst->dst.as_brw_reg()) == 0) {
fsv_assert_eq(inst->dst.hstride, 1);
}
}
}