<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Protocol: wl_buffer.release is racy"
href="https://bugs.freedesktop.org/show_bug.cgi?id=75303#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Protocol: wl_buffer.release is racy"
href="https://bugs.freedesktop.org/show_bug.cgi?id=75303">bug 75303</a>
from <span class="vcard"><a class="email" href="mailto:jason@jlekstrand.net" title="Jason Ekstrand <jason@jlekstrand.net>"> <span class="fn">Jason Ekstrand</span></a>
</span></b>
<pre>Pekka already noted my suggestion of reference counting. However, this raises
the issue of compatibility between clients and servers. In particular, if
clients start to implement buffer reference counting, then we need some sort of
a guarantee by the server that it will aid in the reference counting.
Otherwise, in the scenario Pekka describes, the client will wait for two
releases and may only get one
It's worth noting that the usual case of waiting for wl_buffer.release before
attaching again is the same regardless of reference counting because it means
the server has at most one reference. The issue comes in the other cases where
the server may have more references.
One option to solve this would be to add a comment to wl_surface.attach and
bump the wl_surface version. Technically, one would like this to be part of
wl_buffer. However, wl_buffer is typically implemented by either libwayland's
SHM implementation or the system EGL implementation and those never touch
wl_buffer.release except for EGL receiving client-side. There is a slight
issue with EGL not knowing the wl_surface version, however EGL usually has one
buffer pool per surface and commits one buffer at a time. I think we'll
probably be ok here.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>