summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTomeu Vizoso <[email protected]>2019-03-27 16:28:35 +0100
committerTomeu Vizoso <[email protected]>2019-03-27 17:03:34 +0100
commitb817d00278a2626a6cf9d74fb6d896e09f0f8be8 (patch)
treef0f264814bf3b25b8f118dfcd098d03600b990f4 /src
parent53ab8122307eb8387c7fde2f149ebba80038af2f (diff)
panfrost: Wait for last job to finish in force_flush_fragment
Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/panfrost/pan_drm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_drm.c b/src/gallium/drivers/panfrost/pan_drm.c
index 887bf19148e..c30beaf2b50 100644
--- a/src/gallium/drivers/panfrost/pan_drm.c
+++ b/src/gallium/drivers/panfrost/pan_drm.c
@@ -296,6 +296,14 @@ panfrost_drm_force_flush_fragment(struct panfrost_context *ctx,
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);