mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
pan/va: Allow forcing staging flags to read-write
Required for the correct encoding of atomics. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15515>
This commit is contained in:
parent
832d67e99d
commit
e6ca668d45
1 changed files with 8 additions and 5 deletions
|
|
@ -143,15 +143,15 @@ class Dest:
|
|||
self.name = name
|
||||
|
||||
class Staging:
|
||||
def __init__(self, read = False, write = False, 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.flags = (flags != 'false')
|
||||
self.start = 40
|
||||
|
||||
if write and not flags:
|
||||
if write and not self.flags:
|
||||
self.start = 16
|
||||
|
||||
# For compatibility
|
||||
|
|
@ -163,9 +163,12 @@ class Staging:
|
|||
self.lane = False
|
||||
self.size = 32
|
||||
|
||||
if not flags:
|
||||
if not self.flags:
|
||||
self.encoded_flags = 0
|
||||
elif flags == 'rw':
|
||||
self.encoded_flags = 0xc0
|
||||
else:
|
||||
assert(flags == 'true')
|
||||
self.encoded_flags = (0x80 if write else 0) | (0x40 if read else 0)
|
||||
|
||||
class Immediate:
|
||||
|
|
@ -237,7 +240,7 @@ def build_staging(i, el):
|
|||
r = xmlbool(el.attrib.get('read', 'false'))
|
||||
w = xmlbool(el.attrib.get('write', 'false'))
|
||||
count = int(el.attrib.get('count', '0'))
|
||||
flags = xmlbool(el.attrib.get('flags', 'true'))
|
||||
flags = el.attrib.get('flags', 'true')
|
||||
|
||||
return Staging(r, w, count, flags, el.text or '')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue