<div dir="ltr">I see. Thank you for the info. What i am trying to do is have multiple contexts with its own EGLSurface but sharing the same "window" or wl_surface on wayland, where one thread renders a gl_triangle and the other rendering gears. This was a simple client to teach myself queues and IPC of wayland, ofcourse it doesnt reflect "real world" clients. So with this setup i was wondering if a resize on the wl_egl_window will seamlessly take effect on both EGLSurfaces. Since there is no spec could it be possible that different wayland EGL implementations will have different interpretations on if/how to reuse the wl_egl_window OR are implementations explicitly discouraged, may be to prevent themselves from blowing up in weird ways, from reusing the same wl_egl_window concurrently? Also i am assuming reuse of the wl_egl_window non-concurrently is permitted and wont have issues?</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 27, 2014 at 12:36 AM, Pekka Paalanen <span dir="ltr"><<a href="mailto:ppaalanen@gmail.com" target="_blank">ppaalanen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Sat, 25 Oct 2014 17:14:32 -0700<br>
Virtual Presence <<a href="mailto:virtualpresence.ucla@gmail.com">virtualpresence.ucla@gmail.com</a>> wrote:<br>
<br>
> Hi,<br>
><br>
> I am writing a simple multi-threaded multi-context GLES2 Wayland client. As<br>
> required by Wayland and MESA EGL bindings i do create a wl_egl_window to<br>
> pass on to EGL window surface creation. I was wondering if there is any<br>
> spec or rule that disallows reuse of the same wl_egl_window for multiple<br>
> EGLWindowSurface. I was wondering if i could use the same underlying<br>
> wl_egl_window resize bindings to cause multiple resizes. If i cannot do the<br>
> same i would like to know of a spec/rule/guide (say like an EGL spec) that<br>
> lists all the creation, management, deletion and usage of this object.<br>
<br>
</div></div>Hi,<br>
<br>
I cannot understand what you could possibly achieve by creating several<br>
EGLSurfaces for the same window. What do you want to do?<br>
<br>
Are you perhaps attempting to render different parts of a single window<br>
in different GL contexts and so using different EGLSurfaces with some<br>
clipping magic? Maybe relying that GLX (not EGL IIRC!) required the<br>
color buffers to be shared between clients/contexts?<br>
<br>
Or do you simply want a dummy EGLSurface for each context, and then use<br>
FBOs to do the work, without ever calling eglSwapBuffers except for the<br>
one context that actually draws in the window? Because there are no<br>
Pixmaps in EGL Wayland?<br>
<br>
I can't quote a spec off-hand, but I know the EGL Wayland platform does<br>
not support "partial" rendering. Every time you call eglSwapBuffers,<br>
the whole buffer content must be valid, as the display server is free<br>
to take the whole buffer as the new window contents. That's actually a<br>
Wayland specification: every buffer must be completely drawn, as the<br>
display server is allowed to use all of it, even if the associated<br>
damage is only a part of it.<br>
<br>
So, I don't think it is explicitly forbidden anywhere to create several<br>
EGLSurfaces for the same wl_egl_window, but it just doesn't make sense.<br>
The different (E)GL contexts using the different EGLSurfaces would be<br>
fighting over whose buffer ends up on screen. As such, I expect that<br>
case to be untested, and so likely hit bugs.<br>
<br>
FWIW, you'd be looking for an EGL Wayland platform specification, and<br>
one has not been written AFAIK, as has not been written for many of the<br>
other platforms either.<br>
<br>
<br>
Thanks,<br>
pq<br>
</blockquote></div><br></div>