From e14c29b9f242bb0f795c8adc75c538144726e61f Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 10 Jul 2019 16:33:27 +0200 Subject: [PATCH] zink: document end-of-frame hack Acked-by: Jordan Justen --- src/gallium/drivers/zink/zink_context.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 23971d22762..ca69b1dcdab 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -1133,6 +1133,14 @@ zink_flush(struct pipe_context *pctx, (struct zink_fence **)pfence, batch->fence); + /* HACK: + * For some strange reason, we need to finish before presenting, or else + * we start rendering on top of the back-buffer for the next frame. This + * seems like a bug in the DRI-driver to me, because we really should + * be properly protected by fences here, and the back-buffer should + * either be swapped with the front-buffer, or blitted from. But for + * some strange reason, neither of these things happen. + */ if (flags & PIPE_FLUSH_END_OF_FRAME) pctx->screen->fence_finish(pctx->screen, pctx, (struct pipe_fence_handle *)batch->fence, -- 2.30.2