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 <post@arntzen-software.no>
Fixes: 19dba854be ("wsi/x11: Rewrite implementation to always use threads.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10878
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28413>
This commit is contained in:
Hans-Kristian Arntzen
2024-03-26 15:29:33 +01:00
committed by Marge Bot
parent a4231d4f56
commit 5eb0dec525

View File

@@ -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;
}