[Mesa-dev] [PATCH v11 09/15] vulkan/wsi/x11: Cleanly handle shutdowns in FIFO thread

Jason Ekstrand jason at jlekstrand.net
Wed Feb 21 21:34:05 UTC 2018


On Wed, Feb 21, 2018 at 1:32 PM, Daniel Stone <daniel at fooishbar.org> wrote:

> Hi,
>
> On 21 February 2018 at 20:50, Jason Ekstrand <jason at jlekstrand.net> wrote:
> > On Wed, Feb 21, 2018 at 6:05 AM, Daniel Stone <daniels at collabora.com>
> wrote:
> >> @@ -832,7 +832,7 @@ x11_acquire_next_image_from_queue(struct
> x11_swapchain
> >> *chain,
> >>     VkResult result = wsi_queue_pull(&chain->acquire_queue,
> >>                                      &image_index, timeout);
> >>     /* On error, the thread has shut down, so safe to update
> chain->status
> >> */
> >> -   if (result < 0)
> >> +   if (result < 0 || image_index == UINT32_MAX)
> >
> > This only fixes an issue created by the previous patch.
> >
> >>
> >>        return x11_swapchain_result(chain, result);
> >>
> >>     assert(image_index < chain->base.image_count);
> >> @@ -938,7 +938,7 @@ x11_manage_fifo_queues(void *state)
> >>        result = wsi_queue_pull(&chain->present_queue, &image_index,
> >> INT64_MAX);
> >>        if (result < 0) {
> >>           goto fail;
> >> -      } else if (chain->status < 0) {
> >> +      } else if (chain->status < 0 || image_index == UINT32_MAX) {
> >
> > The one time UINT32_MAX is pushed onto the queue, chain->status is set to
> > VK_ERROR_OUT_OF_DATE_KHR.
>
> Right you are; oops. Should it just be squashed in?
>

Just a second.  Let me send patches.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180221/d705dd84/attachment.html>


More information about the mesa-dev mailing list