Mesa (master): freedreno/cffdec: When .mergedregs is set, don't count half regs.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Aug 19 17:22:50 UTC 2020


Module: Mesa
Branch: master
Commit: ce335dcb19297d04f3fb6ce0d290ff99130d09f7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce335dcb19297d04f3fb6ce0d290ff99130d09f7

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Aug 17 10:58:06 2020 -0700

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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6323>

---

 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:



More information about the mesa-commit mailing list