Mesa (main): zink: only get swapchain present semaphore on batch flush if not presented
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 8 20:04:09 UTC 2022
Module: Mesa
Branch: main
Commit: b3ee943050342a54a2009e9e91eab860c6e5cfd7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b3ee943050342a54a2009e9e91eab860c6e5cfd7
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
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 <airlied at redhat.com>
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;
}
More information about the mesa-commit
mailing list