Mesa (master): freedreno/a6xx: fix primitive counters debug output
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Mar 31 13:53:18 UTC 2021
Module: Mesa
Branch: master
Commit: 049f56fc4e32d6b16be08b0441de6abfcd5516d9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=049f56fc4e32d6b16be08b0441de6abfcd5516d9
Author: Danylo Piliaiev <dpiliaiev at igalia.com>
Date: Thu Dec 24 21:12:38 2020 +0200
freedreno/a6xx: fix primitive counters debug output
Each counter spans two regs: LO and HI
Signed-off-by: Danylo Piliaiev <dpiliaiev at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8228>
---
src/gallium/drivers/freedreno/a6xx/fd6_query.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_query.c b/src/gallium/drivers/freedreno/a6xx/fd6_query.c
index 032ba18fc23..d7060df804c 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_query.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_query.c
@@ -300,21 +300,23 @@ log_counters(struct fd6_primitives_sample *ps)
};
printf(" counter\t\tstart\t\t\tstop\t\t\tdiff\n");
- for (int i = 0; i < counter_count; i++) {
- printf(" RBBM_PRIMCTR_%d\t0x%016llx\t0x%016llx\t%lld\t%s\n",
- i + (counter_base - REG_A6XX_RBBM_PRIMCTR_0_LO) / 2,
- ps->prim_start[i], ps->prim_stop[i], ps->prim_stop[i] - ps->prim_start[i], labels[i]);
+ for (int i = 0; i < ARRAY_SIZE(labels); i++) {
+ int register_idx = i + (counter_base - REG_A6XX_RBBM_PRIMCTR_0_LO) / 2;
+ printf(" RBBM_PRIMCTR_%d\t0x%016"PRIx64"\t0x%016"PRIx64"\t%"PRIi64"\t%s\n",
+ register_idx,
+ ps->prim_start[i], ps->prim_stop[i], ps->prim_stop[i] - ps->prim_start[i],
+ labels[register_idx]);
}
printf(" so counts\n");
for (int i = 0; i < ARRAY_SIZE(ps->start); i++) {
- printf(" CHANNEL %d emitted\t0x%016llx\t0x%016llx\t%lld\n",
+ printf(" CHANNEL %d emitted\t0x%016"PRIx64"\t0x%016"PRIx64"\t%"PRIi64"\n",
i, ps->start[i].generated, ps->stop[i].generated, ps->stop[i].generated - ps->start[i].generated);
- printf(" CHANNEL %d generated\t0x%016llx\t0x%016llx\t%lld\n",
+ printf(" CHANNEL %d generated\t0x%016"PRIx64"\t0x%016"PRIx64"\t%"PRIi64"\n",
i, ps->start[i].emitted, ps->stop[i].emitted, ps->stop[i].emitted - ps->start[i].emitted);
}
- printf("generated %lld, emitted %lld\n", ps->result.generated, ps->result.emitted);
+ printf("generated %"PRIu64", emitted %"PRIu64"\n", ps->result.generated, ps->result.emitted);
}
#else
More information about the mesa-commit
mailing list