Skip to content
Snippets Groups Projects
Commit 2ef6b0aa authored by Renato Pereyra's avatar Renato Pereyra Committed by Marge Bot
Browse files

Revert "wsi/x11: Avoid using xcb_wait_for_special_event in FIFO modes"


This reverts commit 44a20bae.

Signed-off-by: default avatarRenato Pereyra <renatopereyra@chromium.org>
Reviewed-by: default avatarYiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
Part-of: <mesa/mesa!16954>
parent ee587f20
No related branches found
No related tags found
No related merge requests found
......@@ -1510,9 +1510,6 @@ x11_manage_fifo_queues(void *state)
goto fail;
if (chain->has_acquire_queue) {
xcb_generic_event_t *event = NULL;
xcb_connection_t *conn = chain->conn;
/* Assume this isn't a swapchain where we force 5 images, because those
* don't end up with an acquire queue at the moment.
*/
......@@ -1544,34 +1541,19 @@ x11_manage_fifo_queues(void *state)
* VUID-vkAcquireNextImageKHR-swapchain-01802 */
x11_driver_owned_images(chain) < forward_progress_guaranteed_acquired_images) {
event = xcb_poll_for_special_event(conn, chain->special_event);
if (event) {
result = x11_handle_dri3_present_event(chain, (void *)event);
/* Ensure that VK_SUBOPTIMAL_KHR is reported to the application */
result = x11_swapchain_result(chain, result);
free(event);
if (result < 0)
goto fail;
continue;
}
if (chain->status < 0 || xcb_connection_has_error(conn)) {
xcb_generic_event_t *event =
xcb_wait_for_special_event(chain->conn, chain->special_event);
if (!event) {
result = VK_ERROR_SURFACE_LOST_KHR;
goto fail;
}
/* poke the window to see if it got destroyed from under us, and
* to flush any pending special events out of the server
*/
xcb_get_geometry_reply_t *geometry =
xcb_get_geometry_reply(conn,
xcb_get_geometry(conn, chain->window),
NULL);
if (geometry == NULL) {
result = VK_ERROR_SURFACE_LOST_KHR;
result = x11_handle_dri3_present_event(chain, (void *)event);
/* Ensure that VK_SUBOPTIMAL_KHR is reported to the application */
result = x11_swapchain_result(chain, result);
free(event);
if (result < 0)
goto fail;
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment