panfrost: Warn on get_fresh_batch
authorAlyssa Rosenzweig <alyssa@collabora.com>
Mon, 12 Jul 2021 18:09:11 +0000 (14:09 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 14 Jul 2021 17:41:27 +0000 (17:41 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830>

src/gallium/drivers/panfrost/pan_job.c
src/gallium/drivers/panfrost/pan_job.h

index fc9c23d..ffd445a 100644 (file)
@@ -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;
index eba0273..11b2cf3 100644 (file)
@@ -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);