diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index 26ffa902172..5da44dfc270 100644 --- a/src/vulkan/wsi/wsi_common_x11.c +++ b/src/vulkan/wsi/wsi_common_x11.c @@ -1059,7 +1059,14 @@ x11_present_to_x11_dri3(struct x11_swapchain *chain, uint32_t image_index, int64_t divisor = 0; int64_t remainder = 0; + struct wsi_x11_connection *wsi_conn = + wsi_x11_connection_create((struct wsi_device*)chain->base.wsi, chain->conn); + if (!wsi_conn) + return VK_ERROR_OUT_OF_HOST_MEMORY; + if (chain->base.present_mode == VK_PRESENT_MODE_IMMEDIATE_KHR || + (chain->base.present_mode == VK_PRESENT_MODE_MAILBOX_KHR && + wsi_conn->is_xwayland) || chain->base.present_mode == VK_PRESENT_MODE_FIFO_RELAXED_KHR) options |= XCB_PRESENT_OPTION_ASYNC;