From 57d1d404131cce2889bd37bc2e8e95244c62e4ad Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Thu, 7 Mar 2024 13:58:55 -0800 Subject: [PATCH] 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 triple) and `subnr` instead. Fixes: 12d7aaf2b82 ("intel/compiler: add more validation for acc register usage") Reviewed-by: Francisco Jerez Reviewed-by: Ian Romanick Part-of: (cherry picked from commit e324fbbe68df870dede5a7b4efbd6528dd041de6) --- .pick_status.json | 2 +- src/intel/compiler/brw_fs_validate.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 94c77ed5562..5bd74b97c21 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -474,7 +474,7 @@ "description": "intel/brw: Fix validation of accumulator register", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "12d7aaf2b825fe49277b84a605733e8fc39e241d", "notes": null diff --git a/src/intel/compiler/brw_fs_validate.cpp b/src/intel/compiler/brw_fs_validate.cpp index 499bc8181c3..7ef2be70146 100644 --- a/src/intel/compiler/brw_fs_validate.cpp +++ b/src/intel/compiler/brw_fs_validate.cpp @@ -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); } } }