-
Notifications
You must be signed in to change notification settings - Fork 342
Add explicit synchronization, with timelines #3282
base: master
Are you sure you want to change the base?
Conversation
aecdc8e
to
d68dfb4
Compare
From a first glance, the API should work for Vulkan. But we need some additional guarantees/documentation. How does a renderer know whether implicit or explicit sync is used for a render buffer? Is a single call to signal_timeline enough to inform the renderer that rendering does not have to be finished by the time renderer_end returns? This is important for Vulkan. I would prefer an explicit parameter to renderer_begin or renderer_end to select the sync mode. |
wlr_timeline is a synchronization primitive based on drm_syncobj timelines. They are heavily inspired from Vulkan timeline semaphores [1]. [1]: https://www.khronos.org/blog/vulkan-timeline-semaphores
Same as wlr_render_timeline_import_sync_file, but takes a DMA-BUF as argument. Depends on [1]. [1]: https://lore.kernel.org/dri-devel/[email protected]/
d68dfb4
to
eb623cb
Compare
Added some documentation. @jbeich, what's the correct way to grab |
6524855
to
5c8db60
Compare
This patch adds support for the linux-explicit-synchronization-unstable-v1 protocol. To test, run weston-simple-dmabuf-egl.
5c8db60
to
f80f89b
Compare
Until https://reviews.freebsd.org/D23085 or https://github.com/evadot/drm-subtree lands probably making a private copy of uapi headers (a la Mesa) or their contents. @evadot, may know more. |
See also FreeBSDDesktop/kms-drm#156 |
Yeah we don't have a good way to provide them for now so having a copy would be easier for us. |
wlroots has migrated to gitlab.freedesktop.org. This pull request has been moved to: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3282 |
This PR implements explicit synchronization. Unlike previous attempts, it uses a timeline abstraction based on drm_syncobj like Vulkan.
To inter-operate with other APIs (KMS, EGL, linux-explicit-synchronization-v1), the timeline points can be converted from/to sync_file FDs.
Test with:
build/examples/explicit-sync -s weston-simple-dmabuf-egl
. UseWAYLAND_DEBUG=server
to check that fences are exchanged. To test the DMA-BUF sync_file extraction, useweston-simple-egl
as test client (requires kernel patch).TODO:
wlr_texture
upload synchronizationwlr_output_commit
)wlr_render_timeline
Output cursorslet's wait until output layers for thisPrevious work:
Future work: