[Wayland-bugs] [Bug 98731] EGL client behaviour too undefined

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Nov 15 10:31:49 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=98731

--- Comment #5 from Daniel Stone <daniel at fooishbar.org> ---
(In reply to Jonas Ã…dahl from comment #0)
> Some uncertainties that needs to be clarified:
>
> 1) When can wl_surface.attach be expected to take place
> 2) When can wl_surface.commit be expected to take place

The only way to make this sane (especially with subsurfaces!) is: strictly
inside eglSwapBuffers (i.e. before it returns), and at absolutely no other time
whatsoever. Anything else is going to cause huge issues.

> 3) What is the dimension of the wl_buffer used in 1) and 2)

The semantics that ~everyone has settled on that I'm aware of are, that of the
last wl_egl_window_resize call before the first (E)GL call made after
SwapBuffers. e.g.:
  swap_A = eglSwapBuffers()
  wl_egl_window_resize(size_A)
  wl_egl_window_resize(size_B)
  eglQuerySurface(EGL_BUFFER_AGE);
  wl_egl_window_resize(size_C)
  glClear()
  swap_B = eglSwapBuffers()
  glDrawArrays()
  swap_C = eglSwapBuffers();

Swap B will have size B, and swap C will have size C.

> Some requirements that needs to be met in order to guarantee a correct
> initial frame (as required by the current xdg_shell version):
> 
> a) It must be possible to know when the buffer of the first frame is
> attached and committed so that it is possible to set up the associated state
> (i.e. windew geometry, input region, opaque region etc)
> b) It must be possible to know when buffers of subsequent frames are
> attached and commited so that is possible to set up the same set of
> associated state (i.e. window geometry and input region when a surface is
> resized, or opaque region when the content changes).

Or correctly synchronise subsurface drawing ...

I think documenting it upstream in Wayland and then taking a subset of this
text through Khronos would be the best idea.

-- 
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/20161115/015cd63e/attachment.html>


More information about the wayland-bugs mailing list