From 5eb0dec525a2e368d7b2a4cb79264926b51d8f88 Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Tue, 26 Mar 2024 15:29:33 +0100 Subject: [PATCH] wsi/x11: Return OUT_OF_DATE on sw resize. This is more in line with DRI3 path, and fixes a regression since SUBOPTIMAL was not considered correctly. Signed-off-by: Hans-Kristian Arntzen Fixes: 19dba854be0 ("wsi/x11: Rewrite implementation to always use threads.") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10878 Reviewed-By: Mike Blumenkrantz Part-of: --- src/vulkan/wsi/wsi_common_x11.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index 2237d4adf71..f6492d7afb4 100644 --- a/src/vulkan/wsi/wsi_common_x11.c +++ b/src/vulkan/wsi/wsi_common_x11.c @@ -1450,7 +1450,7 @@ x11_present_to_x11_sw(struct x11_swapchain *chain, uint32_t image_index, /* We don't have queued present here. * Immediately let application acquire again, but query geometry first so - * we can report SUBOPTIMAL on resize. */ + * we can report OUT_OF_DATE on resize. */ xcb_generic_error_t *err; xcb_get_geometry_reply_t *geom = xcb_get_geometry_reply(chain->conn, geom_cookie, &err); @@ -1458,7 +1458,7 @@ x11_present_to_x11_sw(struct x11_swapchain *chain, uint32_t image_index, if (geom) { if (chain->extent.width != geom->width || chain->extent.height != geom->height) - result = VK_SUBOPTIMAL_KHR; + result = VK_ERROR_OUT_OF_DATE_KHR; } else { result = VK_ERROR_SURFACE_LOST_KHR; }