summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2016-10-03 15:16:30 -0700
committerEmil Velikov <[email protected]>2016-11-08 16:23:19 +0000
commiteb9236e27591583c8fa20daaeb29bcab1ccb8ad8 (patch)
tree8a26e9467837355da3353fb9883aaba2ed7a3851 /include
parent50afa72f3c8b7c5e6648272e91fd0d1b6b61c406 (diff)
Revert "mesa_glinterop: remove inclusion of GLX header"
This reverts commit 8472045b16b3e4621553fe451a20a9ba9f0d44b6. Conflicts: include/GL/mesa_glinterop.h This patch fixes this build error with GCC 4.4. Compiling src/glx/dri_common_interop.c ... In file included from src/glx/dri_common_interop.c:33: include/GL/mesa_glinterop.h:62: error: redefinition of typedef ‘GLXContext’ include/GL/glx.h:165: note: previous declaration of ‘GLXContext’ was here Fixes: 8472045b16b3 ("mesa_glinterop: remove inclusion of GLX header") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96770 Signed-off-by: Vinson Lee <[email protected]> (cherry picked from commit c10dcb2ce837922c6ee4e191e6d6202098a5ee10) Squashed with commit: mesa_glinterop: allow building without X and related headers This commit effectively reverts c10dcb2ce837922c6ee4e191e6d6202098a5ee10 and fixes the typedef redefinition which inspired it. In order to prevent requiring X packages at build time earlier commit forward declared the required X/GLX typedefs. Since that approach introduced typedef redefinition (a C11 feature) it was reverted. To avoid the redefinition while _not_ mandating X and related headers forward declare the structs and use those through the header. As anyone uses the mesa interop header they ensure that the X (or others in terms of EGL) headers are included, which ensures that everything is resolved within the compilation unit. Cc: Vinson Lee <[email protected]> Cc: "12.0" <[email protected]> Cc: Tapani Pälli <[email protected]> Cc: Chih-Wei Huang <[email protected]> Fixes: c10dcb2ce837 ("Revert "mesa_glinterop: remove inclusion of GLX header"") Fixes: 8472045b16b3 ("mesa_glinterop: remove inclusion of GLX header") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96770 Signed-off-by: Emil Velikov <[email protected]> Tested-by: Vinson Lee <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> (cherry picked from commit c85b34ffd04f9a7a16fe30173474e857d0f42d5f)
Diffstat (limited to 'include')
-rw-r--r--include/GL/mesa_glinterop.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/GL/mesa_glinterop.h b/include/GL/mesa_glinterop.h
index c0c20d6fa66..0b373c1c80f 100644
--- a/include/GL/mesa_glinterop.h
+++ b/include/GL/mesa_glinterop.h
@@ -58,8 +58,8 @@ extern "C" {
#endif
/* Forward declarations to avoid inclusion of GL/glx.h */
-typedef struct _XDisplay Display;
-typedef struct __GLXcontextRec *GLXContext;
+struct _XDisplay;
+struct __GLXcontextRec;
/* Forward declarations to avoid inclusion of EGL/egl.h */
typedef void *EGLDisplay;
@@ -246,7 +246,7 @@ struct mesa_glinterop_export_out {
* \return MESA_GLINTEROP_SUCCESS or MESA_GLINTEROP_* != 0 on error
*/
int
-MesaGLInteropGLXQueryDeviceInfo(Display *dpy, GLXContext context,
+MesaGLInteropGLXQueryDeviceInfo(struct _XDisplay *dpy, struct __GLXcontextRec *context,
struct mesa_glinterop_device_info *out);
@@ -271,7 +271,7 @@ MesaGLInteropEGLQueryDeviceInfo(EGLDisplay dpy, EGLContext context,
* \return MESA_GLINTEROP_SUCCESS or MESA_GLINTEROP_* != 0 on error
*/
int
-MesaGLInteropGLXExportObject(Display *dpy, GLXContext context,
+MesaGLInteropGLXExportObject(struct _XDisplay *dpy, struct __GLXcontextRec *context,
struct mesa_glinterop_export_in *in,
struct mesa_glinterop_export_out *out);
@@ -286,11 +286,11 @@ MesaGLInteropEGLExportObject(EGLDisplay dpy, EGLContext context,
struct mesa_glinterop_export_out *out);
-typedef int (PFNMESAGLINTEROPGLXQUERYDEVICEINFOPROC)(Display *dpy, GLXContext context,
+typedef int (PFNMESAGLINTEROPGLXQUERYDEVICEINFOPROC)(struct _XDisplay *dpy, struct __GLXcontextRec *context,
struct mesa_glinterop_device_info *out);
typedef int (PFNMESAGLINTEROPEGLQUERYDEVICEINFOPROC)(EGLDisplay dpy, EGLContext context,
struct mesa_glinterop_device_info *out);
-typedef int (PFNMESAGLINTEROPGLXEXPORTOBJECTPROC)(Display *dpy, GLXContext context,
+typedef int (PFNMESAGLINTEROPGLXEXPORTOBJECTPROC)(struct _XDisplay *dpy, struct __GLXcontextRec *context,
struct mesa_glinterop_export_in *in,
struct mesa_glinterop_export_out *out);
typedef int (PFNMESAGLINTEROPEGLEXPORTOBJECTPROC)(EGLDisplay dpy, EGLContext context,