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>
(cherry picked from commit ce335dcb19)
This commit is contained in:
Eric Anholt 2020-08-17 10:58:06 -07:00 committed by Dylan Baker
parent 0ff10e6be4
commit 6111de07d1
2 changed files with 2 additions and 2 deletions

View file

@ -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
},

View file

@ -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: