Commit dabc7d8b authored by Adam Jackson's avatar Adam Jackson 🎧 Committed by Adam Jackson
Browse files

xwayland: Fall back to GLES2 if we don't get at least GL 2.1 in glamor

Some particularly unfortunate hardware (Intel gen3, mostly) will give
you GLES2 but not GL 2.1. Fall back to GLES2 for such cases so you still
get accelerated GLX.
parent 741bd734
...@@ -948,6 +948,21 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen) ...@@ -948,6 +948,21 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen)
xwl_screen->egl_display, NULL, EGL_NO_CONTEXT, NULL); xwl_screen->egl_display, NULL, EGL_NO_CONTEXT, NULL);
} }
/* glamor needs either big-GL 2.1 or GLES2 */
if (xwl_screen->egl_context && epoxy_gl_version() < 21) {
const EGLint gles_attribs[] = {
eglDestroyContext(xwl_screen->egl_display, xwl_screen->egl_context);
xwl_screen->egl_context = eglCreateContext(xwl_screen->egl_display,
if (xwl_screen->egl_context == EGL_NO_CONTEXT) { if (xwl_screen->egl_context == EGL_NO_CONTEXT) {
ErrorF("Failed to create EGL context\n"); ErrorF("Failed to create EGL context\n");
goto error; goto error;
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