struct pipe_fence_handle **fence,
struct panfrost_job *job)
{
- struct pipe_context *gallium = (struct pipe_context *) ctx;
- struct panfrost_screen *screen = pan_screen(gallium->screen);
-
panfrost_job_submit(ctx, job);
/* If visual, we can stall a frame */
if (!flush_immediate)
panfrost_drm_force_flush_fragment(ctx, fence);
- screen->last_fragment_flushed = false;
- screen->last_job = job;
+ ctx->last_fragment_flushed = false;
+ ctx->last_job = job;
/* If readback, flush now (hurts the pipelined performance) */
if (flush_immediate)
assert(ctx->blitter);
assert(ctx->blitter_wallpaper);
+ ctx->last_fragment_flushed = true;
+ ctx->last_job = NULL;
+
/* Prepare for render! */
panfrost_job_init(ctx);
bool is_t6xx;
uint32_t out_sync;
+
+ /* While we're busy building up the job for frame N, the GPU is
+ * still busy executing frame N-1. So hold a reference to
+ * yesterjob */
+ int last_fragment_flushed;
+ struct panfrost_job *last_job;
};
/* Corresponds to the CSO */
struct pipe_context *gallium = (struct pipe_context *) ctx;
struct panfrost_screen *screen = pan_screen(gallium->screen);
- if (!screen->last_fragment_flushed) {
+ if (!ctx->last_fragment_flushed) {
drmSyncobjWait(screen->fd, &ctx->out_sync, 1, INT64_MAX, 0, NULL);
- screen->last_fragment_flushed = true;
+ ctx->last_fragment_flushed = true;
/* The job finished up, so we're safe to clean it up now */
- panfrost_free_job(ctx, screen->last_job);
+ panfrost_free_job(ctx, ctx->last_job);
}
if (fence) {
screen->base.fence_finish = panfrost_fence_finish;
screen->base.set_damage_region = panfrost_resource_set_damage_region;
- screen->last_fragment_flushed = true;
- screen->last_job = NULL;
-
panfrost_resource_screen_init(screen);
return &screen->base;
* Each bucket is a linked list of free panfrost_bo objects. */
struct list_head bo_cache[NR_BO_CACHE_BUCKETS];
-
- /* While we're busy building up the job for frame N, the GPU is
- * still busy executing frame N-1. So hold a reference to
- * yesterjob */
- int last_fragment_flushed;
- struct panfrost_job *last_job;
};
static inline struct panfrost_screen *