Skip to content

vulkan/wsi/x11: Explicitly discard errors from xcb_present_pixmap.

The changes made in 2b885b23 around the call to xcb_present_pixmap remove all handling of errors produced by the call.

I've tracked down some BadWindow errors that appear in my application's X11 event loop to this call to xcb_present_pixmap. Given the fact that the code here appears to not care about whether the call succeeds or fails, it seems to me like it should explicitly discard any errors to avoid them leaking into the application event loop.

x11_present_to_x11_sw, the unaccelerated version of x11_present_to_x11_dri3, invokes xcb_discard_reply after all xcb_put_image calls and before xcb_flush, which fed into my decision to do the same here. Additionally, the above MR does not in any way imply that the change to error handling behavior here is intentional. The intention was to remove the synchronous wait on the completion of the PresentPixmap operation, behavior which is maintained here in addition to now explicitly discarding any potential errors.

Fixes: 2b885b23 ("vk/wsi/x11: stop roundtripping on presentation")

Edited by David Stern

Merge request reports