[RFC dri3proto 01/16] Add modifier/multi-plane requests, bump to v1.1
Eric Anholt
eric at anholt.net
Sat Jun 17 01:21:30 UTC 2017
Daniel Stone <daniels at collabora.com> writes:
> DRI3 version 1.1 adds support for explicit format modifiers, including
> multi-planar buffers.
>
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> ---
> dri3proto.h | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 140 insertions(+), 2 deletions(-)
>
> diff --git a/dri3proto.h b/dri3proto.h
> index ceddee8..767f420 100644
> --- a/dri3proto.h
> +++ b/dri3proto.h
> @@ -25,7 +25,7 @@
>
> #define DRI3_NAME "DRI3"
> #define DRI3_MAJOR 1
> -#define DRI3_MINOR 0
> +#define DRI3_MINOR 1
>
> #define DRI3NumberErrors 0
> #define DRI3NumberEvents 0
> @@ -37,7 +37,15 @@
> #define X_DRI3FenceFromFD 4
> #define X_DRI3FDFromFence 5
>
> -#define DRI3NumberRequests 6
> +/* v1.1 */
> +#define xDRI3GetSupportedFormats 6
> +#define xDRI3GetSupportedModifiers 7
> +#define xDRI3PixmapFromBuffers 8
> +#define xDRI3BuffersFromPixmap 9
> +#define xDRI3FenceFromDMAFenceFD 10
> +#define xDRI3DMAFenceFDFromFrence 11
> +
> +#define DRI3NumberRequests 12
>
> typedef struct {
> CARD8 reqType;
> @@ -164,4 +172,134 @@ typedef struct {
>
> #define sz_xDRI3FDFromFenceReply 32
>
> +/* v1.1 */
> +
> +typedef struct {
> + CARD8 reqType;
> + CARD8 dri3ReqType;
> + CARD16 length B16;
> + CARD32 window B32;
> +} xDRI3GetSupportedFormatsReq;
> +#define sz_xDRI3GetSupportedFormatsReq 8
> +
> +typedef struct {
> + BYTE type; /* X_Reply */
> + CARD8 pad1;
> + CARD16 sequenceNumber B16;
> + CARD32 length B32;
> + CARD32 numFormats B32;
> + CARD32 pad12 B32;
> + CARD32 pad16 B32;
> + CARD32 pad20 B32;
> + CARD32 pad24 B32;
> + CARD32 pad28 B32;
> +} xDRI3GetSupportedFormatsReply;
> +#define sz_xDRI3GetSupportedFormatsReply 32
> +
> +typedef struct {
> + CARD8 reqType;
> + CARD8 dri3ReqType;
> + CARD16 length B16;
> + CARD32 window B32;
> + CARD32 format B32;
> +} xDRI3GetSupportedModifiersReq;
> +#define sz_xDRI3GetSupportedModifiersReq 12
> +
> +typedef struct {
> + BYTE type; /* X_Reply */
> + CARD8 pad1;
> + CARD16 sequenceNumber B16;
> + CARD32 length B32;
> + CARD32 format B32;
> + CARD32 numModifiers B32;
> + CARD32 pad16 B32;
> + CARD32 pad20 B32;
> + CARD32 pad24 B32;
> + CARD32 pad28 B32;
> +} xDRI3GetSupportedModifiersReply;
> +#define sz_xDRI3GetSupportedModifiersReply 32
> +
> +typedef struct {
> + CARD8 reqType;
> + CARD8 dri3ReqType;
> + CARD16 length B16;
> + CARD32 pixmap B32;
> + CARD32 drawable B32;
> + CARD8 num_buffers; /* Number of file descriptors passed */
> + CARD8 pad13;
> + CARD16 pad14 B16;
> + CARD16 width B16;
> + CARD16 height B16;
> + CARD32 stride0 B32;
> + CARD32 offset0 B32;
> + CARD32 stride1 B32;
> + CARD32 offset1 B32;
> + CARD32 stride2 B32;
> + CARD32 offset2 B32;
> + CARD32 stride3 B32;
> + CARD32 offset3 B32;
> + CARD32 format B32;
> + CARD32 modifier_hi B32;
> + CARD32 modifier_lo B32;
With the Present extension, we started putting CARD64s on the wire.
Let's use them here, too.
I don't really have other comments about the protocol yet, without the
documentation.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20170616/f1c59dc5/attachment.sig>
More information about the xorg-devel
mailing list