vulkan/wsi/x11: handle timeouts properly in next image acquire (v1.1)
authorDave Airlie <airlied@redhat.com>
Wed, 26 Oct 2016 01:51:27 +0000 (11:51 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 27 Oct 2016 01:42:26 +0000 (11:42 +1000)
commit787c172aed0ae88ca6a8c1a193d9dd744fbdc918
treed0c9000335049d8b5a069669e067e75ecaafe2f1
parentd548fa882b865b8e5052954b872e392312c38ab8
vulkan/wsi/x11: handle timeouts properly in next image acquire (v1.1)

For 0 timeout, just poll for an event, and if none, return
For UINT64_MAX timeout, just wait for special event blocked
For other timeouts get the xcb fd and block on it, decreasing
the timeout if we get woken up for non-special events.

v1.1: return VK_TIMEOUT for poll timeouts.
handle timeout going negative.

Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/vulkan/wsi/wsi_common_x11.c