vulkan/wsi/wayland: fix suboptimal flag being ignored with explicit sync

Signed-off-by: llyyr <llyyr.public@gmail.com>
Fixes: 5f7a5a27ef ("wsi: Implement linux-drm-syncobj-v1")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31122>
(cherry picked from commit 5450306a36)
This commit is contained in:
llyyr 2024-09-11 03:43:38 +05:30 committed by Eric Engestrom
parent 7e5192cbea
commit c489fe8d1d
2 changed files with 5 additions and 2 deletions

View file

@ -674,7 +674,7 @@
"description": "vulkan/wsi/wayland: fix suboptimal flag being ignored with explicit sync",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "5f7a5a27ef1b630bd1aea0cc0b1256fadee9de8e",
"notes": null

View file

@ -1907,8 +1907,11 @@ wsi_wl_swapchain_acquire_next_image_explicit(struct wsi_swapchain *wsi_chain,
#endif
STACK_ARRAY_FINISH(images);
if (result == VK_SUCCESS)
if (result == VK_SUCCESS) {
chain->images[*image_index].flow_id = id;
if (chain->suboptimal)
result = VK_SUBOPTIMAL_KHR;
}
return result;
}