From e6ea15a73a51b58aaa1e1d97868ff6f78f07ffbb Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 2 May 2022 11:10:37 -0400 Subject: [PATCH] pan/va: Generalize message? check for asm Allows passing more uniforms in more places. We'll use this in a test case in a moment. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/valhall/asm.py | 3 +-- src/panfrost/bifrost/valhall/valhall.py | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/panfrost/bifrost/valhall/asm.py b/src/panfrost/bifrost/valhall/asm.py index fbaedf83905..6b7b5ceb1a9 100644 --- a/src/panfrost/bifrost/valhall/asm.py +++ b/src/panfrost/bifrost/valhall/asm.py @@ -216,8 +216,7 @@ def parse_asm(line): # Set a placeholder writemask to prevent encoding faults encoded |= (0xC0 << 40) - # TODO: Other messages - fau = FAUState(message = ins.name.startswith('LD_BUFFER')) + fau = FAUState(message = ins.message) for i, (op, src) in enumerate(zip(operands, ins.srcs)): parts = op.split('.') diff --git a/src/panfrost/bifrost/valhall/valhall.py b/src/panfrost/bifrost/valhall/valhall.py index 9ae7000850b..de20fbb5c0d 100644 --- a/src/panfrost/bifrost/valhall/valhall.py +++ b/src/panfrost/bifrost/valhall/valhall.py @@ -192,6 +192,9 @@ class Instruction: self.staging = staging self.unit = unit + # Message-passing instruction <===> not ALU instruction + self.message = unit not in ["FMA", "CVT", "SFU"] + self.secondary_shift = max(len(self.srcs) * 8, 16) self.secondary_mask = 0xF if opcode2 is not None else 0x0 if "left" in [x.name for x in self.modifiers]: