aboutsummaryrefslogtreecommitdiffstats
path: root/drmtools-egl.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2017-03-07 16:29:43 +0100
committerGerd Hoffmann <kraxel@redhat.com>2017-03-07 16:29:43 +0100
commit21dfd8748970c484ca9886ee11b6ad33345c98be (patch)
tree978b15cf827a15bf49eb61de6d2b35890f69b633 /drmtools-egl.c
parent073d978789ecd30ca342230c4b5a3bbbf371a88d (diff)
downloadfbida-21dfd8748970c484ca9886ee11b6ad33345c98be.tar.gz
use eglGetPlatformDisplayEXT if available
Diffstat (limited to 'drmtools-egl.c')
-rw-r--r--drmtools-egl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drmtools-egl.c b/drmtools-egl.c
index 01cbab9..49932df 100644
--- a/drmtools-egl.c
+++ b/drmtools-egl.c
@@ -63,7 +63,11 @@ static int drm_setup_egl(void)
return -1;
}
+#ifdef EGL_MESA_platform_gbm
+ dpy = eglGetPlatformDisplayEXT(EGL_PLATFORM_GBM_MESA, gbm_dev, NULL);
+#else
dpy = eglGetDisplay(gbm_dev);
+#endif
if (dpy == EGL_NO_DISPLAY) {
fprintf(stderr, "egl: eglGetDisplay failed\n");
return -1;