panfrost: Print perf debug when flushing everything
authorAlyssa Rosenzweig <alyssa@collabora.com>
Sat, 29 Oct 2022 22:13:16 +0000 (18:13 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 30 Mar 2023 22:53:16 +0000 (22:53 +0000)
..Even if the only batch is the one that's currently bound.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21830>

src/gallium/drivers/panfrost/pan_job.c

index 16516f1..955535c 100644 (file)
@@ -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]);
-      }
    }
 }