Mesa (main): panfrost: Warn on get_fresh_batch
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 14 18:05:14 UTC 2021
Module: Mesa
Branch: main
Commit: d5fc0ceafda78420094b00d43b6c81c5ea38858d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d5fc0ceafda78420094b00d43b6c81c5ea38858d
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Mon Jul 12 14:09:11 2021 -0400
panfrost: Warn on get_fresh_batch
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830>
---
src/gallium/drivers/panfrost/pan_job.c | 4 +++-
src/gallium/drivers/panfrost/pan_job.h | 3 ++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index fc9c23d0c7c..ffd445a08a4 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -182,7 +182,8 @@ panfrost_get_batch(struct panfrost_context *ctx,
struct panfrost_batch *
panfrost_get_fresh_batch(struct panfrost_context *ctx,
- const struct pipe_framebuffer_state *key)
+ const struct pipe_framebuffer_state *key,
+ const char *reason)
{
struct panfrost_batch *batch = panfrost_get_batch(ctx, key);
@@ -200,6 +201,7 @@ panfrost_get_fresh_batch(struct panfrost_context *ctx,
/* Otherwise, we need to flush the existing one and instantiate a new
* one.
*/
+ perf_debug_ctx(ctx, "Flushing a batch due to: %s", reason);
panfrost_batch_submit(batch, 0, 0);
batch = panfrost_get_batch(ctx, key);
return batch;
diff --git a/src/gallium/drivers/panfrost/pan_job.h b/src/gallium/drivers/panfrost/pan_job.h
index eba02735478..11b2cf38cf0 100644
--- a/src/gallium/drivers/panfrost/pan_job.h
+++ b/src/gallium/drivers/panfrost/pan_job.h
@@ -138,7 +138,8 @@ struct panfrost_batch {
struct panfrost_batch *
panfrost_get_fresh_batch(struct panfrost_context *ctx,
- const struct pipe_framebuffer_state *key);
+ const struct pipe_framebuffer_state *key,
+ const char *reason);
struct panfrost_batch *
panfrost_get_batch_for_fbo(struct panfrost_context *ctx);
More information about the mesa-commit
mailing list