summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2012-11-23 18:31:42 +0100
committerMarek Olšák <maraeo@gmail.com>2012-12-02 00:19:00 +0100
commit4a486f8bf2ca3d88228f8313282289abe78bc2f8 (patch)
tree092930126db30205f15a37a1097a2b84b51c721b /include
parent5b7e9b73603ce5fb48cc30896df277df0ae89856 (diff)
downloadexternal_mesa3d-4a486f8bf2ca3d88228f8313282289abe78bc2f8.zip
external_mesa3d-4a486f8bf2ca3d88228f8313282289abe78bc2f8.tar.gz
external_mesa3d-4a486f8bf2ca3d88228f8313282289abe78bc2f8.tar.bz2
glx/dri2: add and use new driver hook flush_with_flags
Diffstat (limited to 'include')
-rw-r--r--include/GL/internal/dri_interface.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 1e0f1d0..718b53b 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -267,7 +267,13 @@ struct __DRItexBufferExtensionRec {
* Used by drivers that implement DRI2
*/
#define __DRI2_FLUSH "DRI2_Flush"
-#define __DRI2_FLUSH_VERSION 3
+#define __DRI2_FLUSH_VERSION 4
+
+#define __DRI2_FLUSH_DRAWABLE (1 << 0) /* the drawable should be flushed. */
+#define __DRI2_FLUSH_CONTEXT (1 << 1) /* glFlush should be called */
+
+enum __DRI2throttleReason;
+
struct __DRI2flushExtensionRec {
__DRIextension base;
void (*flush)(__DRIdrawable *drawable);
@@ -281,6 +287,27 @@ struct __DRI2flushExtensionRec {
* \since 3
*/
void (*invalidate)(__DRIdrawable *drawable);
+
+ /**
+ * This function reduces the number of flushes in the driver by combining
+ * several operations into one call.
+ *
+ * It can:
+ * - throttle
+ * - flush a drawable
+ * - flush a context
+ *
+ * \param context the context
+ * \param drawable the drawable to flush
+ * \param flags a combination of _DRI2_FLUSH_xxx flags
+ * \param throttle_reason the reason for throttling, 0 = no throttling
+ *
+ * \since 4
+ */
+ void (*flush_with_flags)(__DRIcontext *ctx,
+ __DRIdrawable *drawable,
+ unsigned flags,
+ enum __DRI2throttleReason throttle_reason);
};