<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#c5">Comment # 5</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 Jonas Ã…dahl from <a href="show_bug.cgi?id=98731#c0">comment #0</a>)
<span class="quote">> Some uncertainties that needs to be clarified:</span >
>
<span class="quote">> 1) When can wl_surface.attach be expected to take place
> 2) When can wl_surface.commit be expected to take place</span >

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.

<span class="quote">> 3) What is the dimension of the wl_buffer used in 1) and 2)</span >

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.

<span class="quote">> 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).</span >

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.</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>