pan/bi: Suppress uniform validation for LD_BUFFER

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

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13802>
This commit is contained in:
Alyssa Rosenzweig 2021-11-15 18:15:42 -05:00 committed by Marge Bot
parent 36486f54e9
commit 69ddbc4341

View file

@ -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('.')