Module: Mesa Branch: main Commit: c7e8e8b319e189d1e40993f288536e3142225580 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c7e8e8b319e189d1e40993f288536e3142225580
Author: Alyssa Rosenzweig <[email protected]> Date: Fri Mar 4 20:00:35 2022 -0500 pan/va: Handle 64-bit sources in message instrs These take up two slots, reading an aligned register pair, even though they are in a 32-bit instruction. Required to correctly model BLEND. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15364> --- src/panfrost/bifrost/valhall/valhall.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/panfrost/bifrost/valhall/valhall.py b/src/panfrost/bifrost/valhall/valhall.py index 97357a46880..dfc31b38be3 100644 --- a/src/panfrost/bifrost/valhall/valhall.py +++ b/src/panfrost/bifrost/valhall/valhall.py @@ -258,7 +258,20 @@ def build_instr(el, overrides = {}): # Get explicit sources/dests tsize = typesize(name) - sources = [build_source(src, i, tsize) for i, src in enumerate(el.findall('src'))] + sources = [] + i = 0 + + for src in el.findall('src'): + built = build_source(src, i, tsize) + sources += [built] + + # 64-bit sources in a 32-bit (message) instruction count as two slots + # Affects BLEND, ST_CVT + if tsize != 64 and built.size == 64: + i = i + 2 + else: + i = i + 1 + dests = [Dest(dest.text or '') for dest in el.findall('dest')] # Get implicit ones
