Mesa (main): pan/va: Don't use staging index as a sideband
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Feb 25 22:14:25 UTC 2022
Module: Mesa
Branch: main
Commit: a58807fa9555aaf81bcbacec148be2a53f66fb24
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a58807fa9555aaf81bcbacec148be2a53f66fb24
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Fri Feb 25 16:26:57 2022 -0500
pan/va: Don't use staging index as a sideband
It would cause us to get incorrect disassembly when the syntax is flipped.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15182>
---
src/panfrost/bifrost/valhall/valhall.py | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/panfrost/bifrost/valhall/valhall.py b/src/panfrost/bifrost/valhall/valhall.py
index 8c792404270..32fa00559e4 100644
--- a/src/panfrost/bifrost/valhall/valhall.py
+++ b/src/panfrost/bifrost/valhall/valhall.py
@@ -142,12 +142,16 @@ class Dest:
self.name = name
class Staging:
- def __init__(self, read = False, write = False, index = 0, count = 0, flags = True, name = ""):
+ def __init__(self, read = False, write = False, count = 0, flags = True, name = ""):
self.name = name
self.read = read
self.write = write
self.count = count
self.flags = flags
+ self.start = 40
+
+ if write and not flags:
+ self.start = 16
# For compatibility
self.absneg = False
@@ -158,13 +162,8 @@ class Staging:
self.lane = False
self.size = 32
- assert(index < 2)
- self.start = 40 if index == 0 else 16
-
if not flags:
self.encoded_flags = 0
- elif index > 0:
- self.encoded_flags = 0xC0
else:
self.encoded_flags = (0x80 if write else 0) | (0x40 if read else 0)
@@ -236,7 +235,7 @@ def build_staging(i, el):
count = int(el.attrib.get('count', '0'))
flags = xmlbool(el.attrib.get('flags', 'true'))
- return Staging(r, w, i, count, flags, el.text or '')
+ return Staging(r, w, count, flags, el.text or '')
def build_modifier(el):
name = el.attrib['name']
More information about the mesa-commit
mailing list