[Mesa-dev] Threaded Vulkan WSI
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Mon Feb 22 08:28:08 UTC 2021
Hi all,
I'm currently looking at implementing some new features in Vulkan WSI.
One particular feature I would like to add would need to do some processing
on events coming from the compositor/display without waiting for the
application to give us the opportunity to do so (by entering the WSI code
which currently happens on 2 entry points vkAcquireNextImageKHR &
vkQueuePresentKHR).
In other words, this would require a thread to process events.
Looking at the code we currently have for the various backends it seems :
- the x11 backend will sometimes use threads depending on setup options
- the wayland backend doesn't use any thread
- the display backend uses a thread but only to listen to KMS events
I don't have a perfect understanding of the all the WSI issues, but so far
I can't think of a reason why we couldn't have a threaded event processing
for all backends.
My current thinking is that it should be possible to have some kind of
generic messaging mechanism between the Vulkan WSI API and threads
that implement acquire/present operations with a specific window system
API.
Does anybody see a problem with this approach?
Thanks a lot,
-Lionel
More information about the mesa-dev
mailing list