[Mesa-dev] [PATCH 1/2] vulkan/wsi: Add a thread-safe queue implementation

Jason Ekstrand jason at jlekstrand.net
Fri Nov 4 17:43:50 UTC 2016


On Fri, Nov 4, 2016 at 9:55 AM, Strasser, Kevin <kevin.strasser at intel.com>
wrote:

> On Thursday, 2016-11-03 20:51:59 -0700, Jason Ekstrand wrote:
> > From: Kevin Strasser <kevin.strasser at intel.com>
> >
> > In order to support FIFO mode without blocking the application on calls
> > to vkQueuePresentKHR it is necessary to enqueue the request and defer
> > calling the server until the next vblank period. The xcb present api
> > doesn't offer a way to register a callback, so we will have to spawn a
> > worker thread that will wait for a request to be added to the queue, call
> > to the server, and then make the image available for reuse.  This commit
> > introduces the queue data structure needed to implement this.
> >
> > Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
>
> With this series applied, I'm having trouble getting the cube demo [1]
> working
> in FIFO mode. It seems to stall out after presenting 2 images. ofc the demo
> could be wrong somehow.


Thanks, I'll take a look.  I just tested with vkcube which probably has
sligntly different semantics.


> Not sure if it is related, but in the threaded case it looks like we dont
> wait
> for xshmfence.
>

Oops... Yeah, we should call that.


> Thanks,
> Kevin
>
> [1] https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/
> blob/master/demos/cube.c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161104/cbb9e164/attachment.html>


More information about the mesa-dev mailing list