[Mesa-dev] [PATCH v11 07/15] vulkan/wsi/x11: Expand set of swapchain statuses

Daniel Stone daniel at fooishbar.org
Wed Feb 21 15:20:28 UTC 2018


On 21 February 2018 at 14:05, Daniel Stone <daniels at collabora.com> wrote:
> @@ -781,7 +781,7 @@ x11_acquire_next_image_from_queue(struct x11_swapchain *chain,
>     uint32_t image_index;
>     VkResult result = wsi_queue_pull(&chain->acquire_queue,
>                                      &image_index, timeout);
> -   if (result != VK_SUCCESS) {
> +   if (result < 0) {
>        return result;
>     } else if (chain->status != VK_SUCCESS) {
>        return chain->status;
> [...]
> @@ -885,15 +885,15 @@ x11_manage_fifo_queues(void *state)
>         */
>        uint32_t image_index;
>        result = wsi_queue_pull(&chain->present_queue, &image_index, INT64_MAX);
> -      if (result != VK_SUCCESS) {
> +      if (result < 0) {
>           goto fail;

A different version of the compiler points out that this should be
'result < 0 || result != VK_TIMEOUT' instead.

Cheers,
Daniel


More information about the mesa-dev mailing list