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

Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Apr  8 09:51:57 2022 -0400

zink: only get swapchain present semaphore on batch flush if not presented

otherwise this has already been present-waited and can just be used whenever

Reviewed-by: Dave Airlie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15820>

---

 src/gallium/drivers/zink/zink_batch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_batch.c 
b/src/gallium/drivers/zink/zink_batch.c
index 3382d28b889..1dc01fc75eb 100644
--- a/src/gallium/drivers/zink/zink_batch.c
+++ b/src/gallium/drivers/zink/zink_batch.c
@@ -497,7 +497,7 @@ zink_end_batch(struct zink_context *ctx, struct zink_batch 
*batch)
    batch->work_count = 0;
 
    if (batch->swapchain) {
-      if (batch->swapchain->obj->acquired) {
+      if (batch->swapchain->obj->acquired && !batch->swapchain->obj->present) {
          batch->state->present = zink_kopper_present(screen, batch->swapchain);
          batch->state->swapchain = batch->swapchain;
       }

Reply via email to