1
0
Fork 0

Use _NO_CONTEXT when creating images for EGL_WAYLAND_BUFFER_WL

The WL_bind_wayland_display spec says that EGL images should be created
using EGL_WAYLAND_BUFFER_WL as the target and a NULL context. Mesa
seems to be lenient and accept any context, however some other stacks
aren't so forgiving and fail if anything apart from EGL_NO_CONTEXT is
used.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>

https://bugzilla.gnome.org/show_bug.cgi?id=769731
This commit is contained in:
Sjoerd Simons 2016-04-15 16:00:09 +02:00 committed by Rui Matos
parent c8f24721c5
commit 7d9af9585d

View file

@ -1028,6 +1028,13 @@ _cogl_egl_create_image (CoglContext *ctx,
if (target == EGL_NATIVE_PIXMAP_KHR)
egl_ctx = EGL_NO_CONTEXT;
else
#endif
#if COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT
/* The WL_bind_wayland_display spec states that EGL_NO_CONTEXT is to be used
* in conjunction with the EGL_WAYLAND_BUFFER_WL target */
if (target == EGL_WAYLAND_BUFFER_WL)
egl_ctx = EGL_NO_CONTEXT;
else
#endif
egl_ctx = egl_display->egl_context;