Module: Mesa
Branch: main
Commit: 12d7aaf2b825fe49277b84a605733e8fc39e241d
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=12d7aaf2b825fe49277b84a605733e8fc39e241d

Author: Tapani Pälli <[email protected]>
Date:   Wed Mar  8 13:21:48 2023 +0200

intel/compiler: add more validation for acc register usage

This is described in Wa_14014617373 and a programming note has
been added to specification.

Signed-off-by: Tapani Pälli <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23682>

---

 src/intel/compiler/brw_fs_validate.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/intel/compiler/brw_fs_validate.cpp 
b/src/intel/compiler/brw_fs_validate.cpp
index f6e18d48a05..98d149e224b 100644
--- a/src/intel/compiler/brw_fs_validate.cpp
+++ b/src/intel/compiler/brw_fs_validate.cpp
@@ -192,6 +192,17 @@ fs_visitor::validate()
                            alloc.sizes[inst->src[i].nr]);
          }
       }
+
+      /* Accumulator Registers, bspec 47251:
+       *
+       * "When destination is accumulator with offset 0, destination
+       * horizontal stride must be 1."
+       */
+      if (intel_needs_workaround(devinfo, 14014617373) &&
+          inst->dst.is_accumulator() &&
+          inst->dst.offset == 0) {
+         fsv_assert_eq(inst->dst.stride, 1);
+      }
    }
 #endif
 }

Reply via email to