vulkan/wsi/x11: wait for acquirable images in FIFO mode
authorRoman Gilg <subdiff@gmail.com>
Mon, 31 Aug 2020 09:35:16 +0000 (11:35 +0200)
committerRoman Gilg <subdiff@gmail.com>
Tue, 1 Sep 2020 11:59:53 +0000 (13:59 +0200)
commitec5e918ef4911d09b5611773bc58952b13ccef38
tree5315dc2a53f7fa1e4b79289f367202b69a710995
parentd0bc1ad3776bce7d4b356e2a3d8bdbb9ae64e588
vulkan/wsi/x11: wait for acquirable images in FIFO mode

In FIFO presentation mode we block either on our present-queue or on Present
events after an image was transmitted.

In case we receive completion events without idle events at some point we
exhaust our acquire-queue and can not block anymore on present-queue.

Ensure that the consumer has at least one image to acquire before blocking
again on present-queue. Otherwise wait for one from the X server.

CC: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3344
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6513>
src/vulkan/wsi/wsi_common_x11.c