mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-15 14:18:04 +02:00
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: 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:
parent
6afe042105
commit
b11f0ce609
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue