aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-07-10 16:33:27 +0200
committerErik Faye-Lund <[email protected]>2019-10-28 08:51:46 +0000
commite14c29b9f242bb0f795c8adc75c538144726e61f (patch)
tree6ecff0fdaf47359d0aa289df97d95aab9b3692b0 /src/gallium/drivers
parent10439594ecec3242d0ca94754bcde521363560d6 (diff)
zink: document end-of-frame hack
Acked-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/zink/zink_context.c8
1 files changed, 8 insertions, 0 deletions
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,