We are currently experiencing downtime impacting viewing & cloning the Mesa repo, and some GitLab pages returning 503. Please see #freedesktop on IRC for more updates.

Commit e3bfee18 authored by Armin Krezović's avatar Armin Krezović Committed by Daniel Stone

gl-renderer: Use EGL_KHR_no_config_context

This patch makes use of recently implemented
EGL_KHR_no_config_context extension in Mesa,
which superseeds EGL_MESA_configless_context.

See also (and the follow-up patch):

https://lists.freedesktop.org/archives/mesa-dev/2016-September/128510.html

v2:

 - Extend existing infrastructure for EGL_MESA_configless_context
   per suggestion from Emmanuel Gil Peyrot.
Signed-off-by: default avatarArmin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
parent c3ded660
......@@ -2660,8 +2660,8 @@ gl_renderer_create_window_surface(struct gl_renderer *gr,
if (egl_config != gr->egl_config &&
!gr->has_configless_context) {
weston_log("attempted to use a different EGL config for an "
"output but EGL_MESA_configless_context is not "
"supported\n");
"output but EGL_KHR_no_config_context or "
"EGL_MESA_configless_context is not supported\n");
return EGL_NO_SURFACE;
}
......@@ -2853,7 +2853,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");
if (weston_check_egl_extension(extensions, "EGL_MESA_configless_context"))
if (weston_check_egl_extension(extensions, "EGL_KHR_no_config_context") ||
weston_check_egl_extension(extensions, "EGL_MESA_configless_context"))
gr->has_configless_context = 1;
if (weston_check_egl_extension(extensions, "EGL_KHR_surfaceless_context"))
......@@ -3234,7 +3235,7 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
context_config = gr->egl_config;
if (gr->has_configless_context)
context_config = EGL_NO_CONFIG_MESA;
context_config = EGL_NO_CONFIG_KHR;
gr->egl_context = eglCreateContext(gr->egl_display, context_config,
EGL_NO_CONTEXT, context_attribs);
......
......@@ -135,6 +135,10 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay
#define EGL_NO_CONFIG_MESA ((EGLConfig)0)
#endif
#ifndef EGL_NO_CONFIG_KHR
#define EGL_NO_CONFIG_KHR ((EGLConfig)0)
#endif
#ifndef EGL_EXT_platform_base
#define EGL_EXT_platform_base 1
typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment