mirror of
https://github.com/qemu/qemu.git
synced 2025-07-27 12:20:07 +00:00
egl-helpers: Support newer MESA versions
According to https://www.khronos.org/registry/EGL/extensions/MESA/EGL_MESA_platform_gbm.txt if MESA_platform_gbm is supported display should be initialized from a GBM handle using eglGetPlatformDisplayEXT. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Message-id: 20170220095055.4234-1-fziglio@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
7b5255083b
commit
0ea1523fb6
@ -223,7 +223,11 @@ int qemu_egl_init_dpy(EGLNativeDisplayType dpy, bool gles, bool debug)
|
|||||||
}
|
}
|
||||||
|
|
||||||
egl_dbg("eglGetDisplay (dpy %p) ...\n", dpy);
|
egl_dbg("eglGetDisplay (dpy %p) ...\n", dpy);
|
||||||
|
#ifdef EGL_MESA_platform_gbm
|
||||||
|
qemu_egl_display = eglGetPlatformDisplayEXT(EGL_PLATFORM_GBM_MESA, dpy, NULL);
|
||||||
|
#else
|
||||||
qemu_egl_display = eglGetDisplay(dpy);
|
qemu_egl_display = eglGetDisplay(dpy);
|
||||||
|
#endif
|
||||||
if (qemu_egl_display == EGL_NO_DISPLAY) {
|
if (qemu_egl_display == EGL_NO_DISPLAY) {
|
||||||
error_report("egl: eglGetDisplay failed");
|
error_report("egl: eglGetDisplay failed");
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user