Add missing CreateDrawable/DestroyDrawable requests Add MSC/SBC parameters to DRI2SwapBuffers Complete revision history section. Add brief description of the prime bits in driverType
Signed-off-by: Keith Packard <[email protected]> --- dri2proto.txt | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 104 insertions(+), 14 deletions(-) diff --git a/dri2proto.txt b/dri2proto.txt index 9921301..aef7c0f 100644 --- a/dri2proto.txt +++ b/dri2proto.txt @@ -6,6 +6,24 @@ [email protected] Red Hat, Inc + Ian Romanick + [email protected] + Intel Corporation + + Jesse Barnes + [email protected] + Intel Corporation + + Francisco Jerez + [email protected] + + Chad Versace + [email protected] + Intel Corporation + + Dave Airlie + [email protected] + Red Hat, Inc 1. Introduction @@ -21,9 +39,6 @@ Direct rendering implementations of OpenVG, Xv, cairo and other graphics APIs should find the functionality exposed by this extension helpful and hopefully sufficient. -Relation to XF86DRI - - 1.1. Acknowledgements Kevin E. Martin <[email protected]> @@ -62,7 +77,6 @@ and submit the rendering requests is outside the scope of this specification. However, Appendix B does discuss implementation of this specification on the Graphics Execution Manager (GEM). - 2.3. Request ordering No ordering between swap buffers and X rendering. X rendering to src @@ -130,7 +144,8 @@ 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. +changes, either due to window size changes, buffer swapping or page +flipping. ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ @@ -140,6 +155,9 @@ changes. The server side region support specified in the Xfixes extension version 2 is used in the CopyRegion request. +DRI2CLIENTBUF + A reference to a client-allocated buffer for use with the + swap request. ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ @@ -251,7 +269,10 @@ The name of this extension is "DRI2". Returns the driver name and device file to use for the specified driver type for the screen associated with 'window'. - 'type' identifies the type of driver to query for. + 'type' identifies the type of driver to query for. The lower + 16 bits of this value are used for the driverType, bits 16-19 + are used for the Prime ID, which identifies a non-master GPU + providing rendering or display support. 'driver' is the name of the driver to load. The client is assumed to know where to look for the drivers and what to do @@ -272,13 +293,13 @@ The name of this extension is "DRI2". ┌─── DRI2Authenticate window: WINDOW - token: CARD32 + magic: CARD32 ▶ authenticated: CARD32 └─── Errors: Window - Request that the X server authenticates 'token', allowing the + Request that the X server authenticates 'magic', allowing the client to access the DRM buffers created by the X server on the screen associated with 'window'. @@ -286,6 +307,26 @@ The name of this extension is "DRI2". invalid token is passed, in which case authenticated is False. ┌─── + DRI2CreateDrawable + drawable: DRAWABLE +└─── + Errors: Drawable + + This request lets the X server know that the application is + performing DRI2 operations on the target drawable. This causes + the server to deliver InvalidateBuffers events as needed. + +┌─── + DRI2DestroyDrawable + drawable: DRAWABLE +└─── + Errors: Drawable + + This request appears to have no effect on the X server, but + presumably it should cause the server to stop delivering + InvalidateBuffers events? + +┌─── DRI2GetBuffers drawable: DRAWABLE attachments: LISTofDRI2ATTACHMENTS @@ -293,7 +334,7 @@ The name of this extension is "DRI2". width, height: CARD32 buffers: LISTofDRI2BUFFER └─── - Errors: Window + Errors: Drawable, Value Get buffers for the provided attachment points for the given drawable. @@ -315,18 +356,25 @@ The name of this extension is "DRI2". destination: DRI2ATTACHMENT ▶ └─── - Errors: Window, Value + Errors: Drawable, Value Schedule a copy from one DRI2 buffer to another. The DRICopyRegion request has a reply but it is empty. The reply is there to let the direct rendering client wait until the server has seen the request before proceeding with - rendering the next frame. + rendering the next frame. An invalid source or destination + parameter causes a Value error. ┌─── DRI2SwapBuffers drawable: DRAWABLE + target_msc_hi: CARD32 + target_msc_lo: CARD32 + divisor_hi: CARD32 + divisor_lo: CARD32 + remainder_hi: CARD32 + remainder_lo: CARD32 ▶ count: two CARD32s └─── @@ -335,6 +383,17 @@ The name of this extension is "DRI2". Schedule a swap of the front and back buffers with the display server. + target_msc_hi/target_msc_lo form a 64-bit value marking the + target media stamp count for the swap request. When non-zero, + these mark the desired time where the data should be + presented. + + divisor_hi/divisor_lo form a 64-bit value marking the desired + media stamp count interval between swaps. + + remainder_hi/remainder_lo form a 64-bite value marking the + desired offset within the divisor_hi/divisor_lo swap interval. + Returns the swap count value when the swap will actually occur (e.g. the last queued swap count + (pending swap count * swap interval)). @@ -536,14 +595,29 @@ The DRI2 extension has undergone a number of revisions before more flexible object creation. 2.2: Approaching perfection. Added requests for swapbuffers, - MSC and SBC related requests, and events. + MSC and SBC related requests, and events. Also adds + support for VDPAU drivers. + + 2.3: Added the DRI2InvalidateBuffers event to notify + applications when their buffers have become invalid, + either due to a window resize or a buffer swap. - 2.3: Added the DRI2InvalidateBuffers event. + 2.4: Fix some encoding issues in the DRI2BufferSwapComplete + events; they were accidentally trying to use 36 bytes, + which doesn't work well with standard sized X events. - 2.6: Enlightenment attained. Added the DRI2BufferHiz attachment. + 2.5: Rework the DRI2BufferSwapComplete event encoding snafu by + adding a new DRI2BufferSwapComplete2 event that exposes + the new structure. This ensures ABI/API compatibility + with older X server and library versions. + + 2.6: Added the DRI2BufferHiz attachment. 2.7: Added the DRI2GetParam request. + 2.8: Add "prime" support. This allows buffers to be labeled + with the offload device id. + Compatibility up to 2.0 is not preserved, but was also never released. @@ -688,6 +762,22 @@ A.2 Protocol Requests └─── ┌─── + DRI2CreateDrawable + 1 CARD8 major opcode + 1 2 DRI2 opcode + 2 2 length + 4 DRAWABLE drawable +└─── + +┌─── + DRI2DestroyDrawable + 1 CARD8 major opcode + 1 2 DRI2 opcode + 2 2 length + 4 DRAWABLE drawable +└─── + +┌─── DRI2GetBuffers 1 CARD8 major opcode 1 5 DRI2 opcode -- 1.7.10.4 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
