[libdrm,8/9] panfrost/midgard: Move requirement setting into panfrost_job

Submitted by Rohan Garg on June 12, 2019, 11:24 a.m.

Details

Message ID 20190612112439.7483-9-rohan.garg@collabora.com
State New
Headers show
Series "panfrost/midgard: Refactor pan_context" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Rohan Garg June 12, 2019, 11:24 a.m.
Move panfrost_job_set_requirements into panfrost_get_job_for_fbo,
requirements should be set when acquiring a job from a context.
---
 src/gallium/drivers/panfrost/pan_context.c | 2 --
 src/gallium/drivers/panfrost/pan_job.c     | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index ced25cf4b82..00acb464bc6 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -872,8 +872,6 @@  panfrost_emit_for_draw(struct panfrost_context *ctx, bool with_vertex_data)
                 SET_BIT(ctx->fragment_shader_core.unknown2_4, MALI_NO_MSAA, !msaa);
         }
 
-        panfrost_job_set_requirements(ctx, job);
-
         if (ctx->occlusion_query) {
                 ctx->payload_tiler.gl_enables |= MALI_OCCLUSION_QUERY | MALI_OCCLUSION_PRECISE;
                 ctx->payload_tiler.postfix.occlusion_counter = ctx->occlusion_query->transfer.gpu;
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index 3ae7450c189..86fb24a119b 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -109,6 +109,7 @@  panfrost_get_job_for_fbo(struct panfrost_context *ctx)
         struct pipe_surface **cbufs = ctx->pipe_framebuffer.cbufs;
         struct pipe_surface *zsbuf = ctx->pipe_framebuffer.zsbuf;
         struct panfrost_job *job = panfrost_get_job(ctx, cbufs, zsbuf);
+        panfrost_job_set_requirements(ctx, job);
 
         return job;
 }