From ce335dcb19297d04f3fb6ce0d290ff99130d09f7 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 17 Aug 2020 10:58:06 -0700 Subject: [PATCH] freedreno/cffdec: When .mergedregs is set, don't count half regs. This matches what ir3.c does in the mergedregs case: just count max full reg used. This flag is unset so far, but will be soon and keeps our output comparable between blob and freedreno. Part-of: --- src/freedreno/ir3/disasm-a3xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedreno/ir3/disasm-a3xx.c b/src/freedreno/ir3/disasm-a3xx.c index 02ab47a8875..ea3a9609c6b 100644 --- a/src/freedreno/ir3/disasm-a3xx.c +++ b/src/freedreno/ir3/disasm-a3xx.c @@ -272,7 +272,7 @@ static void print_reg_stats(struct disasm_ctx *ctx) * assigned to shader: */ fullreg = (fullreg + 3) / 4; - halfreg = (halfreg + 3) / 4; + halfreg = ctx->regs.used.mergedregs ? 0 : (halfreg + 3) / 4; // Note this count of instructions includes rptN, which matches // up to how mesa prints this: -- 2.30.2