This field is never set to anything but NULL, which means the test done in panfrost_free_job() and panfrost_get_job_for_fbo() will always evaluate to false. Let's get rid of this field.
Signed-off-by: Boris Brezillon <boris.brezil...@collabora.com> --- src/gallium/drivers/panfrost/pan_context.h | 3 +-- src/gallium/drivers/panfrost/pan_job.c | 8 -------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h index d930f12a537b..a90dbb04e833 100644 --- a/src/gallium/drivers/panfrost/pan_context.h +++ b/src/gallium/drivers/panfrost/pan_context.h @@ -95,8 +95,7 @@ struct panfrost_context { /* Compiler context */ struct midgard_screen compiler; - /* Bound job and map of panfrost_job_key to jobs */ - struct panfrost_job *job; + /* Map of panfrost_job_key to jobs */ struct hash_table *jobs; /* panfrost_resource -> panfrost_job */ diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index 6339b39d29a0..960c8556e2f0 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -72,9 +72,6 @@ panfrost_free_job(struct panfrost_context *ctx, struct panfrost_job *job) _mesa_hash_table_remove_key(ctx->jobs, &job->key); - if (ctx->job == job) - ctx->job = NULL; - ralloc_free(job); } @@ -122,11 +119,6 @@ panfrost_get_job_for_fbo(struct panfrost_context *ctx) if (ctx->wallpaper_batch) return ctx->wallpaper_batch; - /* If we already began rendering, use that */ - - if (ctx->job) - return ctx->job; - /* If not, look up the job */ struct pipe_surface **cbufs = ctx->pipe_framebuffer.cbufs; -- 2.21.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev