mirror of https://gitlab.freedesktop.org/mesa/mesa
mesa_glinterop: remove mesa_glinterop typedefs
As is there are two places that do the typedefs - dri_interface.h and this header. As we cannot include the former in here, just drop the typedefs and use the struct directly (as needed). This is required because typedef redefinition is C11 feature which is not supported on all the versions of GCC used to build mesa. v2: Kill the typedef alltogether, as per Marek. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96236 Cc: Vinson Lee <vlee@freedesktop.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
d43c894471
commit
13faddb6b8
|
@ -401,21 +401,21 @@ struct __DRI2fenceExtensionRec {
|
|||
#define __DRI2_INTEROP "DRI2_Interop"
|
||||
#define __DRI2_INTEROP_VERSION 1
|
||||
|
||||
typedef struct _mesa_glinterop_device_info mesa_glinterop_device_info;
|
||||
typedef struct _mesa_glinterop_export_in mesa_glinterop_export_in;
|
||||
typedef struct _mesa_glinterop_export_out mesa_glinterop_export_out;
|
||||
struct mesa_glinterop_device_info;
|
||||
struct mesa_glinterop_export_in;
|
||||
struct mesa_glinterop_export_out;
|
||||
|
||||
struct __DRI2interopExtensionRec {
|
||||
__DRIextension base;
|
||||
|
||||
/** Same as MesaGLInterop*QueryDeviceInfo. */
|
||||
int (*query_device_info)(__DRIcontext *ctx,
|
||||
mesa_glinterop_device_info *out);
|
||||
struct mesa_glinterop_device_info *out);
|
||||
|
||||
/** Same as MesaGLInterop*ExportObject. */
|
||||
int (*export_object)(__DRIcontext *ctx,
|
||||
mesa_glinterop_export_in *in,
|
||||
mesa_glinterop_export_out *out);
|
||||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out);
|
||||
};
|
||||
|
||||
/*@}*/
|
||||
|
|
|
@ -92,7 +92,7 @@ enum {
|
|||
/**
|
||||
* Device information returned by Mesa.
|
||||
*/
|
||||
typedef struct _mesa_glinterop_device_info {
|
||||
struct mesa_glinterop_device_info {
|
||||
/* The caller should set this to the version of the struct they support */
|
||||
/* The callee will overwrite it if it supports a lower version.
|
||||
*
|
||||
|
@ -113,14 +113,14 @@ typedef struct _mesa_glinterop_device_info {
|
|||
uint32_t device_id;
|
||||
|
||||
/* Structure version 1 ends here. */
|
||||
} mesa_glinterop_device_info;
|
||||
};
|
||||
|
||||
#define MESA_GLINTEROP_EXPORT_IN_VERSION 1
|
||||
|
||||
/**
|
||||
* Input parameters to Mesa interop export functions.
|
||||
*/
|
||||
typedef struct _mesa_glinterop_export_in {
|
||||
struct mesa_glinterop_export_in {
|
||||
/* The caller should set this to the version of the struct they support */
|
||||
/* The callee will overwrite it if it supports a lower version.
|
||||
*
|
||||
|
@ -178,14 +178,14 @@ typedef struct _mesa_glinterop_export_in {
|
|||
*/
|
||||
void *out_driver_data;
|
||||
/* Structure version 1 ends here. */
|
||||
} mesa_glinterop_export_in;
|
||||
};
|
||||
|
||||
#define MESA_GLINTEROP_EXPORT_OUT_VERSION 1
|
||||
|
||||
/**
|
||||
* Outputs of Mesa interop export functions.
|
||||
*/
|
||||
typedef struct _mesa_glinterop_export_out {
|
||||
struct mesa_glinterop_export_out {
|
||||
/* The caller should set this to the version of the struct they support */
|
||||
/* The callee will overwrite it if it supports a lower version.
|
||||
*
|
||||
|
@ -233,7 +233,7 @@ typedef struct _mesa_glinterop_export_out {
|
|||
/* The number of bytes written to out_driver_data. */
|
||||
uint32_t out_driver_data_written;
|
||||
/* Structure version 1 ends here. */
|
||||
} mesa_glinterop_export_out;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
|
@ -247,7 +247,7 @@ typedef struct _mesa_glinterop_export_out {
|
|||
*/
|
||||
int
|
||||
MesaGLInteropGLXQueryDeviceInfo(Display *dpy, GLXContext context,
|
||||
mesa_glinterop_device_info *out);
|
||||
struct mesa_glinterop_device_info *out);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -256,7 +256,7 @@ MesaGLInteropGLXQueryDeviceInfo(Display *dpy, GLXContext context,
|
|||
*/
|
||||
int
|
||||
MesaGLInteropEGLQueryDeviceInfo(EGLDisplay dpy, EGLContext context,
|
||||
mesa_glinterop_device_info *out);
|
||||
struct mesa_glinterop_device_info *out);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -272,8 +272,8 @@ MesaGLInteropEGLQueryDeviceInfo(EGLDisplay dpy, EGLContext context,
|
|||
*/
|
||||
int
|
||||
MesaGLInteropGLXExportObject(Display *dpy, GLXContext context,
|
||||
mesa_glinterop_export_in *in,
|
||||
mesa_glinterop_export_out *out);
|
||||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -282,20 +282,20 @@ MesaGLInteropGLXExportObject(Display *dpy, GLXContext context,
|
|||
*/
|
||||
int
|
||||
MesaGLInteropEGLExportObject(EGLDisplay dpy, EGLContext context,
|
||||
mesa_glinterop_export_in *in,
|
||||
mesa_glinterop_export_out *out);
|
||||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out);
|
||||
|
||||
|
||||
typedef int (PFNMESAGLINTEROPGLXQUERYDEVICEINFOPROC)(Display *dpy, GLXContext context,
|
||||
mesa_glinterop_device_info *out);
|
||||
struct mesa_glinterop_device_info *out);
|
||||
typedef int (PFNMESAGLINTEROPEGLQUERYDEVICEINFOPROC)(EGLDisplay dpy, EGLContext context,
|
||||
mesa_glinterop_device_info *out);
|
||||
struct mesa_glinterop_device_info *out);
|
||||
typedef int (PFNMESAGLINTEROPGLXEXPORTOBJECTPROC)(Display *dpy, GLXContext context,
|
||||
mesa_glinterop_export_in *in,
|
||||
mesa_glinterop_export_out *out);
|
||||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out);
|
||||
typedef int (PFNMESAGLINTEROPEGLEXPORTOBJECTPROC)(EGLDisplay dpy, EGLContext context,
|
||||
mesa_glinterop_export_in *in,
|
||||
mesa_glinterop_export_out *out);
|
||||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -2690,7 +2690,7 @@ dri2_server_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync)
|
|||
|
||||
static int
|
||||
dri2_interop_query_device_info(_EGLDisplay *dpy, _EGLContext *ctx,
|
||||
mesa_glinterop_device_info *out)
|
||||
struct mesa_glinterop_device_info *out)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
|
||||
struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
|
||||
|
@ -2703,8 +2703,8 @@ dri2_interop_query_device_info(_EGLDisplay *dpy, _EGLContext *ctx,
|
|||
|
||||
static int
|
||||
dri2_interop_export_object(_EGLDisplay *dpy, _EGLContext *ctx,
|
||||
mesa_glinterop_export_in *in,
|
||||
mesa_glinterop_export_out *out)
|
||||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
|
||||
struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
|
||||
|
|
|
@ -1939,7 +1939,7 @@ _eglLockDisplayInterop(EGLDisplay dpy, EGLContext context,
|
|||
|
||||
int
|
||||
MesaGLInteropEGLQueryDeviceInfo(EGLDisplay dpy, EGLContext context,
|
||||
mesa_glinterop_device_info *out)
|
||||
struct mesa_glinterop_device_info *out)
|
||||
{
|
||||
_EGLDisplay *disp;
|
||||
_EGLDriver *drv;
|
||||
|
@ -1961,8 +1961,8 @@ MesaGLInteropEGLQueryDeviceInfo(EGLDisplay dpy, EGLContext context,
|
|||
|
||||
int
|
||||
MesaGLInteropEGLExportObject(EGLDisplay dpy, EGLContext context,
|
||||
mesa_glinterop_export_in *in,
|
||||
mesa_glinterop_export_out *out)
|
||||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out)
|
||||
{
|
||||
_EGLDisplay *disp;
|
||||
_EGLDriver *drv;
|
||||
|
|
|
@ -42,9 +42,9 @@ extern "C" {
|
|||
typedef void (*_EGLProc)(void);
|
||||
|
||||
struct wl_display;
|
||||
typedef struct _mesa_glinterop_device_info mesa_glinterop_device_info;
|
||||
typedef struct _mesa_glinterop_export_in mesa_glinterop_export_in;
|
||||
typedef struct _mesa_glinterop_export_out mesa_glinterop_export_out;
|
||||
struct mesa_glinterop_device_info;
|
||||
struct mesa_glinterop_export_in;
|
||||
struct mesa_glinterop_export_out;
|
||||
|
||||
/**
|
||||
* The API dispatcher jumps through these functions
|
||||
|
@ -193,10 +193,10 @@ struct _egl_api
|
|||
EGLint *strides, EGLint *offsets);
|
||||
|
||||
int (*GLInteropQueryDeviceInfo)(_EGLDisplay *dpy, _EGLContext *ctx,
|
||||
mesa_glinterop_device_info *out);
|
||||
struct mesa_glinterop_device_info *out);
|
||||
int (*GLInteropExportObject)(_EGLDisplay *dpy, _EGLContext *ctx,
|
||||
mesa_glinterop_export_in *in,
|
||||
mesa_glinterop_export_out *out);
|
||||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1488,7 +1488,7 @@ static const __DRIrobustnessExtension dri2Robustness = {
|
|||
|
||||
static int
|
||||
dri2_interop_query_device_info(__DRIcontext *_ctx,
|
||||
mesa_glinterop_device_info *out)
|
||||
struct mesa_glinterop_device_info *out)
|
||||
{
|
||||
struct pipe_screen *screen = dri_context(_ctx)->st->pipe->screen;
|
||||
|
||||
|
@ -1512,8 +1512,8 @@ dri2_interop_query_device_info(__DRIcontext *_ctx,
|
|||
|
||||
static int
|
||||
dri2_interop_export_object(__DRIcontext *_ctx,
|
||||
mesa_glinterop_export_in *in,
|
||||
mesa_glinterop_export_out *out)
|
||||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out)
|
||||
{
|
||||
struct st_context_iface *st = dri_context(_ctx)->st;
|
||||
struct pipe_screen *screen = st->pipe->screen;
|
||||
|
|
|
@ -72,12 +72,12 @@ dri2_query_renderer_string(struct glx_screen *base, int attribute,
|
|||
|
||||
_X_HIDDEN int
|
||||
dri2_interop_query_device_info(struct glx_context *ctx,
|
||||
mesa_glinterop_device_info *out);
|
||||
struct mesa_glinterop_device_info *out);
|
||||
|
||||
_X_HIDDEN int
|
||||
dri2_interop_export_object(struct glx_context *ctx,
|
||||
mesa_glinterop_export_in *in,
|
||||
mesa_glinterop_export_out *out);
|
||||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -135,9 +135,9 @@ dri3_query_renderer_string(struct glx_screen *base, int attribute,
|
|||
|
||||
_X_HIDDEN int
|
||||
dri3_interop_query_device_info(struct glx_context *ctx,
|
||||
mesa_glinterop_device_info *out);
|
||||
struct mesa_glinterop_device_info *out);
|
||||
|
||||
_X_HIDDEN int
|
||||
dri3_interop_export_object(struct glx_context *ctx,
|
||||
mesa_glinterop_export_in *in,
|
||||
mesa_glinterop_export_out *out);
|
||||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out);
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
_X_HIDDEN int
|
||||
dri2_interop_query_device_info(struct glx_context *ctx,
|
||||
mesa_glinterop_device_info *out)
|
||||
struct mesa_glinterop_device_info *out)
|
||||
{
|
||||
struct dri2_screen *psc = (struct dri2_screen*)ctx->psc;
|
||||
struct dri2_context *drictx = (struct dri2_context*)ctx;
|
||||
|
@ -47,8 +47,8 @@ dri2_interop_query_device_info(struct glx_context *ctx,
|
|||
|
||||
_X_HIDDEN int
|
||||
dri2_interop_export_object(struct glx_context *ctx,
|
||||
mesa_glinterop_export_in *in,
|
||||
mesa_glinterop_export_out *out)
|
||||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out)
|
||||
{
|
||||
struct dri2_screen *psc = (struct dri2_screen*)ctx->psc;
|
||||
struct dri2_context *drictx = (struct dri2_context*)ctx;
|
||||
|
@ -63,7 +63,7 @@ dri2_interop_export_object(struct glx_context *ctx,
|
|||
|
||||
_X_HIDDEN int
|
||||
dri3_interop_query_device_info(struct glx_context *ctx,
|
||||
mesa_glinterop_device_info *out)
|
||||
struct mesa_glinterop_device_info *out)
|
||||
{
|
||||
struct dri3_screen *psc = (struct dri3_screen*)ctx->psc;
|
||||
struct dri3_context *drictx = (struct dri3_context*)ctx;
|
||||
|
@ -76,8 +76,8 @@ dri3_interop_query_device_info(struct glx_context *ctx,
|
|||
|
||||
_X_HIDDEN int
|
||||
dri3_interop_export_object(struct glx_context *ctx,
|
||||
mesa_glinterop_export_in *in,
|
||||
mesa_glinterop_export_out *out)
|
||||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out)
|
||||
{
|
||||
struct dri3_screen *psc = (struct dri3_screen*)ctx->psc;
|
||||
struct dri3_context *drictx = (struct dri3_context*)ctx;
|
||||
|
|
|
@ -218,9 +218,9 @@ typedef struct __GLXattributeMachineRec
|
|||
__GLXattribute **stackPointer;
|
||||
} __GLXattributeMachine;
|
||||
|
||||
typedef struct _mesa_glinterop_device_info mesa_glinterop_device_info;
|
||||
typedef struct _mesa_glinterop_export_in mesa_glinterop_export_in;
|
||||
typedef struct _mesa_glinterop_export_out mesa_glinterop_export_out;
|
||||
struct mesa_glinterop_device_info;
|
||||
struct mesa_glinterop_export_in;
|
||||
struct mesa_glinterop_export_out;
|
||||
|
||||
struct glx_context_vtable {
|
||||
void (*destroy)(struct glx_context *ctx);
|
||||
|
@ -237,10 +237,10 @@ struct glx_context_vtable {
|
|||
void (*release_tex_image)(Display * dpy, GLXDrawable drawable, int buffer);
|
||||
void * (*get_proc_address)(const char *symbol);
|
||||
int (*interop_query_device_info)(struct glx_context *ctx,
|
||||
mesa_glinterop_device_info *out);
|
||||
struct mesa_glinterop_device_info *out);
|
||||
int (*interop_export_object)(struct glx_context *ctx,
|
||||
mesa_glinterop_export_in *in,
|
||||
mesa_glinterop_export_out *out);
|
||||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -2697,7 +2697,7 @@ __glXGetUST(int64_t * ust)
|
|||
|
||||
int
|
||||
MesaGLInteropGLXQueryDeviceInfo(Display *dpy, GLXContext context,
|
||||
mesa_glinterop_device_info *out)
|
||||
struct mesa_glinterop_device_info *out)
|
||||
{
|
||||
struct glx_context *gc = (struct glx_context*)context;
|
||||
int ret;
|
||||
|
@ -2721,8 +2721,8 @@ MesaGLInteropGLXQueryDeviceInfo(Display *dpy, GLXContext context,
|
|||
|
||||
int
|
||||
MesaGLInteropGLXExportObject(Display *dpy, GLXContext context,
|
||||
mesa_glinterop_export_in *in,
|
||||
mesa_glinterop_export_out *out)
|
||||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out)
|
||||
{
|
||||
struct glx_context *gc = (struct glx_context*)context;
|
||||
int ret;
|
||||
|
|
Loading…
Reference in New Issue