pan/va: Handle sr_write_count in the disassembler

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15182>
This commit is contained in:
Alyssa Rosenzweig 2022-02-25 12:29:00 -05:00 committed by Marge Bot
parent eee6dad0c9
commit 794836daf0
1 changed files with 9 additions and 1 deletions

View File

@ -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) {