[Wayland-bugs] [Bug 98731] EGL client behaviour too undefined
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Nov 16 10:06:44 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=98731
--- Comment #12 from Daniel Stone <daniel at fooishbar.org> ---
(In reply to Miguel A. Vico from comment #8)
> 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.
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.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20161116/197c2045/attachment-0001.html>
More information about the wayland-bugs
mailing list