From: Daniel Stone Date: Tue, 19 Jan 2016 16:51:56 +0000 (+0000) Subject: anv/wsi: Avoid stuck Wayland connection X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ba5ef49dcbf9e001231658ad8c6588649a2dbd57;p=mesa.git anv/wsi: Avoid stuck Wayland connection In acquire_next_image, we are waiting for a wl_buffer::release to arrive and release one of the buffers in our swapchain. Most compositors don't explicitly flush release events, so we may need to perform a roundtrip instead, to ensure the event arrives. Signed-off-by: Daniel Stone --- diff --git a/src/vulkan/anv_wsi_wayland.c b/src/vulkan/anv_wsi_wayland.c index 5e8a3a56f68..c8f9cf27ab3 100644 --- a/src/vulkan/anv_wsi_wayland.c +++ b/src/vulkan/anv_wsi_wayland.c @@ -536,8 +536,8 @@ wsi_wl_swapchain_acquire_next_image(struct anv_swapchain *anv_chain, /* This time we do a blocking dispatch because we can't go * anywhere until we get an event. */ - int ret = wl_display_dispatch_queue(chain->display->display, - chain->queue); + int ret = wl_display_roundtrip_queue(chain->display->display, + chain->queue); if (ret < 0) return vk_error(VK_ERROR_OUT_OF_DATE_KHR); }