[cogl/cogl-1.22] Use _NO_CONTEXT when creating images for EGL_WAYLAND_BUFFER_WL
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/cogl-1.22] Use _NO_CONTEXT when creating images for EGL_WAYLAND_BUFFER_WL
- Date: Fri, 26 Aug 2016 16:27:01 +0000 (UTC)
commit d91bdc1ec394c51b8665a831400fa8c4ccc573ab
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date: Fri Apr 15 16:00:09 2016 +0200
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
cogl/winsys/cogl-winsys-egl.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
index a53c0c7..39bfd88 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]