summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f9e6b17)
raw | patch | inline | side by side (parent: f9e6b17)
author | Jesse Barnes <jbarnes@jbarnes-desktop.localdomain> | |
Thu, 12 Nov 2009 15:26:40 +0000 (15:26 +0000) | ||
committer | Jesse Barnes <jbarnes@jbarnes-desktop.localdomain> | |
Thu, 12 Nov 2009 15:26:40 +0000 (15:26 +0000) |
dri2proto.h | patch | blob | history | |
dri2proto.txt | patch | blob | history | |
dri2tokens.h | patch | blob | history |
diff --git a/dri2proto.h b/dri2proto.h
index 377bdb93dfc28212ab744a9d554e3a319a3d5bc8..43152c2ef552f63be223a39fa656ebbd05690fc0 100644 (file)
--- a/dri2proto.h
+++ b/dri2proto.h
#define DRI2_MINOR 2
#define DRI2NumberErrors 0
-#define DRI2NumberEvents 0
-#define DRI2NumberRequests 8
+#define DRI2NumberEvents 1
+#define DRI2NumberRequests 13
#define X_DRI2QueryVersion 0
#define X_DRI2Connect 1
#define X_DRI2WaitSBC 11
#define X_DRI2SwapInterval 12
+/*
+ * Events
+ */
+#define DRI2_BufferSwapComplete 0
+
typedef struct {
CARD32 attachment B32;
CARD32 name B32;
} xDRI2SwapIntervalReq;
#define sz_xDRI2SwapIntervalReq 12
+typedef struct {
+ CARD8 type;
+ CARD8 pad;
+ CARD16 sequenceNumber B16;
+ CARD16 event_type B16;
+ CARD32 drawable B32;
+ CARD32 ust_hi B32;
+ CARD32 ust_lo B32;
+ CARD32 msc_hi B32;
+ CARD32 msc_lo B32;
+ CARD32 sbc_hi B32;
+ CARD32 sbc_lo B32;
+} xDRI2BufferSwapComplete;
+#define sz_xDRI2BufferSwapComplete 32
+
#endif
diff --git a/dri2proto.txt b/dri2proto.txt
index 71fc0ca212a7d4360467cb20e6921f1dd7ddec5c..0b382ff6ed38c47276ff31b9865ba9f3c7b60ce5 100644 (file)
--- a/dri2proto.txt
+++ b/dri2proto.txt
interval using the swap interval call (currently only available through GLX)
or by using the OML swap buffers routine.
+2.7 Events
+
+DRI2 provides a single event to indicate when a DRI2SwapBuffers request has
+been completed. This can be used to throttle drawing on the client side and
+tie into application main loops.
+
⚙ ⚙ ⚙ ⚙ ⚙ ⚙
⚙ ⚙ ⚙ ⚙ ⚙ ⚙
+5. Events
+
+The only event provided by DRI2 is DRI2_BufferSwapComplete.
+
+
+ ⚙ ⚙ ⚙ ⚙ ⚙ ⚙
+
-5. Protocol Types
+6. Protocol Types
DRI2DRIVER { DRI2DriverDRI }
⚙ ⚙ ⚙ ⚙ ⚙ ⚙
-6. Extension Initialization
+7. Extension Initialization
The name of this extension is "DRI2".
⚙ ⚙ ⚙ ⚙ ⚙ ⚙
-7. Extension Requests
+8. Extension Requests
┌───
DRI2Connect
⚙ ⚙ ⚙ ⚙ ⚙ ⚙
+9. Extension Requests
+
+┌───
+ DRI2BufferSwapComplete
+ ▶
+ event_type: CARD16
+ drawable: CARD32
+ ust: CARD64
+ msc: CARD64
+ sbc: CARD64
+└───
+
+ This event reports the status of the last DRI2SwapBuffers event to
+ the client. The event type should be one of DRI2_EXCHANGE_COMPLETE,
+ indicating a successful buffer exchange, DRI2_BLIT_COMPLETE, indicating
+ the swap was performed with a blit, and DRI2_FLIP_COMPLETE, indicating
+ a full page flip was completed.
-8. Extension Versioning
+ ⚙ ⚙ ⚙ ⚙ ⚙ ⚙
+
+10. Extension Versioning
The DRI2 extension has undergone a number of revisions before
2.0: Awesomeness!
+ 2.1: True excellence. Added DRI2GetBuffersWithFormat to allow
+ more flexible object creation.
+
+ 2.2: Approaching perfection. Added requests for swapbuffers,
+ MSC and SBC related requests, and events.
+
Compatibility up to 2.0 is not preserved, but was also never released.
⚙ ⚙ ⚙ ⚙ ⚙ ⚙
-10. Relationship with other extensions
+11. Relationship with other extensions
As an extension designed to support other extensions, there is
naturally some interactions with other extensions.
-10.1 GLX
+11.1 GLX
The GL auxilary buffers map directly to the DRI2 buffers... eh
-10.2 DBE
+11.2 DBE
The DBE back buffer must correspond to the DRI2_BUFFER_FRONT_LEFT
DRI2 buffer for servers that support both DBE and DRI2.
-10.3 XvMC / Xv
+11.3 XvMC / Xv
We might add a DRI2_BUFFER_YUV to do vsynced colorspace conversion
blits. Maybe... not really sure.
diff --git a/dri2tokens.h b/dri2tokens.h
index d56e4fb535edda2f3698abb85282a764c98c7d6b..a20462a5deebcd8e5a50e4c1d8bbfdf14f614db0 100644 (file)
--- a/dri2tokens.h
+++ b/dri2tokens.h
#define DRI2DriverDRI 0
+/* Event sub-types for the swap complete event */
+#define DRI2_EXCHANGE_COMPLETE 0x1
+#define DRI2_BLIT_COMPLETE 0x2
+#define DRI2_FLIP_COMPLETE 0x3
+
#endif