Mesa (main): pan/va: Handle shift lanes in assembler

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 2 18:00:11 UTC 2022


Module: Mesa
Branch: main
Commit: a99eac8a490bd2a401eb8cf08571b4268e863efc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a99eac8a490bd2a401eb8cf08571b4268e863efc

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Sat Jan 29 12:53:05 2022 -0500

pan/va: Handle shift lanes in assembler

Noticed in a program using ARM_shader_framebuffer_fetch.

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14833>

---

 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}")
 



More information about the mesa-commit mailing list