xwayland: Call eglBindAPI after eglInitialize

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 <michel.daenzer@amd.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
Michel Dänzer 2016-06-03 10:25:20 +09:00 committed by Adam Jackson
parent d798b8318a
commit 166d4c8178

View File

@ -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);