[Mesa-dev] [PATCH 2/3] Revert "panfrost: Figure out job requirements in pan_job.c"
Tomeu Vizoso
tomeu.vizoso at collabora.com
Thu Jun 20 09:18:20 UTC 2019
This reverts commit bfca21b622dfd2fcfe32494339aea9061070c7e5.
---
src/gallium/drivers/panfrost/pan_context.c | 8 ++++++++
src/gallium/drivers/panfrost/pan_job.c | 12 ------------
src/gallium/drivers/panfrost/pan_job.h | 4 ----
3 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index e4a04dd821f5..7c0ba679dd91 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -1056,6 +1056,14 @@ 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;
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index 96f05c663540..14efa71fb055 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -90,7 +90,6 @@ 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;
}
@@ -166,17 +165,6 @@ 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;
-}
-
static uint32_t
pan_pack_color(const union pipe_color_union *color, enum pipe_format format)
{
diff --git a/src/gallium/drivers/panfrost/pan_job.h b/src/gallium/drivers/panfrost/pan_job.h
index 2e7c0532341b..ed63c9c404be 100644
--- a/src/gallium/drivers/panfrost/pan_job.h
+++ b/src/gallium/drivers/panfrost/pan_job.h
@@ -91,10 +91,6 @@ 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);
-
void
panfrost_job_clear(struct panfrost_context *ctx,
struct panfrost_job *job,
--
2.20.1
More information about the mesa-dev
mailing list