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 9b6ab41..0441c3d 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 1e09760..333c9f1 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