From c489fe8d1d1d4e207ee6b5d90427bab116e0fbae Mon Sep 17 00:00:00 2001 From: llyyr Date: Wed, 11 Sep 2024 03:43:38 +0530 Subject: [PATCH] vulkan/wsi/wayland: fix suboptimal flag being ignored with explicit sync Signed-off-by: llyyr Fixes: 5f7a5a27ef1b ("wsi: Implement linux-drm-syncobj-v1") Part-of: (cherry picked from commit 5450306a36355327a1b1eedceeacd787482c08e0) --- .pick_status.json | 2 +- src/vulkan/wsi/wsi_common_wayland.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 9b66c37905d..1e8f6cbe42d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index 1658613d2f1..fc208057298 100644 --- a/src/vulkan/wsi/wsi_common_wayland.c +++ b/src/vulkan/wsi/wsi_common_wayland.c @@ -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; }