[Mesa-dev] [PATCH 4/4] panfrost/nondrm: Split out dump_counters
Alyssa Rosenzweig
alyssa at rosenzweig.io
Fri Feb 22 23:56:27 UTC 2019
Previously, this function was implied a part of the job submit.
Signed-off-by: Alyssa Rosenzweig <alyssa at rosenzweig.io>
---
src/gallium/drivers/panfrost/pan_context.c | 2 ++
src/gallium/drivers/panfrost/pan_screen.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index f2bb44d1342..3d610431f9e 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -1537,6 +1537,8 @@ panfrost_submit_frame(struct panfrost_context *ctx, bool flush_immediate)
screen->driver->force_flush_fragment(ctx);
#ifdef DUMP_PERFORMANCE_COUNTERS
+ screen->driver->dump_counters(screen);
+
char filename[128];
snprintf(filename, sizeof(filename), "/dev/shm/frame%d.mdgprf", ++performance_counter_number);
FILE *fp = fopen(filename, "wb");
diff --git a/src/gallium/drivers/panfrost/pan_screen.h b/src/gallium/drivers/panfrost/pan_screen.h
index 1bf46dee6bb..ebca4d37dd1 100644
--- a/src/gallium/drivers/panfrost/pan_screen.h
+++ b/src/gallium/drivers/panfrost/pan_screen.h
@@ -66,6 +66,7 @@ struct panfrost_driver {
void (*free_imported_bo) (struct panfrost_screen *screen,
struct panfrost_bo *bo);
void (*enable_counters) (struct panfrost_screen *screen);
+ void (*dump_counters) (struct panfrost_screen *screen);
};
struct panfrost_screen {
--
2.20.1
More information about the mesa-dev
mailing list