panfrost: Reset job counters once the job is submitted
authorRohan Garg <rohan.garg@collabora.com>
Wed, 5 Jun 2019 15:23:54 +0000 (17:23 +0200)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 18 Jun 2019 16:52:20 +0000 (09:52 -0700)
Move the reset out of frame invalidation into job submission

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_context.c
src/gallium/drivers/panfrost/pan_job.c

index 9b6ab41373d85ab7ae25d7abed9307a3c51cf2c7..0441c3d573c52f3e39b4964dd518d7a8a53b1aca 100644 (file)
@@ -339,11 +339,6 @@ panfrost_invalidate_frame(struct panfrost_context *ctx)
 
         /* XXX */
         ctx->dirty |= PAN_DIRTY_SAMPLERS | PAN_DIRTY_TEXTURES;
-
-        /* Reset job counters */
-        ctx->draw_count = 0;
-        ctx->vertex_job_count = 0;
-        ctx->tiler_job_count = 0;
 }
 
 /* In practice, every field of these payloads should be configurable
index 1e09760871c01ed91c8afae07a990a41ae3373c5..333c9f1f1471a40fac2a6715559ba003b2f792fd 100644 (file)
@@ -158,6 +158,10 @@ panfrost_job_submit(struct panfrost_context *ctx, struct panfrost_job *job)
         if (ret)
                 fprintf(stderr, "panfrost_job_submit failed: %d\n", ret);
 
+        /* Reset job counters */
+        ctx->draw_count = 0;
+        ctx->vertex_job_count = 0;
+        ctx->tiler_job_count = 0;
 }
 
 void