From 6111de07d150b248bf25e67dc59fbb9722eabcdc 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: (cherry picked from commit ce335dcb19297d04f3fb6ce0d290ff99130d09f7) --- .pick_status.json | 2 +- src/freedreno/ir3/disasm-a3xx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 56e54eb3430..f30c4698582 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -33403,7 +33403,7 @@ "description": "freedreno/cffdec: When .mergedregs is set, don't count half regs.", "nominated": false, "nomination_type": null, - "resolution": 4, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/freedreno/ir3/disasm-a3xx.c b/src/freedreno/ir3/disasm-a3xx.c index faa8962c025..0063685026c 100644 --- a/src/freedreno/ir3/disasm-a3xx.c +++ b/src/freedreno/ir3/disasm-a3xx.c @@ -266,7 +266,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: