From a6e63d01e87bc9c0bcea1e4a58dbf62a80d04e61 Mon Sep 17 00:00:00 2001 From: llyyr Date: Mon, 11 May 2026 20:46:56 +0530 Subject: [PATCH] vulkan/wsi/wayland: use mtx helpers in wait_for_present2 present_ids.lock is a mtx_t object, and the rest of the file already uses mtx_(un)lock helpers. Fixes: 3023f31cadc9 ("wsi/wayland: Add support for PresentWait2") Signed-off-by: llyyr (cherry picked from commit b11f0ce609e4b38bc889b9d4d727a6b78e6035a7) Part-of: --- .pick_status.json | 2 +- src/vulkan/wsi/wsi_common_wayland.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 71300a39198..5ca2e50e93c 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -724,7 +724,7 @@ "description": "vulkan/wsi/wayland: use mtx helpers in wait_for_present2", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "3023f31cadc9a384f0d72832bfca5e05ce0ce89c", "notes": null diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index e3af0d9d791..d12635eb3e9 100644 --- a/src/vulkan/wsi/wsi_common_wayland.c +++ b/src/vulkan/wsi/wsi_common_wayland.c @@ -2701,12 +2701,12 @@ wsi_wl_swapchain_wait_for_present2(struct wsi_swapchain *wsi_chain, return result; while (1) { - err = pthread_mutex_lock(&chain->present_ids.lock); - if (err != 0) + err = mtx_lock(&chain->present_ids.lock); + if (err != thrd_success) return VK_ERROR_OUT_OF_DATE_KHR; bool completed = chain->present_ids.max_completed >= present_id; - pthread_mutex_unlock(&chain->present_ids.lock); + mtx_unlock(&chain->present_ids.lock); if (completed) return VK_SUCCESS;