Mesa (main): zink: ensure pending present flushes are handled during frontbuffer flush

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 28 02:57:46 UTC 2022


Module: Mesa
Branch: main
Commit: 8ab8b729d6576772c1ea49c9351bcf696f498ca2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8ab8b729d6576772c1ea49c9351bcf696f498ca2

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Tue Jun 21 16:24:25 2022 -0400

zink: ensure pending present flushes are handled during frontbuffer flush

Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17149>

---

 src/gallium/drivers/zink/zink_screen.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index 4f8db05b002..ba7eff2a507 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -1430,9 +1430,9 @@ zink_flush_frontbuffer(struct pipe_screen *pscreen,
       pctx = threaded_context_unwrap_sync(pctx);
    pctx = trace_get_possibly_threaded_context(pctx);
    ctx = zink_context(pctx);
-   if (ctx->batch.swapchain) {
+   if (ctx->batch.swapchain || ctx->needs_present) {
       ctx->batch.has_work = true;
-      pctx->flush(pctx, NULL, 0);
+      pctx->flush(pctx, NULL, PIPE_FLUSH_END_OF_FRAME);
       if (ctx->last_fence && screen->threaded) {
          struct zink_batch_state *bs = zink_batch_state(ctx->last_fence);
          util_queue_fence_wait(&bs->flush_completed);



More information about the mesa-commit mailing list