aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2017-02-20 09:50:55 +0000
committerGerd Hoffmann <kraxel@redhat.com>2017-02-20 12:46:09 +0100
commit0ea1523fb6703aa0dcd65e66b59e96fec028e60a (patch)
treee56c525d284bbd3de4c2d302f9fc6e7eed4f4e5c /ui
parent7b5255083b7965b427052b5a0b911e51556139ca (diff)
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>
Diffstat (limited to 'ui')
-rw-r--r--ui/egl-helpers.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c
index 417462b76d..584dd1b04d 100644
--- a/ui/egl-helpers.c
+++ b/ui/egl-helpers.c
@@ -223,7 +223,11 @@ int qemu_egl_init_dpy(EGLNativeDisplayType dpy, bool gles, bool debug)
}
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);
+#endif
if (qemu_egl_display == EGL_NO_DISPLAY) {
error_report("egl: eglGetDisplay failed");
return -1;