[RFC dri3proto 01/16] Add modifier/multi-plane requests, bump to v1.1

Daniel Stone daniels at collabora.com
Thu Jun 8 18:43:27 UTC 2017


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;
+} xDRI3PixmapFromBuffersReq;
+#define sz_xDRI3PixmapFromBuffersReq 64
+
+typedef struct {
+    CARD8   reqType;
+    CARD8   dri3ReqType;
+    CARD16  length B16;
+    CARD32  pixmap B32;
+} xDRI3BuffersFromPixmapReq;
+#define sz_xDRI3BuffersFromPixmapReq     8
+
+typedef struct {
+    BYTE    type;   /* X_Reply */
+    CARD8   nfd;    /* Number of file descriptors returned */
+    CARD16  sequenceNumber B16;
+    CARD32  length B32;
+    CARD16  width B16;
+    CARD16  height B16;
+    CARD32  format B32;
+    CARD32  modifier_hi B32;
+    CARD32  modifier_lo B32;
+    CARD32  pad24 B32;
+    CARD32  pad28 B32;
+} xDRI3BuffersFromPixmapReply;
+#define sz_xDRI3BuffersFromPixmapReply   56
+
+typedef struct {
+    CARD8   reqType;
+    CARD8   dri3ReqType;
+    CARD16  length B16;
+    CARD32  drawable B32;
+    CARD32  fence B32;
+} xDRI3FenceFromDMAFenceFDReq;
+
+#define sz_xDRI3FenceFromDMAFenceFDReq  12
+
+typedef struct {
+    CARD8   reqType;
+    CARD8   dri3ReqType;
+    CARD16  length B16;
+    CARD32  drawable B32;
+    CARD32  fence B32;
+} xDRI3DMAFenceFDFromFenceReq;
+
+#define sz_xDRI3DMAFenceFDFromFenceReq  12
+
+typedef struct {
+    BYTE    type;   /* X_Reply */
+    CARD8   nfd;    /* Number of file descriptors returned (1) */
+    CARD16  sequenceNumber B16;
+    CARD32  length B32;
+    CARD32  pad08 B32;
+    CARD32  pad12 B32;
+    CARD32  pad16 B32;
+    CARD32  pad20 B32;
+    CARD32  pad24 B32;
+    CARD32  pad28 B32;
+} xDRI3DMAFenceFDFromFenceReply;
+
+#define sz_xDRI3DMAFenceFDFromFenceReply   32
+
 #endif
-- 
2.13.0



More information about the xorg-devel mailing list