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

Strasser, Kevin kevin.strasser at intel.com
Fri Nov 4 16:55:42 UTC 2016


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.

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

Thanks,
Kevin

[1] https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/blob/master/demos/cube.c


More information about the mesa-dev mailing list