Mesa (main): lavapipe: fix fence handling around wsi submission

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Oct 6 21:06:27 UTC 2021


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Oct  6 17:52:21 2021 +1000

lavapipe: fix fence handling around wsi submission

My previous fix was incorrect, properly fix things so that
fences in acquire get a proper timeline set.

Fixes: 028591954a2d7 ("lvp/fence: quick fix to previous commit.")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13218>

---

 src/gallium/frontends/lavapipe/lvp_wsi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/frontends/lavapipe/lvp_wsi.c b/src/gallium/frontends/lavapipe/lvp_wsi.c
index 6b1ecaacab0..272d4c82505 100644
--- a/src/gallium/frontends/lavapipe/lvp_wsi.c
+++ b/src/gallium/frontends/lavapipe/lvp_wsi.c
@@ -240,6 +240,7 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_AcquireNextImage2KHR(
    LVP_FROM_HANDLE(lvp_fence, fence, pAcquireInfo->fence);
 
    if (fence && (result == VK_SUCCESS || result == VK_SUBOPTIMAL_KHR)) {
+      fence->timeline = p_atomic_inc_return(&device->queue.timeline);
       util_queue_add_job(&device->queue.queue, fence, &fence->fence, queue_thread_noop, NULL, 0);
    }
    return result;



More information about the mesa-commit mailing list