From: Rohan Garg Date: Wed, 5 Jun 2019 15:23:54 +0000 (+0200) Subject: panfrost: Reset job counters once the job is submitted X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=debb85d1ecccaad237261906186a2612f951a9b8;p=mesa.git panfrost: Reset job counters once the job is submitted Move the reset out of frame invalidation into job submission Reviewed-by: Alyssa Rosenzweig --- diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 9b6ab41373d..0441c3d573c 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -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 diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index 1e09760871c..333c9f1f147 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -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