projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
etnaviv: split dump_shader
[mesa.git]
/
src
/
glx
/
glxclient.h
diff --git
a/src/glx/glxclient.h
b/src/glx/glxclient.h
index 122ae5dd1b774946abb5c09ccff001b79ff81111..2a7437fcd1b4381669dfbea4da520a50e9446453 100644
(file)
--- a/
src/glx/glxclient.h
+++ b/
src/glx/glxclient.h
@@
-48,16
+48,24
@@
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
+#include <pthread.h>
#include "GL/glxproto.h"
#include "glxconfig.h"
#include "glxhash.h"
#include "GL/glxproto.h"
#include "glxconfig.h"
#include "glxhash.h"
-#if defined( HAVE_PTHREAD )
-# include <pthread.h>
-#endif
#include "util/macros.h"
#include "glxextensions.h"
#include "util/macros.h"
#include "glxextensions.h"
+#if defined(USE_LIBGLVND)
+#define _GLX_PUBLIC _X_HIDDEN
+#else
+#define _GLX_PUBLIC _X_EXPORT
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define GLX_MAJOR_VERSION 1 /* current version numbers */
#define GLX_MINOR_VERSION 4
#define GLX_MAJOR_VERSION 1 /* current version numbers */
#define GLX_MINOR_VERSION 4
@@
-146,11
+154,15
@@
struct __GLXDRIdrawableRec
extern __GLXDRIdisplay *driswCreateDisplay(Display * dpy);
extern __GLXDRIdisplay *driCreateDisplay(Display * dpy);
extern __GLXDRIdisplay *dri2CreateDisplay(Display * dpy);
extern __GLXDRIdisplay *driswCreateDisplay(Display * dpy);
extern __GLXDRIdisplay *driCreateDisplay(Display * dpy);
extern __GLXDRIdisplay *dri2CreateDisplay(Display * dpy);
+extern __GLXDRIdisplay *dri3_create_display(Display * dpy);
+extern __GLXDRIdisplay *driwindowsCreateDisplay(Display * dpy);
+
+/*
+**
+*/
extern void dri2InvalidateBuffers(Display *dpy, XID drawable);
extern unsigned dri2GetSwapEventType(Display *dpy, XID drawable);
extern void dri2InvalidateBuffers(Display *dpy, XID drawable);
extern unsigned dri2GetSwapEventType(Display *dpy, XID drawable);
-extern __GLXDRIdisplay *dri3_create_display(Display * dpy);
-
/*
** Functions to obtain driver configuration information from a direct
** rendering client application
/*
** Functions to obtain driver configuration information from a direct
** rendering client application
@@
-210,6
+222,10
@@
typedef struct __GLXattributeMachineRec
__GLXattribute **stackPointer;
} __GLXattributeMachine;
__GLXattribute **stackPointer;
} __GLXattributeMachine;
+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);
int (*bind)(struct glx_context *context, struct glx_context *old,
struct glx_context_vtable {
void (*destroy)(struct glx_context *ctx);
int (*bind)(struct glx_context *context, struct glx_context *old,
@@
-224,6
+240,11
@@
struct glx_context_vtable {
int buffer, const int *attrib_list);
void (*release_tex_image)(Display * dpy, GLXDrawable drawable, int buffer);
void * (*get_proc_address)(const char *symbol);
int buffer, const int *attrib_list);
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,
+ struct mesa_glinterop_device_info *out);
+ int (*interop_export_object)(struct glx_context *ctx,
+ struct mesa_glinterop_export_in *in,
+ struct mesa_glinterop_export_out *out);
};
/**
};
/**
@@
-416,6
+437,12
@@
struct glx_context
*/
unsigned long thread_refcount;
*/
unsigned long thread_refcount;
+ /**
+ * GLX_ARB_create_context_no_error setting for this context.
+ * This needs to be kept here to enforce shared context rules.
+ */
+ Bool noError;
+
char gl_extension_bits[__GL_EXT_BYTES];
};
char gl_extension_bits[__GL_EXT_BYTES];
};
@@
-589,6
+616,9
@@
struct glx_display
__GLXDRIdisplay *dri2Display;
__GLXDRIdisplay *dri3Display;
#endif
__GLXDRIdisplay *dri2Display;
__GLXDRIdisplay *dri3Display;
#endif
+#ifdef GLX_USE_WINDOWSGL
+ __GLXDRIdisplay *windowsdriDisplay;
+#endif
};
struct glx_drawable {
};
struct glx_drawable {
@@
-622,18
+652,15
@@
extern void __glXSendLargeCommand(struct glx_context *, const GLvoid *, GLint,
/* Initialize the GLX extension for dpy */
extern struct glx_display *__glXInitialize(Display *);
/* Initialize the GLX extension for dpy */
extern struct glx_display *__glXInitialize(Display *);
-extern void __glXPreferEGL(int state);
-
/************************************************************************/
extern int __glXDebug;
/* This is per-thread storage in an MT environment */
/************************************************************************/
extern int __glXDebug;
/* This is per-thread storage in an MT environment */
-#if defined( HAVE_PTHREAD )
extern void __glXSetCurrentContext(struct glx_context * c);
extern void __glXSetCurrentContext(struct glx_context * c);
-# if defined(
GLX_USE
_TLS )
+# if defined(
USE_ELF
_TLS )
extern __thread void *__glX_tls_Context
__attribute__ ((tls_model("initial-exec")));
extern __thread void *__glX_tls_Context
__attribute__ ((tls_model("initial-exec")));
@@
-644,15
+671,7
@@
extern __thread void *__glX_tls_Context
extern struct glx_context *__glXGetCurrentContext(void);
extern struct glx_context *__glXGetCurrentContext(void);
-# endif /* defined( GLX_USE_TLS ) */
-
-#else
-
-extern struct glx_context *__glXcurrentContext;
-#define __glXGetCurrentContext() __glXcurrentContext
-#define __glXSetCurrentContext(gc) __glXcurrentContext = gc
-
-#endif /* defined( HAVE_PTHREAD ) */
+# endif /* defined( USE_ELF_TLS ) */
extern void __glXSetCurrentContextNull(void);
extern void __glXSetCurrentContextNull(void);
@@
-661,14
+680,9
@@
extern void __glXSetCurrentContextNull(void);
** Global lock for all threads in this address space using the GLX
** extension
*/
** Global lock for all threads in this address space using the GLX
** extension
*/
-#if defined( HAVE_PTHREAD )
extern pthread_mutex_t __glXmutex;
#define __glXLock() pthread_mutex_lock(&__glXmutex)
#define __glXUnlock() pthread_mutex_unlock(&__glXmutex)
extern pthread_mutex_t __glXmutex;
#define __glXLock() pthread_mutex_lock(&__glXmutex)
#define __glXUnlock() pthread_mutex_unlock(&__glXmutex)
-#else
-#define __glXLock()
-#define __glXUnlock()
-#endif
/*
** Setup for a command. Initialize the extension for dpy if necessary.
/*
** Setup for a command. Initialize the extension for dpy if necessary.
@@
-831,4
+845,12
@@
indirect_create_context_attribs(struct glx_screen *base,
const uint32_t *attribs,
unsigned *error);
const uint32_t *attribs,
unsigned *error);
+
+extern int __glXGetDrawableAttribute(Display * dpy, GLXDrawable drawable,
+ int attribute, unsigned int *value);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* !__GLX_client_h__ */
#endif /* !__GLX_client_h__ */