[xcb-proto,4/4] DRI3: Add multi-planar, modifier and dma-fence support

Submitted by Daniel Stone on June 8, 2017, 6:41 p.m.

Details

Message ID 20170608184111.4704-5-daniels@collabora.com
State New
Headers show
Series "Support lists of FDs, DRI3 v1.1" ( rev: 1 ) in XCB

Not browsing as part of any series.

Commit Message

Daniel Stone June 8, 2017, 6:41 p.m.
Bumping to version 1.1, add support for:
  - querying formats and modifiers supported by the server
  - creating (and receiving) multi-planar buffers
  - creating (and receiving) buffers with modifiers
  - mapping between dma-fence FDs and Present fences

Signed-off-by: Daniel Stone <daniels@collabora.com>
---
 src/dri3.xml | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 91 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/dri3.xml b/src/dri3.xml
index 608af31..7b09284 100644
--- a/src/dri3.xml
+++ b/src/dri3.xml
@@ -23,7 +23,7 @@  OF THIS SOFTWARE.
 -->
 
 <xcb header="dri3" extension-xname="DRI3" extension-name="DRI3"
-  major-version="1" minor-version="0">
+  major-version="1" minor-version="1">
   <import>xproto</import>
 
   <!-- Types -->
@@ -94,4 +94,94 @@  OF THIS SOFTWARE.
     </reply>
   </request>
 
+  <!-- v1.1 -->
+  <request name="GetSupportedFormats" opcode="6">
+    <field type="CARD32" name="window" />
+    <reply>
+      <pad bytes="1" />
+      <field type="CARD32" name="num_formats" />
+      <pad bytes="20" />
+      <list type="CARD32" name="formats">
+        <fieldref>num_formats</fieldref>
+      </list>
+    </reply>
+  </request>
+
+  <request name="GetSupportedModifiers" opcode="7">
+    <field type="CARD32" name="window" />
+    <field type="CARD32" name="format"/>
+    <reply>
+      <pad bytes="1" />
+      <field type="CARD32" name="format" />
+      <field type="CARD32" name="num_modifiers" />
+      <pad bytes="16" />
+      <list type="CARD32" name="modifiers"> <!-- CARD32 hi followed by lo -->
+        <op op="*">
+          <fieldref>num_modifiers</fieldref>
+          <value>2</value>
+        </op>
+      </list>
+    </reply>
+  </request>
+
+  <request name="PixmapFromBuffers" opcode="8">
+    <field type="PIXMAP" name="pixmap" />
+    <field type="DRAWABLE" name="drawable" />
+    <field type="CARD8" name="num_buffers" />
+    <pad bytes="3" />
+    <field type="CARD16" name="width" />
+    <field type="CARD16" name="height" />
+    <field type="CARD32" name="stride0" />
+    <field type="CARD32" name="offset0" />
+    <field type="CARD32" name="stride1" />
+    <field type="CARD32" name="offset1" />
+    <field type="CARD32" name="stride2" />
+    <field type="CARD32" name="offset2" />
+    <field type="CARD32" name="stride3" />
+    <field type="CARD32" name="offset3" />
+    <field type="CARD32" name="format" />
+    <field type="CARD32" name="modifier_hi" />
+    <field type="CARD32" name="modifier_lo" />
+    <list type="fd" name="buffers">
+      <fieldref>num_buffers</fieldref>
+    </list>
+  </request>
+
+  <request name="BuffersFromPixmap" opcode="9">
+    <field type="PIXMAP" name="pixmap" />
+    <reply>
+      <field type="CARD8" name="nfd"/>
+      <field type="CARD16" name="width" />
+      <field type="CARD16" name="height" />
+      <field type="CARD32" name="format" />
+      <field type="CARD32" name="modifier_hi" />
+      <field type="CARD32" name="modifier_lo" />
+      <pad bytes="8"/>
+      <list type="CARD32" name="strides">
+        <fieldref>nfd</fieldref>
+      </list>
+      <list type="CARD32" name="offsets">
+        <fieldref>nfd</fieldref>
+      </list>
+      <list type="fd" name="buffers">
+        <fieldref>nfd</fieldref>
+      </list>
+    </reply>
+  </request>
+
+  <request name="FenceFromDMAFenceFD" opcode="10">
+    <field type="DRAWABLE" name="drawable" />
+    <field type="CARD32" name="fence"/>
+    <fd name="fence_fd"/>
+  </request>
+
+  <request name="DMAFenceFDFromFence" opcode="11">
+    <field type="DRAWABLE" name="drawable" />
+    <field type="CARD32" name="fence"/>
+    <reply>
+      <field type="CARD8" name="nfd"/>
+      <fd name="fence_fd" />
+      <pad bytes="24"/>
+    </reply>
+  </request>
 </xcb>