From 166d4c817897f5aa197f639bf06b5b3e04994496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 3 Jun 2016 10:25:20 +0900 Subject: [PATCH] xwayland: Call eglBindAPI after eglInitialize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Current Mesa Git master checks that the EGL display actually supports the API passed to eglBindAPI, which can only succeed after eglInitialize. Signed-off-by: Michel Dänzer Reviewed-by: Pekka Paalanen --- hw/xwayland/xwayland-glamor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c index ad66cf643..73ccd716b 100644 --- a/hw/xwayland/xwayland-glamor.c +++ b/hw/xwayland/xwayland-glamor.c @@ -298,12 +298,13 @@ xwl_drm_init_egl(struct xwl_screen *xwl_screen) return; } - eglBindAPI(EGL_OPENGL_API); if (!eglInitialize(xwl_screen->egl_display, &major, &minor)) { ErrorF("eglInitialize() failed\n"); return; } + eglBindAPI(EGL_OPENGL_API); + version = eglQueryString(xwl_screen->egl_display, EGL_VERSION); ErrorF("glamor: EGL version %s:\n", version);