From a99eac8a490bd2a401eb8cf08571b4268e863efc Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sat, 29 Jan 2022 12:53:05 -0500 Subject: [PATCH] pan/va: Handle shift lanes in assembler Noticed in a program using ARM_shader_framebuffer_fetch. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/valhall/asm.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/panfrost/bifrost/valhall/asm.py b/src/panfrost/bifrost/valhall/asm.py index 8c025a5b909..566c7565142 100644 --- a/src/panfrost/bifrost/valhall/asm.py +++ b/src/panfrost/bifrost/valhall/asm.py @@ -293,6 +293,12 @@ def parse_asm(line): swizzled = True val = enums['lane_8_bit'].bare_values.index(mod) encoded |= (val << src.lane) + elif mod in enums['lanes_8_bit'].bare_values: + die_if(not src.lanes, "Instruction doesn't take a lane") + die_if(swizzled, "Multiple swizzles specified") + swizzled = True + val = enums['lanes_8_bit'].bare_values.index(mod) + encoded |= (val << src.offset['widen']) else: die(f"Unknown modifier {mod}")