Mesa (main): pan/bi: Suppress uniform validation for LD_BUFFER

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Nov 18 23:34:31 UTC 2021


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

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Mon Nov 15 18:15:42 2021 -0500

pan/bi: Suppress uniform validation for LD_BUFFER

Seems to be ok and used by the DDK...

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

---

 src/panfrost/bifrost/valhall/asm.py | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/panfrost/bifrost/valhall/asm.py b/src/panfrost/bifrost/valhall/asm.py
index 7ad678767b6..c088eb66eb8 100644
--- a/src/panfrost/bifrost/valhall/asm.py
+++ b/src/panfrost/bifrost/valhall/asm.py
@@ -33,8 +33,9 @@ class ParseError(Exception):
         self.error = error
 
 class FAUState:
-    def __init__(self, mode):
+    def __init__(self, mode, single_uniform_slot = True):
         self.mode = mode
+        self.single_uniform_slot = single_uniform_slot
         self.uniform_slot = None
         self.special = None
         self.buffer = set()
@@ -60,7 +61,10 @@ class FAUState:
                 'Expected uniform with default immediate mode')
         die_if(self.uniform_slot is not None and self.uniform_slot != slot,
                 'Overflowed uniform slots')
-        self.uniform_slot = slot
+
+        if self.single_uniform_slot:
+            self.uniform_slot = slot
+
         self.push(f'uniform{v}')
 
     def id(self, s):
@@ -240,7 +244,10 @@ def parse_asm(line):
         # Set a placeholder writemask to prevent encoding faults
         encoded |= (0xC0 << 40)
 
-    fau = FAUState(immediate_mode)
+    # TODO: Determine which instructions can only have address a single uniform
+    single_uniform_slot = not ins.name.startswith('LD_BUFFER')
+
+    fau = FAUState(immediate_mode, single_uniform_slot = single_uniform_slot)
 
     for i, (op, src) in enumerate(zip(operands, ins.srcs)):
         parts = op.split('.')



More information about the mesa-commit mailing list