Module: Mesa
Branch: main
Commit: 9d3e01ddef12eb43625ba5fd0cb3d4a84761a556
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9d3e01ddef12eb43625ba5fd0cb3d4a84761a556

Author: Alyssa Rosenzweig <[email protected]>
Date:   Sat Oct 29 18:13:16 2022 -0400

panfrost: Print perf debug when flushing everything

..Even if the only batch is the one that's currently bound.

Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21830>

---

 src/gallium/drivers/panfrost/pan_job.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_job.c 
b/src/gallium/drivers/panfrost/pan_job.c
index 16516f11d28..955535c3e01 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -827,16 +827,15 @@ out:
 void
 panfrost_flush_all_batches(struct panfrost_context *ctx, const char *reason)
 {
+   if (reason)
+      perf_debug_ctx(ctx, "Flushing everything due to: %s", reason);
+
    struct panfrost_batch *batch = panfrost_get_batch_for_fbo(ctx);
    panfrost_batch_submit(ctx, batch);
 
    for (unsigned i = 0; i < PAN_MAX_BATCHES; i++) {
-      if (ctx->batches.slots[i].seqnum) {
-         if (reason)
-            perf_debug_ctx(ctx, "Flushing everything due to: %s", reason);
-
+      if (ctx->batches.slots[i].seqnum)
          panfrost_batch_submit(ctx, &ctx->batches.slots[i]);
-      }
    }
 }
 

Reply via email to