panfrost: Figure out job requirements in pan_job.c
Requirements for a job should be figured out in pan_job.c v2: [Alyssa] Fix early return Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
parent
debb85d1ec
commit
bfca21b622
|
@ -1103,14 +1103,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);
|
||||
}
|
||||
|
||||
/* Enable job requirements at draw-time */
|
||||
|
||||
if (msaa)
|
||||
job->requirements |= PAN_REQ_MSAA;
|
||||
|
||||
if (ctx->depth_stencil->depth.writemask)
|
||||
job->requirements |= PAN_REQ_DEPTH_WRITE;
|
||||
|
||||
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;
|
||||
|
|
|
@ -89,6 +89,7 @@ panfrost_get_job(struct panfrost_context *ctx,
|
|||
|
||||
memcpy(&job->key, &key, sizeof(key));
|
||||
_mesa_hash_table_insert(ctx->jobs, &job->key, job);
|
||||
panfrost_job_set_requirements(ctx, job);
|
||||
|
||||
return job;
|
||||
}
|
||||
|
@ -164,6 +165,17 @@ panfrost_job_submit(struct panfrost_context *ctx, struct panfrost_job *job)
|
|||
ctx->tiler_job_count = 0;
|
||||
}
|
||||
|
||||
void
|
||||
panfrost_job_set_requirements(struct panfrost_context *ctx,
|
||||
struct panfrost_job *job)
|
||||
{
|
||||
if (ctx->rasterizer && ctx->rasterizer->base.multisample)
|
||||
job->requirements |= PAN_REQ_MSAA;
|
||||
|
||||
if (ctx->depth_stencil && ctx->depth_stencil->depth.writemask)
|
||||
job->requirements |= PAN_REQ_DEPTH_WRITE;
|
||||
}
|
||||
|
||||
void
|
||||
panfrost_flush_jobs_reading_resource(struct panfrost_context *panfrost,
|
||||
struct pipe_resource *prsc)
|
||||
|
|
|
@ -90,4 +90,8 @@ panfrost_flush_jobs_reading_resource(struct panfrost_context *panfrost,
|
|||
|
||||
void
|
||||
panfrost_job_submit(struct panfrost_context *ctx, struct panfrost_job *job);
|
||||
|
||||
void
|
||||
panfrost_job_set_requirements(struct panfrost_context *ctx,
|
||||
struct panfrost_job *job);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue