vulkan/wsi/x11: Destroy Present event context when destroying swapchain
authorMichel Dänzer <michel.daenzer@amd.com>
Thu, 28 Jul 2016 08:54:49 +0000 (17:54 +0900)
committerMichel Dänzer <michel@daenzer.net>
Wed, 30 Nov 2016 03:31:25 +0000 (12:31 +0900)
commit550cd272b4b97fc06dbd3b5fad2bf0e5d526236d
tree7e2916e0b2415dcae9106262f6dec519142de120
parent2ea021a1ebb768b13c533f6bea56cdfb4a9cc3b3
vulkan/wsi/x11: Destroy Present event context when destroying swapchain

Without this, the X server may accumulate stale Present event contexts
if a client creates and destroys multiple swapchains using the same
window.

v2: Based on Chris Wilson's review:
* Use xcb_present_select_input_checked so that protocol errors
  generated by old X servers can be handled gracefully
* Use xcb_discard_reply() instead of free(xcb_request_check())
v3: Rebased on top of this code having been refactored out of anv

Reviewed-by: Dave Airlie <airlied@redhat.com>
src/vulkan/wsi/wsi_common_x11.c