diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2011-09-11 13:37:56 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2011-09-11 13:37:56 +0000 |
commit | 42acb5da9b80aff1b10faf5cb0cd483b69156422 (patch) | |
tree | 62bba1bf3ba031dabf953298d4739c7f27f7852b /proto | |
parent | 27387dbf8314803b72b14441a100a5a789061900 (diff) |
Update to dri2proto 2.6
Diffstat (limited to 'proto')
-rw-r--r-- | proto/dri2proto/ChangeLog | 115 | ||||
-rw-r--r-- | proto/dri2proto/Makefile.am | 3 | ||||
-rw-r--r-- | proto/dri2proto/configure.ac | 4 | ||||
-rw-r--r-- | proto/dri2proto/dri2proto.h | 16 | ||||
-rw-r--r-- | proto/dri2proto/dri2proto.txt | 354 | ||||
-rw-r--r-- | proto/dri2proto/dri2tokens.h | 1 |
6 files changed, 474 insertions, 19 deletions
diff --git a/proto/dri2proto/ChangeLog b/proto/dri2proto/ChangeLog index 36eb0da0b..258b9b84e 100644 --- a/proto/dri2proto/ChangeLog +++ b/proto/dri2proto/ChangeLog @@ -1,3 +1,107 @@ +commit 7fd18b15646a62bd82a4eb0eca60a34c1731813d +Author: Chad Versace <chad@chad-versace.us> +Date: Wed May 11 12:50:11 2011 -0700 + + Add attachment token DRI2BufferHiz + + ... and bump version to 2.6. + + CC: Eric Anholt <eric@anholt.net> + CC: Ian Romanick <idr@freedesktop.org> + CC: Kristian Høgsberg <krh@bitplanet.net + Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> + Signed-off-by: Chad Versace <chad@chad-versace.us> + +commit 005096937e1da6f65f8ece77662a8db6102d933d +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Thu May 5 13:11:22 2011 -0700 + + dri2proto: add a new DRI2BufferSwapComplete struct that matches the spec + + Just add a new struct to remain compatible with existing code. + + Reviewed-by: Eric Anholt <eric@anholt.net> + Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit f3c211e1ae183dab5c7529814c9f42af2c29fc6c +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Thu May 5 09:22:39 2011 -0700 + + Revert "dri2proto: make DRI2 swap event match GLX spec" + + This reverts commit 0ca3778de195a82087d0f07415a1cf8fc94f5b0a. + + This broke compatibility by renaming existing struct fields. So revert + in favor of a new struct. + +commit 0ca3778de195a82087d0f07415a1cf8fc94f5b0a +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Tue May 3 12:14:58 2011 -0700 + + dri2proto: make DRI2 swap event match GLX spec + + We only spec a 32 bit sbc count, so drop the high bits. Also make the + padding explicit. + + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit 2af5884ab0797f2872028a90fffd4155109cdc4d +Author: Marcin Kościelnicki <koriakin@0x04.net> +Date: Thu May 13 21:05:56 2010 +0000 + + Fix DRI2Connect line encoding to match existing code + + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit c34ce137fdb21fc9a52bb8d5a0c25e3c5d79e687 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Mar 28 19:25:52 2010 -0400 + + config: update AC_PREREQ statement to 2.60 + + Unrelated to the previous patches, the new value simply reflects + the reality that the minimum level for autoconf to configure + all x.org modules is 2.60 dated June 2006. + + ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 1c1456e1517d28ffbd844b00090596c21d9a9d9b +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Mar 28 19:00:30 2010 -0400 + + config: remove the pkgconfig pc.in file from EXTRA_DIST + + Automake always includes it in the tarball. + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 70e5dee9a600e67057c55ab9b1b975f20a68682d +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Mar 28 17:35:44 2010 -0400 + + config: install and distribute dri2proto.txt + + It will now be installed in $docdir in addition + to being distributed in the tarball. + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 3e6dc6d72844bbc8e8752e2ac2e781cb7d0172f1 +Author: Mike Stroyan <mike@LunarG.com> +Date: Tue Feb 16 14:51:43 2010 -0700 + + Fix typo and obsolete reference in dri2proto.txt + +commit 1911ee62a552fae34c82c91b4deef523380fbfe1 +Author: Mike Stroyan <mike@LunarG.com> +Date: Tue Feb 16 14:47:21 2010 -0700 + + Add more info about dri2proto events + commit 41045095bddfe460a76fb560e1d087430d8fd76f Author: Francisco Jerez <currojerez@riseup.net> Date: Mon Feb 8 19:24:37 2010 +0100 @@ -168,6 +272,17 @@ Date: Fri May 1 14:41:55 2009 -0700 whole new set of buffers to the client to allow for triple buffering etc. +commit 66c56ab10d917e3f47f93178d7eac6430970d3c4 +Author: Ian Romanick <idr@freedesktop.org> +Date: Mon Apr 20 21:16:24 2009 -0700 + + Add protocol for DRI2GetBuffersWithFormat + + This function replaces DRI2GetBuffers. + + Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> + Reviewed-by: Kristian Høgsberg <krh@redhat.com> + commit a223ab5e6a215d86e4bf072369b331506f689f83 Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Apr 20 14:08:19 2009 -0400 diff --git a/proto/dri2proto/Makefile.am b/proto/dri2proto/Makefile.am index 153b422cc..5990273e4 100644 --- a/proto/dri2proto/Makefile.am +++ b/proto/dri2proto/Makefile.am @@ -4,7 +4,8 @@ dri2_HEADERS = dri2proto.h dri2tokens.h pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = dri2proto.pc -EXTRA_DIST = dri2proto.pc.in dri2proto.txt +dist_doc_DATA = dri2proto.txt + MAINTAINERCLEANFILES = ChangeLog INSTALL diff --git a/proto/dri2proto/configure.ac b/proto/dri2proto/configure.ac index c5affe3f5..d671f5a45 100644 --- a/proto/dri2proto/configure.ac +++ b/proto/dri2proto/configure.ac @@ -1,5 +1,5 @@ -AC_PREREQ([2.57]) -AC_INIT([DRI2Proto], [2.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AC_PREREQ([2.60]) +AC_INIT([DRI2Proto], [2.6], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE diff --git a/proto/dri2proto/dri2proto.h b/proto/dri2proto/dri2proto.h index 9708a4ae3..cd82afbdf 100644 --- a/proto/dri2proto/dri2proto.h +++ b/proto/dri2proto/dri2proto.h @@ -290,6 +290,7 @@ typedef struct { CARD8 pad; CARD16 sequenceNumber B16; CARD16 event_type B16; + CARD16 pad2; CARD32 drawable B32; CARD32 ust_hi B32; CARD32 ust_lo B32; @@ -304,6 +305,21 @@ typedef struct { CARD8 type; CARD8 pad; CARD16 sequenceNumber B16; + CARD16 event_type B16; + CARD16 pad2; + CARD32 drawable B32; + CARD32 ust_hi B32; + CARD32 ust_lo B32; + CARD32 msc_hi B32; + CARD32 msc_lo B32; + CARD32 sbc B32; +} xDRI2BufferSwapComplete2; +#define sz_xDRI2BufferSwapComplete2 32 + +typedef struct { + CARD8 type; + CARD8 pad; + CARD16 sequenceNumber B16; CARD32 drawable B32; CARD32 pad1 B32; CARD32 pad2 B32; diff --git a/proto/dri2proto/dri2proto.txt b/proto/dri2proto/dri2proto.txt index e931bfbff..df763c7bc 100644 --- a/proto/dri2proto/dri2proto.txt +++ b/proto/dri2proto/dri2proto.txt @@ -33,6 +33,7 @@ Keith Whitwell <keith@tungstengraphics.com> Jerome Glisse <glisse@freedesktop.org> Ian Romanick <ian.d.romanick@intel.com> Michel Dänzer <michel@tungstengraphics.com> +Jesse Barnes <jbarnes@virtuousgeek.org> ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ @@ -105,6 +106,31 @@ 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. + +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. + +2.7 Events + +DRI2 provides an 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. + +Another event is generated when the validity of the requested buffers +changes. ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ @@ -120,15 +146,24 @@ version 2 is used in the CopyRegion request. 4. Errors -No errrors defined by the DRI2 extension. +No errors are defined by the DRI2 extension. + + + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ + +5. Events + +The only events provided by DRI2 are DRI2_BufferSwapComplete +and DRI2InvalidateBuffers. ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ -5. Protocol Types +6. Protocol Types -DRI2DRIVER { DRI2DriverDRI } +DRI2DRIVER { DRI2DriverDRI + DRI2DriverVDPAU } These values describe the type of driver the client will want to load. The server sends back the name of the driver to use @@ -143,7 +178,8 @@ DRI2ATTACHMENT { DRI2BufferFrontLeft DRI2BufferAccum DRI2BufferFakeFrontLeft DRI2BufferFakeFrontRight - DRI2BufferDepthStencil } + DRI2BufferDepthStencil + DRI2BufferHiz } These values describe various attachment points for DRI2 buffers. @@ -170,7 +206,7 @@ DRI2ATTACH_FORMAT { attachment: CARD32 ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ -6. Extension Initialization +7. Extension Initialization The name of this extension is "DRI2". @@ -201,7 +237,7 @@ The name of this extension is "DRI2". ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ -7. Extension Requests +8. Extension Requests ┌─── DRI2Connect @@ -225,7 +261,7 @@ The name of this extension is "DRI2". If the client is not local, or the request driver type is unknown or not available, 'driver' and 'device' will be empty - strings, 'group' will be '0'. We are not using an regular X + strings. We are not using an regular X error here to indicate failure, which will allow the client fall back to other options more easily. @@ -288,6 +324,22 @@ The name of this extension is "DRI2". the server has seen the request before proceeding with rendering the next frame. +┌─── + DRI2SwapBuffers + drawable: DRAWABLE + ▶ + count: two CARD32s +└─── + Errors: Window + + Schedule a swap of the front and back buffers with the display + server. + + Returns the swap count value when the swap will actually occur (e.g. + the last queued swap count + (pending swap count * swap interval)). + + This request is only available with protocol version 1.2 or + later. ┌─── DRI2GetBuffersWithFormat @@ -314,10 +366,119 @@ The name of this extension is "DRI2". 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. + +┌─── + 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. + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ +9. Extension Events -8. Extension Versioning +┌─── + 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. + +┌─── + DRI2InvalidateBuffers + ▶ + drawable: CARD32 +└─── + + This event is generated when the buffers the client had + requested for 'drawable' (with DRI2GetBuffers or + DRI2GetBuffersWithFormat) become inappropriate because they + don't match the drawable dimensions anymore, or a buffer swap + has been performed. + + Note that the server is only required to warn the client once + about this condition, until the client takes care of bringing + them back up-to-date with another GetBuffers request. + + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ + +10. Extension Versioning The DRI2 extension has undergone a number of revisions before @@ -341,30 +502,40 @@ 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. + + 2.3: Added the DRI2InvalidateBuffers event. + + 2.6: Enlightenment attained. Added the DRI2BufferHiz attachment. + 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. @@ -386,6 +557,7 @@ A.1 Common Types ┌─── DRI2DRIVER 0x0 DRI2DriverDRI + 0x1 DRI2DriverVDPAU └─── ┌─── @@ -400,6 +572,7 @@ A.1 Common Types 0x7 DRI2BufferFakeFrontLeft 0x8 DRI2BufferFakeFrontRight 0x9 DRI2BufferDepthStencil + 0xa DRI2BufferHiz └─── Used to encode the possible attachment points. The attachment DRI2BufferDepthStencil is only available with protocol version 1.1 or @@ -449,20 +622,21 @@ A.2 Protocol Requests DRI2Connect 1 CARD8 major opcode 1 1 DRI2 opcode - 2 3+(n+p)/4 length + 2 3 length 4 WINDOW window 4 CARD32 driver type ▶ 1 1 Reply 1 unused 2 CARD16 sequence number - 4 (n+m+p)/4 reply length + 4 (n+m+p+q)/4 reply length 4 n driver name length 4 m device name length 16 unused n CARD8 driver name + p unused, p=pad(n) m CARD8 device name - p unused, p=pad(n+m) + q unused, q=pad(m) └─── ┌─── @@ -538,10 +712,158 @@ A.2 Protocol Requests 5n LISTofDRI2BUFFER buffers └─── +┌─── + 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 +└─── + +┌─── + 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 +└─── + +┌─── + 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. +The DRI2 extension specifies DRI2_BufferSwapComplete and +DRI2_InvalidateBuffers events. +┌─── + DRI2_BufferSwapComplete + 1 CARD8 type + 1 CARD8 extension + 2 CARD16 sequenceNumber + 2 CARD16 event_type + 4 DRAWABLE drawable + 4 CARD32 ust_hi + 4 CARD32 ust_lo + 4 CARD32 msc_hi + 4 CARD32 msc_lo + 4 CARD32 sbc_hi + 4 CARD32 sbc_lo +└─── + + +┌─── + DRI2_InvalidateBuffers + 1 CARD8 type + 1 CARD8 extension + 2 CARD16 sequenceNumber + 4 DRAWABLE drawable + 4 CARD32 unused + 4 CARD32 unused + 4 CARD32 unused + 4 CARD32 unused + 4 CARD32 unused + 4 CARD32 unused +└─── A.4 Protocol Errors diff --git a/proto/dri2proto/dri2tokens.h b/proto/dri2proto/dri2tokens.h index 7804e4d1a..16c90080a 100644 --- a/proto/dri2proto/dri2tokens.h +++ b/proto/dri2proto/dri2tokens.h @@ -43,6 +43,7 @@ #define DRI2BufferFakeFrontLeft 7 #define DRI2BufferFakeFrontRight 8 #define DRI2BufferDepthStencil 9 +#define DRI2BufferHiz 10 #define DRI2DriverDRI 0 #define DRI2DriverVDPAU 1 |