From cfc2a85b89cf32128f610b722bc6673d0812f8ef Mon Sep 17 00:00:00 2001 From: Mark Collins Date: Fri, 1 Dec 2023 11:58:40 +0000 Subject: [PATCH] freedreno/rddecompiler: Emit explicit scope for CP_COND_REG_EXEC Due to the larger amount of conditional execution in newer traces the flat view makes it hard to parse what might be conditionally executed and what might now. This makes it easier to view by adding a scope for conditionally executed commands which is indented to the next level. Signed-off-by: Mark Collins Part-of: --- src/freedreno/decode/rddecompiler.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/freedreno/decode/rddecompiler.c b/src/freedreno/decode/rddecompiler.c index cd46987402c..9f5cb135856 100644 --- a/src/freedreno/decode/rddecompiler.c +++ b/src/freedreno/decode/rddecompiler.c @@ -456,6 +456,21 @@ decompile_commands(uint32_t *dwords, uint32_t sizedwords, int level) } } printlvl(level, "}\n"); + } else if (val == CP_COND_REG_EXEC) { + const char *packet_name = pktname(val); + const char *dom_name = packet_name; + uint32_t cond_count = dwords[count - 1]; + + decompile_domain(val, dwords + 1, count - 1, dom_name, packet_name, level); + + printlvl(level, "{\n"); + printlvl(level + 1, "/* BEGIN COND (%d DWORDS) */\n", cond_count); + + decompile_commands(dwords + count, cond_count, level + 1); + count += cond_count; + + printlvl(level + 1, "/* END COND */\n"); + printlvl(level, "}\n"); } else { const char *packet_name = pktname(val); const char *dom_name = packet_name;