Mesa (main): pan/bi: Fix spilling on Valhall

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 7 14:34:59 UTC 2022


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

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Tue Dec 21 17:06:05 2021 -0500

pan/bi: Fix spilling on Valhall

We need a slightly different idiom on Valhall, since the segment modifiers no
longer exist but we now have an immediate offset.

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15793>

---

 src/panfrost/bifrost/bi_ra.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/panfrost/bifrost/bi_ra.c b/src/panfrost/bifrost/bi_ra.c
index b5ba87ba593..8b14c0ec79a 100644
--- a/src/panfrost/bifrost/bi_ra.c
+++ b/src/panfrost/bifrost/bi_ra.c
@@ -479,12 +479,18 @@ bi_count_read_index(bi_instr *I, bi_index index)
  * for the target, so the spill/fill code becomes architecture-independent.
  */
 
+static bi_index
+bi_tls_ptr(bool hi)
+{
+        return bi_fau(BIR_FAU_TLS_PTR, hi);
+}
+
 static bi_instr *
 bi_load_tl(bi_builder *b, unsigned bits, bi_index src, unsigned offset)
 {
         if (b->shader->arch >= 9) {
-                return bi_load_to(b, bits, src, va_zero_lut(), va_zero_lut(),
-                                  BI_SEG_TL, offset);
+                return bi_load_to(b, bits, src, bi_tls_ptr(false),
+                                  bi_tls_ptr(true), BI_SEG_TL, offset);
         } else {
                 return bi_load_to(b, bits, src, bi_imm_u32(offset), bi_zero(),
                                   BI_SEG_TL, 0);
@@ -495,7 +501,7 @@ static void
 bi_store_tl(bi_builder *b, unsigned bits, bi_index src, unsigned offset)
 {
         if (b->shader->arch >= 9) {
-                bi_store(b, bits, src, va_zero_lut(), va_zero_lut(), BI_SEG_TL, offset);
+                bi_store(b, bits, src, bi_tls_ptr(false), bi_tls_ptr(true), BI_SEG_TL, offset);
         } else {
                 bi_store(b, bits, src, bi_imm_u32(offset), bi_zero(), BI_SEG_TL, 0);
         }



More information about the mesa-commit mailing list