Mesa (main): pan/va: Handle sr_write_count in the disassembler
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Feb 25 22:14:25 UTC 2022
Module: Mesa
Branch: main
Commit: 794836daf06043a6d7201274b4496ce57f2478e8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=794836daf06043a6d7201274b4496ce57f2478e8
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Fri Feb 25 12:29:00 2022 -0500
pan/va: Handle sr_write_count in the disassembler
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15182>
---
src/panfrost/bifrost/valhall/disasm.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/panfrost/bifrost/valhall/disasm.py b/src/panfrost/bifrost/valhall/disasm.py
index 6d0cda9cc5f..bc0702b6ccf 100644
--- a/src/panfrost/bifrost/valhall/disasm.py
+++ b/src/panfrost/bifrost/valhall/disasm.py
@@ -154,7 +154,15 @@ va_disasm_instr(FILE *fp, uint64_t instr)
% endif
<%
no_comma = False
- sr_count = "((instr >> 33) & MASK(3))" if sr.count == 0 else sr.count
+
+ if sr.count != 0:
+ sr_count = sr.count
+ elif "staging_register_write_count" in [x.name for x in op.modifiers] and sr.write:
+ sr_count = "(((instr >> 36) & MASK(3)) + 1)"
+ elif "staging_register_count" in [x.name for x in op.modifiers]:
+ sr_count = "((instr >> 33) & MASK(3))"
+ else:
+ assert(0)
%>
// assert(((instr >> ${sr.start}) & 0xC0) == ${sr.encoded_flags});
for (unsigned i = 0; i < ${sr_count}; ++i) {
More information about the mesa-commit
mailing list