diff --git a/cogl/cogl/winsys/cogl-winsys-egl-feature-functions.h b/cogl/cogl/winsys/cogl-winsys-egl-feature-functions.h index 494d5ea39..4b74e2088 100644 --- a/cogl/cogl/winsys/cogl-winsys-egl-feature-functions.h +++ b/cogl/cogl/winsys/cogl-winsys-egl-feature-functions.h @@ -99,6 +99,12 @@ COGL_WINSYS_FEATURE_BEGIN (create_context, COGL_EGL_WINSYS_FEATURE_CREATE_CONTEXT) COGL_WINSYS_FEATURE_END () +COGL_WINSYS_FEATURE_BEGIN (no_config_context, + "KHR\0", + "no_config_context\0", + COGL_EGL_WINSYS_FEATURE_NO_CONFIG_CONTEXT) +COGL_WINSYS_FEATURE_END () + COGL_WINSYS_FEATURE_BEGIN (buffer_age, "EXT\0", "buffer_age\0", diff --git a/cogl/cogl/winsys/cogl-winsys-egl-private.h b/cogl/cogl/winsys/cogl-winsys-egl-private.h index 0c103e9c1..8b6f21406 100644 --- a/cogl/cogl/winsys/cogl-winsys-egl-private.h +++ b/cogl/cogl/winsys/cogl-winsys-egl-private.h @@ -101,6 +101,7 @@ typedef enum _CoglEGLWinsysFeature COGL_EGL_WINSYS_FEATURE_FENCE_SYNC = 1L << 5, COGL_EGL_WINSYS_FEATURE_SURFACELESS_CONTEXT = 1L << 6, COGL_EGL_WINSYS_FEATURE_CONTEXT_PRIORITY = 1L << 7, + COGL_EGL_WINSYS_FEATURE_NO_CONFIG_CONTEXT = 1L << 8, } CoglEGLWinsysFeature; typedef struct _CoglRendererEGL diff --git a/cogl/cogl/winsys/cogl-winsys-egl.c b/cogl/cogl/winsys/cogl-winsys-egl.c index 5986fd1c9..26a3395fe 100644 --- a/cogl/cogl/winsys/cogl-winsys-egl.c +++ b/cogl/cogl/winsys/cogl-winsys-egl.c @@ -428,10 +428,21 @@ try_create_context (CoglDisplay *display, attribs[i++] = EGL_NONE; - egl_display->egl_context = eglCreateContext (edpy, - config, - EGL_NO_CONTEXT, - attribs); + if (egl_renderer->private_features & + COGL_EGL_WINSYS_FEATURE_NO_CONFIG_CONTEXT) + { + egl_display->egl_context = eglCreateContext (edpy, + EGL_NO_CONFIG_KHR, + EGL_NO_CONTEXT, + attribs); + } + else + { + egl_display->egl_context = eglCreateContext (edpy, + config, + EGL_NO_CONTEXT, + attribs); + } if (egl_display->egl_context == EGL_NO_CONTEXT) {