[Mesa-dev] [PATCH 4/6] egl: fix the EGL_MESA_image_dma_buf_export header declarations

Emil Velikov emil.l.velikov at gmail.com
Mon May 11 15:43:47 PDT 2015

Similar to other EGL extensions - guard the function prototypes by
EGL_EGLEXT_PROTOTYPES as the libEGL library does (should) not provide
the symbols statically.

Instead users should call eglGetProcAddress, which returns the function
pointer. The latter of which was missing the type declaration (typedef).

Dave, Marc-André,

I'm not sure if we have any users of these two new functions. If we do,
can we use eglGetProcAddress so that the things don't "explode" with
other EGL implementations.


Cc: Dave Airlie <airlied at redhat.com>
Cc: Marc-André Lureau <marcandre.lureau at gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
 include/EGL/eglmesaext.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/EGL/eglmesaext.h b/include/EGL/eglmesaext.h
index 27cf7eb..40a60ec 100644
--- a/include/EGL/eglmesaext.h
+++ b/include/EGL/eglmesaext.h
@@ -127,10 +127,16 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOK) (EGLDisplay dpy, EG
 #ifndef EGL_MESA_image_dma_buf_export
 #define EGL_MESA_image_dma_buf_export 1
 EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageQueryMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *fourcc, EGLint *nplanes, EGLuint64KHR *modifiers);
 EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageMESA (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEQUERYMESA) (EGLDisplay dpy, EGLImageKHR image, EGLint *fourcc, EGLint *nplanes, EGLuint64KHR *modifiers);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEMESA) (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets);
 #ifdef __cplusplus

More information about the mesa-dev mailing list