Skip to content

wsi/x11: Synchronously check for error from xcb_present_pixmap

Adam Jackson requested to merge ajax/mesa:wsi-x11-checked-present into main

Yes this is a round trip, but X_PresentPixmap is not itself a blocking operation, it just instructs the server to do the next presentation at some time. More importantly, if we don't catch the presentation error, xlib's error queue will, and the calling code is certainly not prepared to handle errors from Present.

Forcing the round trip here is also a bit more correct semantically. This is the end of the Vulkan client part of the present queue, and the X_PresentPixmap request transfers the queue operation to the server, so we should not return until we are sure the handoff has happened.

Fixes some flakiness with piglit@glx-visual-stencil with zink+radv.

Merge request reports