[PATCH weston 4/7] weston-egl-ext.h: add EGL_MESA_configless_context definitions
Emil Velikov
emil.l.velikov at gmail.com
Mon Jul 4 14:27:16 UTC 2016
From: Emil Velikov <emil.velikov at collabora.com>
... and use it in gl-renderer.
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
libweston/gl-renderer.c | 4 ----
libweston/weston-egl-ext.h | 5 +++++
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
index bff74ef..64ef628 100644
--- a/libweston/gl-renderer.c
+++ b/libweston/gl-renderer.c
@@ -2749,10 +2749,8 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
weston_log("warning: EGL_EXT_swap_buffers_with_damage not "
"supported. Performance could be affected.\n");
-#ifdef EGL_MESA_configless_context
if (check_extension(extensions, "EGL_MESA_configless_context"))
gr->has_configless_context = 1;
-#endif
if (check_extension(extensions, "EGL_KHR_surfaceless_context"))
gr->has_surfaceless_context = 1;
@@ -3114,10 +3112,8 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
context_config = gr->egl_config;
-#ifdef EGL_MESA_configless_context
if (gr->has_configless_context)
context_config = EGL_NO_CONFIG_MESA;
-#endif
gr->egl_context = eglCreateContext(gr->egl_display, context_config,
EGL_NO_CONTEXT, context_attribs);
diff --git a/libweston/weston-egl-ext.h b/libweston/weston-egl-ext.h
index 7f69ecb..d79356b 100644
--- a/libweston/weston-egl-ext.h
+++ b/libweston/weston-egl-ext.h
@@ -111,5 +111,10 @@ typedef struct wl_buffer * (EGLAPIENTRYP PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL) (
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
#endif /* EGL_EXT_swap_buffers_with_damage */
+#ifndef EGL_MESA_configless_context
+#define EGL_MESA_configless_context 1
+#define EGL_NO_CONFIG_MESA ((EGLConfig)0)
+#endif
+
#endif
--
2.8.2
More information about the wayland-devel
mailing list