#endif
}
-bool dont_scanout = false;
-
void
panfrost_flush(
struct pipe_context *pipe,
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;
}
}
}
-
- /* 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 *
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
/* 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];