mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-04 23:28:05 +02:00
glamor: 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.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96344
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit d798b8318a)
This commit is contained in:
parent
e02d217457
commit
e4bf0e5ad5
1 changed files with 6 additions and 5 deletions
|
|
@ -823,11 +823,6 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
|
|||
|
||||
glamor_egl->has_gem = glamor_egl_check_has_gem(fd);
|
||||
|
||||
#ifndef GLAMOR_GLES2
|
||||
eglBindAPI(EGL_OPENGL_API);
|
||||
#else
|
||||
eglBindAPI(EGL_OPENGL_ES_API);
|
||||
#endif
|
||||
if (!eglInitialize
|
||||
(glamor_egl->display, &glamor_egl->major, &glamor_egl->minor)) {
|
||||
xf86DrvMsg(scrn->scrnIndex, X_ERROR, "eglInitialize() failed\n");
|
||||
|
|
@ -835,6 +830,12 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
|
|||
goto error;
|
||||
}
|
||||
|
||||
#ifndef GLAMOR_GLES2
|
||||
eglBindAPI(EGL_OPENGL_API);
|
||||
#else
|
||||
eglBindAPI(EGL_OPENGL_ES_API);
|
||||
#endif
|
||||
|
||||
version = eglQueryString(glamor_egl->display, EGL_VERSION);
|
||||
xf86Msg(X_INFO, "%s: EGL version %s:\n", glamor_name, version);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue