Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
struct pipe_fence_handle **fence)
{
struct pipe_context *gallium = (struct pipe_context *) ctx;
+ struct panfrost_screen *screen = pan_screen(gallium->screen);
+ struct panfrost_drm *drm = (struct panfrost_drm *)screen->driver;
+ int ret;
+
+ if (!screen->last_fragment_flushed) {
+ drmSyncobjWait(drm->fd, &ctx->out_sync, 1, INT64_MAX, 0, NULL);
+ screen->last_fragment_flushed = true;
+ }
if (fence) {
struct panfrost_fence *f = panfrost_fence_create(ctx);