<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Protocol: wl_buffer.release is racy"
href="https://bugs.freedesktop.org/show_bug.cgi?id=75303#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - 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:ppaalanen@gmail.com" title="Pekka Paalanen <ppaalanen@gmail.com>"> <span class="fn">Pekka Paalanen</span></a>
</span></b>
<pre>(In reply to Jonas Ã…dahl from <a href="show_bug.cgi?id=75303#c6">comment #6</a>)
<span class="quote">> Why can't we just let wl_buffer.release simply be a notification about the
> buffer being reusable</span >
Because it has exactly the race explained in the description of this bug. This
example applies particular to Weston with gl-renderer and a client using
wl_shm.
Case A:
client messagebuffer server
surface1.attach(B) ->
surface1.commit ->
-> surface1.attach(B)
-> surface1.commit
surface2.attach(B) ->
surface2.commit ->
-> surface2.attach(B)
-> surface2.commit
repaint, GL texture damage flush
<- B.release
B.release <-
B is free.
Case B:
surface1.attach(B) ->
surface1.commit ->
-> surface1.attach(B)
-> surface1.commit
repaint, GL texture damage flush
<- B.release
surface2.attach(B) ->
surface2.commit ->
-> surface2.attach(B)
-> surface2.commit
B.release <-
B is busy on surface2.
>From the client point of view, cases A and B are equivalent, yet the buffer is
free in one and busy in the other.</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>