summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJesse Barnes <[email protected]>2010-01-11 15:23:29 -0500
committerJesse Barnes <[email protected]>2010-01-11 15:23:29 -0500
commitc6ef705e414c8e93ee471f50d15ada3492a9b067 (patch)
tree5b037def16eaa6e58860f7b66d79fd75067a0cb2 /include
parentcca66dbb59673168d57b4e3499ccc31f4ddc86ad (diff)
parent7c50d29f7ced3d60e52ee0146d982b49ea421de2 (diff)
Merge branch 'master' of ssh://people.freedesktop.org/~jbarnes/mesa
Conflicts due to DRI1 removal: src/mesa/drivers/dri/intel/intel_context.c src/mesa/drivers/dri/intel/intel_screen.c
Diffstat (limited to 'include')
-rw-r--r--include/GL/glx.h19
-rw-r--r--include/GL/glxext.h8
-rw-r--r--include/GL/internal/dri_interface.h14
3 files changed, 40 insertions, 1 deletions
diff --git a/include/GL/glx.h b/include/GL/glx.h
index 28844014069..82b0f221146 100644
--- a/include/GL/glx.h
+++ b/include/GL/glx.h
@@ -186,6 +186,16 @@ typedef XID GLXWindow;
typedef XID GLXPbuffer;
+/*
+** Events.
+** __GLX_NUMBER_EVENTS is set to 17 to account for the BufferClobberSGIX
+** event - this helps initialization if the server supports the pbuffer
+** extension and the client doesn't.
+*/
+#define GLX_PbufferClobber 0
+#define GLX_BufferSwapComplete 1
+
+#define __GLX_NUMBER_EVENTS 17
extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
int *attribList );
@@ -507,8 +517,17 @@ typedef struct {
int count; /* if nonzero, at least this many more */
} GLXPbufferClobberEvent;
+typedef struct {
+ int event_type;
+ GLXDrawable drawable;
+ int64_t ust;
+ int64_t msc;
+ int64_t sbc;
+} GLXBufferSwapComplete;
+
typedef union __GLXEvent {
GLXPbufferClobberEvent glxpbufferclobber;
+ GLXBufferSwapComplete glxbufferswapcomplete;
long pad[24];
} GLXEvent;
diff --git a/include/GL/glxext.h b/include/GL/glxext.h
index 9ac0592e053..36ee3665dfd 100644
--- a/include/GL/glxext.h
+++ b/include/GL/glxext.h
@@ -696,6 +696,14 @@ extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
#endif
+#ifndef GLX_INTEL_swap_event
+#define GLX_INTEL_swap_event
+#define GLX_BUFFER_SWAP_COMPLETE_MASK 0x10000000
+#define GLX_EXCHANGE_COMPLETE 0x8024
+#define GLX_BLIT_COMPLETE 0x8025
+#define GLX_FLIP_COMPLETE 0x8026
+#endif
+
#ifndef GLX_SGIX_swap_barrier
#define GLX_SGIX_swap_barrier 1
#ifdef GLX_GLXEXT_PROTOTYPES
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 910c9166b5e..ec6238f8734 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -262,10 +262,22 @@ struct __DRItexBufferExtensionRec {
* Used by drivers that implement DRI2
*/
#define __DRI2_FLUSH "DRI2_Flush"
-#define __DRI2_FLUSH_VERSION 1
+#define __DRI2_FLUSH_VERSION 2
struct __DRI2flushExtensionRec {
__DRIextension base;
void (*flush)(__DRIdrawable *drawable);
+
+ /**
+ * Flush all rendering queue in the driver to the drm and
+ * invalidate all buffers. The driver will call out to
+ * getBuffers/getBuffersWithFormat before it starts rendering
+ * again.
+ *
+ * \param drawable the drawable to flush and invalidate
+ *
+ * \since 2
+ */
+ void (*flushInvalidate)(__DRIdrawable *drawable);
};