summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglapi.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-06-17 17:09:01 +0800
committerChia-I Wu <[email protected]>2010-06-23 15:14:59 +0800
commit78d70ddbbd41d73b7f6040f392eb87758c39dc37 (patch)
tree9f0e271860c6f922c4a671d836fa402b3d10bdac /src/egl/main/eglapi.c
parentf22665df95406567193dee0089f4830664ff4101 (diff)
egl: Add support for EGL_MESA_drm_display.
The extension defines eglGetDRMDisplay that creates an EGLDisplay from a DRM fd. Calling eglCreateWindowSurace or eglCreatePixmapSurface with such displays will generate EGL_BAD_NATIVE_WINDOW or EGL_BAD_NATIVE_PIXMAP.
Diffstat (limited to 'src/egl/main/eglapi.c')
-rw-r--r--src/egl/main/eglapi.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 32a79d8a199..1ec1486d3fc 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -843,6 +843,9 @@ eglGetProcAddress(const char *procname)
{ "eglQueryScreenModeMESA", (_EGLProc) eglQueryScreenModeMESA },
{ "eglQueryModeStringMESA", (_EGLProc) eglQueryModeStringMESA },
#endif /* EGL_MESA_screen_surface */
+#ifdef EGL_MESA_drm_display
+ { "eglGetDRMDisplayMESA", (_EGLProc) eglGetDRMDisplayMESA },
+#endif
#ifdef EGL_KHR_image_base
{ "eglCreateImageKHR", (_EGLProc) eglCreateImageKHR },
{ "eglDestroyImageKHR", (_EGLProc) eglDestroyImageKHR },
@@ -1105,6 +1108,17 @@ eglQueryModeStringMESA(EGLDisplay dpy, EGLModeMESA mode)
#endif /* EGL_MESA_screen_surface */
+#ifdef EGL_MESA_drm_display
+
+EGLDisplay EGLAPIENTRY
+eglGetDRMDisplayMESA(int fd)
+{
+ _EGLDisplay *dpy = _eglFindDisplay(_EGL_PLATFORM_DRM, (void *) fd);
+ return _eglGetDisplayHandle(dpy);
+}
+
+#endif /* EGL_MESA_drm_display */
+
/**
** EGL 1.2
**/