vulkan/wsi/wayland: use mtx helpers in wait_for_present2
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

present_ids.lock is a mtx_t object, and the rest of the file already
uses mtx_(un)lock helpers.

Fixes: 3023f31cad ("wsi/wayland: Add support for PresentWait2")
Signed-off-by: llyyr <llyyr.public@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41486>
This commit is contained in:
llyyr 2026-05-11 20:46:56 +05:30 committed by Marge Bot
parent 6afe042105
commit b11f0ce609

View file

@ -2824,12 +2824,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;