summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-02-27 00:30:59 +0000
committerAlyssa Rosenzweig <[email protected]>2019-03-04 04:59:12 +0000
commitc351cc4e94410e76ef0512d4bc503ef90adf3370 (patch)
treed4317f16724b078533434171d170ed53a2a0494f
parent40ffee4448835e04d139657aafdb5919aa5af941 (diff)
panfrost: Cleanup cruft related to clears
Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]>
-rw-r--r--src/gallium/drivers/panfrost/pan_context.c25
-rw-r--r--src/gallium/drivers/panfrost/pan_context.h10
2 files changed, 3 insertions, 32 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index d05863d35a0..f3d53662145 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -1583,8 +1583,6 @@ panfrost_submit_frame(struct panfrost_context *ctx, bool flush_immediate)
#endif
}
-bool dont_scanout = false;
-
void
panfrost_flush(
struct pipe_context *pipe,
@@ -1592,23 +1590,10 @@ panfrost_flush(
unsigned flags)
{
struct panfrost_context *ctx = pan_context(pipe);
+ struct panfrost_job *job = panfrost_get_job_for_fbo(ctx);
- /* If there is nothing drawn, skip the frame */
- if (!ctx->draw_count && !ctx->frame_cleared) return;
-
- if (!ctx->frame_cleared) {
- /* While there are draws, there was no clear. This is a partial
- * update, which needs to be handled via the "wallpaper"
- * method. We also need to fake a clear, just to get the
- * FRAGMENT job correct. */
-
- panfrost_clear(&ctx->base, ctx->last_clear.buffers, ctx->last_clear.color, ctx->last_clear.depth, ctx->last_clear.stencil);
-
- panfrost_draw_wallpaper(pipe);
- }
-
- /* Frame clear handled, reset */
- ctx->frame_cleared = false;
+ /* Nothing to do! */
+ if (!ctx->draw_count && !job->clear) return;
/* Whether to stall the pipeline for immediately correct results */
bool flush_immediate = flags & PIPE_FLUSH_END_OF_FRAME;
@@ -2407,10 +2392,6 @@ panfrost_set_framebuffer_state(struct pipe_context *pctx,
}
}
}
-
- /* Force a clear XXX wrong? */
- if (ctx->last_clear.color)
- panfrost_clear(&ctx->base, ctx->last_clear.buffers, ctx->last_clear.color, ctx->last_clear.depth, ctx->last_clear.stencil);
}
static void *
diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h
index 06c8e69bbe9..b1a0a09146d 100644
--- a/src/gallium/drivers/panfrost/pan_context.h
+++ b/src/gallium/drivers/panfrost/pan_context.h
@@ -121,13 +121,6 @@ struct panfrost_context {
struct panfrost_memory misc_1;
struct panfrost_memory depth_stencil_buffer;
- struct {
- unsigned buffers;
- const union pipe_color_union *color;
- double depth;
- unsigned stencil;
- } last_clear;
-
struct panfrost_query *occlusion_query;
/* Each render job has multiple framebuffer descriptors associated with
@@ -174,9 +167,6 @@ struct panfrost_context {
/* Per-draw Dirty flags are setup like any other driver */
int dirty;
- /* Per frame dirty flag - whether there was a clear. If not, we need to do a partial update, maybe */
- bool frame_cleared;
-
unsigned vertex_count;
union mali_attr attributes[PIPE_MAX_ATTRIBS];