From 9b5ef83c0b9ef0239ac82adfa9a816f195074dcb Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Fri, 1 May 2009 14:41:55 -0700 Subject: Add SwapBuffers request Add a SwapBuffers request for requesting a front<->back swap. Returns a whole new set of buffers to the client to allow for triple buffering etc. --- dri2proto.h | 25 ++++++++++++++++++++++++- dri2proto.txt | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) diff --git a/dri2proto.h b/dri2proto.h index 8d76079..441155e 100644 --- a/dri2proto.h +++ b/dri2proto.h @@ -35,7 +35,7 @@ #define DRI2_NAME "DRI2" #define DRI2_MAJOR 1 -#define DRI2_MINOR 1 +#define DRI2_MINOR 2 #define DRI2NumberErrors 0 #define DRI2NumberEvents 0 @@ -49,6 +49,7 @@ #define X_DRI2GetBuffers 5 #define X_DRI2CopyRegion 6 #define X_DRI2GetBuffersWithFormat 7 +#define X_DRI2SwapBuffers 8 typedef struct { CARD32 attachment B32; @@ -191,4 +192,26 @@ typedef struct { } xDRI2CopyRegionReply; #define sz_xDRI2CopyRegionReply 32 +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; +} xDRI2SwapBuffersReq; +#define sz_xDRI2SwapBuffersReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 count B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; +} xDRI2SwapBuffersReply; +#define sz_xDRI2SwapBuffersReply 32 + #endif diff --git a/dri2proto.txt b/dri2proto.txt index e931bfb..bad9567 100644 --- a/dri2proto.txt +++ b/dri2proto.txt @@ -105,6 +105,11 @@ DRI2 implementation of direct rendering GLX, should use these enty points to copy contents back and forth to as necessary to ensure consistent rendering. +The client may also use the DRI2SwapBuffers function to request a swap +of the front and back buffers. If the display server supports it, this +operation may be preferred, since it may be easier and/or more performant +for the server to perform a simple buffer swap rather than a blit. + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ @@ -288,6 +293,21 @@ The name of this extension is "DRI2". the server has seen the request before proceeding with rendering the next frame. +┌─── + DRI2SwapBuffers + drawable: DRAWABLE + ▶ + buffers: LISTofDRI2BUFFER +└─── + Errors: Window + + Schedule a swap of the front and back buffers with the display + server. + + In reply, the display server is expected to provide new front + and back buffers to the client following this request. The + display server should process this request asynchronously + if possible, to prevent the client from blocking. ┌─── DRI2GetBuffersWithFormat @@ -542,6 +562,27 @@ A.3 Protocol Events The DRI2 extension specifies no events. +┌─── + DRI2SwapBuffers + 1 CARD8 major opcode + 1 7 DRI2 opcode + 2 8 length + 4 DRAWABLE drawable + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 CARD32 buffer count + 4 CARD32 unused + 4 CARD32 unused + 4 CARD32 unused + 4 CARD32 unused + 4 CARD32 unused + 4 CARD32 unused + 5n LISTofDRI2BUFFER buffers +└─── + A.4 Protocol Errors -- cgit v1.2.3 From aaee5f8af4f0fe63498cd8ae507f8d33edba280c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 3 Jun 2009 17:36:43 -0400 Subject: Make swapbuffers an async request The protocol now require a DRI2GetBuffersWithFormat request to follow the swapbuffer request so. --- dri2proto.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/dri2proto.h b/dri2proto.h index 441155e..37873c4 100644 --- a/dri2proto.h +++ b/dri2proto.h @@ -200,18 +200,4 @@ typedef struct { } xDRI2SwapBuffersReq; #define sz_xDRI2SwapBuffersReq 8 -typedef struct { - BYTE type; /* X_Reply */ - BYTE pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 count B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xDRI2SwapBuffersReply; -#define sz_xDRI2SwapBuffersReply 32 - #endif -- cgit v1.2.3 From 00c15f92c1f294d762f2052f1d775c393ebd2432 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Mon, 8 Jun 2009 16:12:50 -0700 Subject: Update protocol description for swapbuffers --- dri2proto.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dri2proto.txt b/dri2proto.txt index bad9567..1bad3b9 100644 --- a/dri2proto.txt +++ b/dri2proto.txt @@ -304,10 +304,10 @@ The name of this extension is "DRI2". Schedule a swap of the front and back buffers with the display server. - In reply, the display server is expected to provide new front - and back buffers to the client following this request. The - display server should process this request asynchronously - if possible, to prevent the client from blocking. + This request has no reply. The server is expected to either perform + a buffer exchange or queue one before returning. The client should + invalidate its render buffers after sending this request, causing + a subsequent GetBuffers request to get updated buffer info. ┌─── DRI2GetBuffersWithFormat -- cgit v1.2.3 From 29c7fcbf10508ec822ad528928b72702e4c9af01 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Thu, 1 Oct 2009 22:13:34 -0700 Subject: Add swap interval and synchronization support Based on SGI_video_sync, SGI_swap_control and OML_sync_control, add swap interval and synchronization support to DRI2. Useful for throttling rendering and basic performance metrics. Signed-off-by: Jesse Barnes --- dri2proto.h | 67 ++++++++++++++++++++- dri2proto.txt | 182 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 239 insertions(+), 10 deletions(-) diff --git a/dri2proto.h b/dri2proto.h index 37873c4..cee8a3c 100644 --- a/dri2proto.h +++ b/dri2proto.h @@ -50,6 +50,9 @@ #define X_DRI2CopyRegion 6 #define X_DRI2GetBuffersWithFormat 7 #define X_DRI2SwapBuffers 8 +#define X_DRI2GetMSC 9 +#define X_DRI2WaitMSC 10 +#define X_DRI2WaitSBC 11 typedef struct { CARD32 attachment B32; @@ -197,7 +200,69 @@ typedef struct { CARD8 dri2ReqType; CARD16 length B16; CARD32 drawable B32; + CARD32 target_msc_hi B32; + CARD32 target_msc_lo B32; + CARD32 divisor_hi B32; + CARD32 divisor_lo B32; + CARD32 remainder_hi B32; + CARD32 remainder_lo B32; } xDRI2SwapBuffersReq; -#define sz_xDRI2SwapBuffersReq 8 +#define sz_xDRI2SwapBuffersReq 32 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD16 length B32; + CARD32 swap_hi B32; + CARD32 swap_lo B32; +} xDRI2SwapBuffersReply; +#define sz_xDRI2SwapBuffersReply 16 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; +} xDRI2GetMSCReq; +#define sz_xDRI2GetMSCReq 8 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; + CARD32 target_msc_hi B32; + CARD32 target_msc_lo B32; + CARD32 divisor_hi B32; + CARD32 divisor_lo B32; + CARD32 remainder_hi B32; + CARD32 remainder_lo B32; +} xDRI2WaitMSCReq; +#define sz_xDRI2WaitMSCReq 32 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; + CARD32 target_sbc_hi B32; + CARD32 target_sbc_lo B32; +} xDRI2WaitSBCReq; +#define sz_xDRI2WaitSBCReq 16 + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber B16; + CARD32 length 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; +} xDRI2MSCReply; +#define sz_xDRI2MSCReply 32 #endif diff --git a/dri2proto.txt b/dri2proto.txt index 1bad3b9..6430b2a 100644 --- a/dri2proto.txt +++ b/dri2proto.txt @@ -110,6 +110,17 @@ of the front and back buffers. If the display server supports it, this operation may be preferred, since it may be easier and/or more performant for the server to perform a simple buffer swap rather than a blit. +2.6 Synchronizing rendering + +DRI2 provides several methods for synchronizing drawing with various events. +The protocol for these methods is based on the SGI_video_sync and +OML_sync_control GLX extensions. Using the DRI2WaitMSC request, a client +can wait for a specific frame count or divisor/remainder before continuing +its processing. With the DRI2WaitSBC request, clients can block until a given +swap count is reached (as incremented by DRI2SwapBuffers). Finally, using +DRI2SwapBuffers, clients can limit their frame rate by specifying a swap +interval using the swap interval call (currently only available through GLX) +or by using the OML swap buffers routine. ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ @@ -297,17 +308,22 @@ The name of this extension is "DRI2". DRI2SwapBuffers drawable: DRAWABLE ▶ - buffers: LISTofDRI2BUFFER + count: two CARD32s └─── Errors: Window Schedule a swap of the front and back buffers with the display server. - This request has no reply. The server is expected to either perform - a buffer exchange or queue one before returning. The client should - invalidate its render buffers after sending this request, causing - a subsequent GetBuffers request to get updated buffer info. + Returns the swap count value when the swap will actually occur (e.g. + the last queued swap count + (pending swap count * swap interval)). + + The client should invalidate its render buffers after sending this + request, causing a subsequent GetBuffers request to get updated buffer + info. + + This request is only available with protocol version 1.2 or + later. ┌─── DRI2GetBuffersWithFormat @@ -332,6 +348,68 @@ The name of this extension is "DRI2". attachment points. This request is only available with protocol version 1.1 or + later. + +┌─── + DRI2GetMSC + drawable: DRAWABLE + ▶ + ust, msc, sbc: CARD64 +└─── + Errors: Window + + Get the current media stamp counter (MSC) and swap buffer count (SBC) + along with the unadjusted system time (UST) when the MSC was last + incremented. + + This request is only available with protocol version 1.2 or + later. + +┌─── + DRI2WaitMSC + drawable: DRAWABLE + target_msc: two CARD32s + divisor: two CARD32s + remainder: two CARD32s + ▶ + ust, msc, sbc: CARD64 +└─── + Errors: Window + + Blocks the client until either the frame count reaches target_msc or, + if the frame count is already greater than target_msc when the request + is received, until the frame count % divisor = remainder. If divisor + is 0, the client will be unblocked if the frame count is greater than + or equal to the target_msc. + + Returns the current media stamp counter (MSC) and swap buffer count + (SBC) along with the unadjusted system time (UST) when the MSC was last + incremented. + + This request is only available with protocol version 1.2 or + later. + +┌─── + DRI2WaitSBC + drawable: DRAWABLE + target_sbc: two CARD32s + ▶ + ust, msc, sbc: CARD64 +└─── + Errors: Window + + Blocks the client until the swap buffer count reaches target_sbc. If + the swap buffer count is already greater than or equal to target_sbc + when the request is recieved, this request will return immediately. + + If target_sbc is 0, this request will block the client until all + previous DRI2SwapBuffers requests have completed. + + Returns the current media stamp counter (MSC) and swap buffer count + (SBC) along with the unadjusted system time (UST) when the MSC was last + incremented. + + This request is only available with protocol version 1.2 or later. ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ @@ -558,10 +636,6 @@ A.2 Protocol Requests 5n LISTofDRI2BUFFER buffers └─── -A.3 Protocol Events - -The DRI2 extension specifies no events. - ┌─── DRI2SwapBuffers 1 CARD8 major opcode @@ -583,6 +657,96 @@ The DRI2 extension specifies no events. 5n LISTofDRI2BUFFER buffers └─── +┌─── + DRI2SwapBuffers + 1 CARD8 major opcode + 1 7 DRI2 opcode + 2 8 length + 4 DRAWABLE drawable + 4 CARD32 target_msc_hi + 4 CARD32 target_msc_lo + 4 CARD32 divisor_hi + 4 CARD32 divisor_lo + 4 CARD32 remainder_hi + 4 CARD32 remainder_lo + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 CARD32 swap_hi + 4 CARD32 swap_lo + 5n LISTofDRI2BUFFER buffers +└─── + +┌─── + DRI2GetMSC + 1 CARD8 major opcode + 1 7 DRI2 opcode + 2 8 length + 4 DRAWABLE drawable + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 CARD32 ust_hi + 4 CARD32 ust_lo + 4 CARD32 msc_hi + 4 CARD32 msc_lo + 4 CARD32 sbc_hi + 4 CARD32 sbc_lo +└─── + +┌─── + DRI2WaitMSC + 1 CARD8 major opcode + 1 7 DRI2 opcode + 2 8 length + 4 DRAWABLE drawable + 4 CARD32 target_msc_hi + 4 CARD32 target_msc_lo + 4 CARD32 divisor_hi + 4 CARD32 divisor_lo + 4 CARD32 remainder_hi + 4 CARD32 remainder_lo + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 CARD32 ust_hi + 4 CARD32 ust_lo + 4 CARD32 msc_hi + 4 CARD32 msc_lo + 4 CARD32 sbc_hi + 4 CARD32 sbc_lo +└─── + +┌─── + DRI2WaitSBC + 1 CARD8 major opcode + 1 7 DRI2 opcode + 2 8 length + 4 DRAWABLE drawable + 4 CARD32 swap_hi + 4 CARD32 swap_lo + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 CARD32 ust_hi + 4 CARD32 ust_lo + 4 CARD32 msc_hi + 4 CARD32 msc_lo + 4 CARD32 sbc_hi + 4 CARD32 sbc_lo +└─── + +A.3 Protocol Events + +The DRI2 extension specifies no events. A.4 Protocol Errors -- cgit v1.2.3 From 1102a9199db8aa08e891f808f8921a5d312e3197 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Fri, 2 Oct 2009 22:23:09 -0700 Subject: Fix DRI2SwapBuffers reply length Length should be a CARD32 and match the endianness annotation. Signed-off-by: Jesse Barnes --- dri2proto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dri2proto.h b/dri2proto.h index cee8a3c..85b9dbf 100644 --- a/dri2proto.h +++ b/dri2proto.h @@ -213,7 +213,7 @@ typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber B16; - CARD16 length B32; + CARD32 length B32; CARD32 swap_hi B32; CARD32 swap_lo B32; } xDRI2SwapBuffersReply; -- cgit v1.2.3 From 5e059038a95b5bad7f41a2019beaad913ed29502 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Thu, 29 Oct 2009 12:45:48 -0700 Subject: Bump package version to 2.2 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2d8fdc8..003f7ac 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.57]) -AC_INIT([DRI2Proto], [2.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AC_INIT([DRI2Proto], [2.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) # Require xorg-macros: XORG_CHANGELOG -- cgit v1.2.3 From 516a1ff1f8ceca9ddefce21303e65d873aeeba14 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Tue, 10 Nov 2009 12:12:07 -0800 Subject: Add DRI2SwapInterval protocol Needed to handle swap interval in the direct rendered case. --- dri2proto.h | 10 ++++++++++ dri2proto.txt | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/dri2proto.h b/dri2proto.h index 85b9dbf..31bcdb3 100644 --- a/dri2proto.h +++ b/dri2proto.h @@ -53,6 +53,7 @@ #define X_DRI2GetMSC 9 #define X_DRI2WaitMSC 10 #define X_DRI2WaitSBC 11 +#define X_DRI2SwapInterval 12 typedef struct { CARD32 attachment B32; @@ -265,4 +266,13 @@ typedef struct { } xDRI2MSCReply; #define sz_xDRI2MSCReply 32 +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; + CARD32 interval B32; +} xDRI2SwapIntervalReq; +#define sz_xDRI2SwapIntervalReq 12 + #endif diff --git a/dri2proto.txt b/dri2proto.txt index 6430b2a..71fc0ca 100644 --- a/dri2proto.txt +++ b/dri2proto.txt @@ -33,6 +33,7 @@ Keith Whitwell Jerome Glisse Ian Romanick Michel Dänzer +Jesse Barnes ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ @@ -412,6 +413,18 @@ The name of this extension is "DRI2". This request is only available with protocol version 1.2 or later. +┌─── + DRI2SwapInterval + drawable: DRAWABLE + interval: CARD32 + ▶ +└─── + Errors: Window + + Sets the swap interval for DRAWABLE. This will throttle + DRI2SwapBuffers requests to swap at most once per interval frames, + which is useful useful for limiting the frame rate. + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ @@ -744,6 +757,16 @@ A.2 Protocol Requests 4 CARD32 sbc_lo └─── +┌─── + DRI2SwapInterval + 1 CARD8 major opcode + 1 7 DRI2 opcode + 2 8 length + 4 DRAWABLE drawable + 4 CARD32 interval + ▶ +└─── + A.3 Protocol Events The DRI2 extension specifies no events. -- cgit v1.2.3 From f9e6b17debd2f69821bd8d412cccf02dd9ba17af Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Wed, 11 Nov 2009 15:26:40 -0800 Subject: Pad out DRI2 swap buffers reply --- dri2proto.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dri2proto.h b/dri2proto.h index 31bcdb3..377bdb9 100644 --- a/dri2proto.h +++ b/dri2proto.h @@ -217,8 +217,12 @@ typedef struct { CARD32 length B32; CARD32 swap_hi B32; CARD32 swap_lo B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; } xDRI2SwapBuffersReply; -#define sz_xDRI2SwapBuffersReply 16 +#define sz_xDRI2SwapBuffersReply 32 typedef struct { CARD8 reqType; -- cgit v1.2.3 From 7c7e9bbf4ab6177e9623f3c4d667ed83789167b4 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Thu, 12 Nov 2009 15:26:40 +0000 Subject: Add DRI2 event support for DRI2BufferSwapComplete --- dri2proto.h | 24 ++++++++++++++++++++++-- dri2proto.txt | 54 ++++++++++++++++++++++++++++++++++++++++++++++-------- dri2tokens.h | 5 +++++ 3 files changed, 73 insertions(+), 10 deletions(-) diff --git a/dri2proto.h b/dri2proto.h index 377bdb9..43152c2 100644 --- a/dri2proto.h +++ b/dri2proto.h @@ -38,8 +38,8 @@ #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 @@ -55,6 +55,11 @@ #define X_DRI2WaitSBC 11 #define X_DRI2SwapInterval 12 +/* + * Events + */ +#define DRI2_BufferSwapComplete 0 + typedef struct { CARD32 attachment B32; CARD32 name B32; @@ -279,4 +284,19 @@ typedef struct { } 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 71fc0ca..0b382ff 100644 --- a/dri2proto.txt +++ b/dri2proto.txt @@ -123,6 +123,12 @@ DRI2SwapBuffers, clients can limit their frame rate by specifying a swap 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. + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ @@ -142,8 +148,15 @@ No errrors defined by the DRI2 extension. ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ +5. Events + +The only event provided by DRI2 is DRI2_BufferSwapComplete. + + + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ + -5. Protocol Types +6. Protocol Types DRI2DRIVER { DRI2DriverDRI } @@ -187,7 +200,7 @@ DRI2ATTACH_FORMAT { attachment: CARD32 ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ -6. Extension Initialization +7. Extension Initialization The name of this extension is "DRI2". @@ -218,7 +231,7 @@ The name of this extension is "DRI2". ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ -7. Extension Requests +8. Extension Requests ┌─── DRI2Connect @@ -427,8 +440,27 @@ The name of this extension is "DRI2". ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ +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 @@ -452,30 +484,36 @@ 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 d56e4fb..a20462a 100644 --- a/dri2tokens.h +++ b/dri2tokens.h @@ -46,4 +46,9 @@ #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 -- cgit v1.2.3 From 9c1a8f1d074bd7b87c4edf8b689c13c93fba9aaa Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Thu, 12 Nov 2009 17:23:03 +0000 Subject: Fix cut & paste error: Extension Requests -> Extension Events --- dri2proto.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dri2proto.txt b/dri2proto.txt index 0b382ff..35bad41 100644 --- a/dri2proto.txt +++ b/dri2proto.txt @@ -440,7 +440,7 @@ The name of this extension is "DRI2". ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ -9. Extension Requests +9. Extension Events ┌─── DRI2BufferSwapComplete -- cgit v1.2.3