summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2016-04-15 16:00:09 +0200
committerEmmanuele Bassi <ebassi@gnome.org>2016-08-26 17:18:16 +0100
commitd91bdc1ec394c51b8665a831400fa8c4ccc573ab (patch)
treeef71da62ec224045f81758972851c74313edb08d
parentebc105c3beb575a57a57fc88b5fe72a572794fcf (diff)
downloadcogl-d91bdc1ec394c51b8665a831400fa8c4ccc573ab.tar.gz
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 WL_bind_wayland_display 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=765351
-rw-r--r--cogl/winsys/cogl-winsys-egl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
index a53c0c7d..39bfd884 100644
--- a/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/winsys/cogl-winsys-egl.c
@@ -1029,6 +1029,13 @@ _cogl_egl_create_image (CoglContext *ctx,
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;
return egl_renderer->pf_eglCreateImage (egl_renderer->edpy,