xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 5 16:03:56 UTC 2019
hw/xwayland/xwayland-glamor-gbm.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
New commits:
commit dabc7d8bf2d964460286168b52899c42b3369f8d
Author: Adam Jackson <ajax at redhat.com>
Date: Wed Oct 30 11:20:40 2019 -0400
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.
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index e3d35ce10..2df12aeaa 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -948,6 +948,21 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen)
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[] = {
+ EGL_CONTEXT_CLIENT_VERSION,
+ 2,
+ EGL_NONE,
+ };
+
+ eglDestroyContext(xwl_screen->egl_display, xwl_screen->egl_context);
+ eglBindAPI(EGL_OPENGL_ES_API);
+ xwl_screen->egl_context = eglCreateContext(xwl_screen->egl_display,
+ NULL, EGL_NO_CONTEXT,
+ gles_attribs);
+ }
+
if (xwl_screen->egl_context == EGL_NO_CONTEXT) {
ErrorF("Failed to create EGL context\n");
goto error;
More information about the xorg-commit
mailing list