Skip to content

vulkan/wsi: check for dri3 buffer initialization failure

Kiskae requested to merge Kiskae/mesa:fix/wsi-dri3-init into main

mesa currently ignored whether dri3 pixmap initialization succeeds resulting in situations where the swapchain appears to be initialized correctly only to be found to be in an invalid state soon after.

Functionally this includes two changes:

  1. If DRI3 pixmap_from_buffer(s) fails VK_ERROR_INITIALIZATION_FAILED is returned instead of VK_SUCCESS
  2. Use of the blocking xcb_request_checked instead of the non-blocking xcb_discard_reply. However xcb_request_checked is used in other places of the initialization code and this code only runs during swapchain initialization so a possible delay is acceptable.

Since the purpose of these functions is to create a pixmap resource from a dma_buf an error indicates that the pixmap has not been created, so the pixmap does not need to be freed.

Closes: #8427 (closed)

Merge request reports