Discussion:
[PATCH wayland-protocols 0/3] Updates to linux-explicit-synchronization
(too old to reply)
Alexandros Frantzis
2018-11-29 09:35:27 UTC
Permalink
A series of assorted updates and clarifications for the
linux-explicit-synchronization protocol.

Alexandros Frantzis (3):
linux-explicit-synchronization: Allow fences with opaque EGL buffers
linux-explicit-synchronization: Warn about using the protocol while
using graphics APIs
linux-explicit-synchronization: Clarify implicit synchronization
guarantees of release events

...x-explicit-synchronization-unstable-v1.xml | 29 ++++++++++++++++---
1 file changed, 25 insertions(+), 4 deletions(-)
--
2.19.2
Alexandros Frantzis
2018-11-29 09:35:28 UTC
Permalink
Add opaque EGL buffers to the supported buffer types for use with the
explicit synchronization protocol. Opaque EGL buffers rely on the same
EGL implementation in both the compositor and clients, which makes it
straightforward to manage client expectations about fence support for
such buffers.

Also make it clearer that implementations are free to support other
buffer types beyond the required ones.

Signed-off-by: Alexandros Frantzis <***@collabora.com>
---
.../linux-explicit-synchronization-unstable-v1.xml | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml b/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml
index db36284..5809b42 100644
--- a/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml
+++ b/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml
@@ -26,7 +26,7 @@
DEALINGS IN THE SOFTWARE.
</copyright>

- <interface name="zwp_linux_explicit_synchronization_v1" version="1">
+ <interface name="zwp_linux_explicit_synchronization_v1" version="2">
<description summary="protocol for providing explicit synchronization">
This global is a factory interface, allowing clients to request
explicit synchronization for buffers on a per-surface basis.
@@ -76,7 +76,7 @@
</request>
</interface>

- <interface name="zwp_linux_surface_synchronization_v1" version="1">
+ <interface name="zwp_linux_surface_synchronization_v1" version="2">
<description summary="per-surface explicit synchronization support">
This object implements per-surface explicit synchronization.

@@ -101,8 +101,13 @@
Each surface can be associated with only one object of this interface at
any time.

- Explicit synchronization is guaranteed to be supported only for buffers
- created with any version of the wp_linux_dmabuf buffer factory.
+ In version 1 of this interface, explicit synchronization is only
+ guaranteed to be supported for buffers created with any version of the
+ wp_linux_dmabuf buffer factory. Version 2 additionally guarantees
+ explicit synchronization support for opaque EGL buffers, which is a type
+ of platform specific buffers described in the EGL_WL_bind_wayland_display
+ extension. Compositors are free to support explicit synchronization for
+ additional buffer types.
</description>

<request name="destroy" type="destructor">
--
2.19.2
Alexandros Frantzis
2018-11-29 09:35:29 UTC
Permalink
Graphics APIs are expected to use this protocol under the hood, and
since there can only be one user of explicit synchronization per
surface, warn about using the protocol directly in such cases.

Signed-off-by: Alexandros Frantzis <***@collabora.com>
---
.../linux-explicit-synchronization-unstable-v1.xml | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml b/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml
index 5809b42..6d5783d 100644
--- a/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml
+++ b/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml
@@ -66,6 +66,12 @@

If the given wl_surface already has an explicit synchronization object
associated, the synchronization_exists protocol error is raised.
+
+ Graphics APIs, like EGL or Vulkan, that manage the buffer queue and
+ commits of a wl_surface themselves, are likely to be using this
+ extension internally. If a client is using such an API for a
+ wl_surface, it should not directly use this extension on that surface,
+ to avoid raising a synchronization_exists protocol error.
</description>

<arg name="id" type="new_id"
--
2.19.2
Alexandros Frantzis
2018-11-29 09:35:30 UTC
Permalink
Clarify that after zwp_buffer_release_v1 events, otherwise unused
buffers can be reused without any additional implicit synchronization.
This is in contrast to wl_buffer.release, which doesn't guarantee that
implicit synchronization is not required to safely use a buffer after
the event is received.

Signed-off-by: Alexandros Frantzis <***@collabora.com>
---
.../linux-explicit-synchronization-unstable-v1.xml | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml b/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml
index 6d5783d..d0a8cf0 100644
--- a/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml
+++ b/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml
@@ -226,6 +226,11 @@
signaled when all operations by the compositor on that buffer for that
commit have finished.

+ Once the fence has signaled, and assuming the associated buffer is not
+ pending release from other wl_surface.commit requests, no additional
+ explicit or implicit synchronization is required to safely reuse or
+ destroy the buffer.
+
This event destroys the zwp_linux_buffer_release_v1 object.
</description>
<arg name="fence" type="fd" summary="fence for last operation on buffer"/>
@@ -238,6 +243,11 @@
using it, or has a guarantee that all its operations on that buffer for
that commit have finished.

+ Once this event is received, and assuming the associated buffer is not
+ pending release from other wl_surface.commit requests, no additional
+ explicit or implicit synchronization is required to safely reuse or
+ destroy the buffer.
+
This event destroys the zwp_linux_buffer_release_v1 object.
</description>
</event>
--
2.19.2
Loading...