<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - EGL client behaviour too undefined"
href="https://bugs.freedesktop.org/show_bug.cgi?id=98731#c12">Comment # 12</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - EGL client behaviour too undefined"
href="https://bugs.freedesktop.org/show_bug.cgi?id=98731">bug 98731</a>
from <span class="vcard"><a class="email" href="mailto:daniel@fooishbar.org" title="Daniel Stone <daniel@fooishbar.org>"> <span class="fn">Daniel Stone</span></a>
</span></b>
<pre>(In reply to Miguel A. Vico from <a href="show_bug.cgi?id=98731#c8">comment #8</a>)
<span class="quote">> However, I don't think forcing a wl_surface.attach + wl_surface.commit to
> strictly happen inside eglSwapBuffers() is correct, and will cause other
> interaction issues with, for instance, EGL_NV_stream_fifo_synchronous.
>
> We already have some use cases where fifo_synchronous is used to defer
> wl_surface.attach + wl_surface.damage + wl_surface.commit until the frame is
> finished.
>
> I think those are legitimate use cases that we must take into account.</span >
I agree, but I don't think making posting asynchronous is legitimate. It will
provably break things like subsurfaces, and can get you into deadlock
situations. For better or worse, this is the protocol we have, and we can't
break it with asynchronous submission. Vivante does asynchronous submission
today, and it bites.
The concerns in fifo_synchronous are legitimate, but I'd prefer to see them
addressed in the compositor. In order to minimise latency, we do want to submit
the buffers as early as possible regardless of the transport (Streams or no),
but we don't necessarily want to block the compositor on the slowest of all
clients.
We can solve this generically - including for clients using explicit fencing -
by giving the compositor fences to poll on and allowing it to make a decision
in its repaint loop as to which buffer to use. I'd suggest the best mechanism
would be to allow the compositor to extract an EGLSyncKHR object which will
trigger when the fence is signalled (i.e. buffer ready for immediate use), and
then being able to export that to a native sync FD which the compositor can
then poll on.
This is more work than deferring to an asynchronous { glFinish();
wl_suface_commit(); } thread, but does have the advantage of not breaking
things, and works for more usecases than just Streams.</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>