[PATCH 1/6] Add protocol for DRI2GetBuffersWithFormat

Ian Romanick idr at freedesktop.org
Mon Apr 20 21:16:24 PDT 2009


This function replaces DRI2GetBuffers.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 configure.ac  |    2 +-
 dri2proto.h   |    5 ++-
 dri2proto.txt |   67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 dri2tokens.h  |    1 +
 4 files changed, 70 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 234426c..2d8fdc8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.57])
-AC_INIT([DRI2Proto], [2.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AC_INIT([DRI2Proto], [2.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 
 # Require xorg-macros: XORG_CHANGELOG
diff --git a/dri2proto.h b/dri2proto.h
index dc3f2d1..8d76079 100644
--- a/dri2proto.h
+++ b/dri2proto.h
@@ -35,11 +35,11 @@
 
 #define DRI2_NAME			"DRI2"
 #define DRI2_MAJOR			1
-#define DRI2_MINOR			0
+#define DRI2_MINOR			1
 
 #define DRI2NumberErrors		0
 #define DRI2NumberEvents		0
-#define DRI2NumberRequests		7
+#define DRI2NumberRequests		8
 
 #define X_DRI2QueryVersion		0
 #define X_DRI2Connect			1
@@ -48,6 +48,7 @@
 #define X_DRI2DestroyDrawable		4
 #define X_DRI2GetBuffers		5
 #define X_DRI2CopyRegion		6
+#define X_DRI2GetBuffersWithFormat	7
 
 typedef struct {
     CARD32  attachment B32;
diff --git a/dri2proto.txt b/dri2proto.txt
index 106f8d8..cc62702 100644
--- a/dri2proto.txt
+++ b/dri2proto.txt
@@ -142,7 +142,8 @@ DRI2ATTACHMENT { DRI2BufferFrontLeft
 	       	 DRI2BufferStencil
 	       	 DRI2BufferAccum
 		 DRI2BufferFakeFrontLeft
-		 DRI2BufferFakeFrontRight }
+		 DRI2BufferFakeFrontRight
+	       	 DRI2BufferDepthStencil }
 
 	These values describe various attachment points for DRI2
 	buffers.
@@ -159,6 +160,13 @@ DRI2BUFFER { attachment: CARD32
 	underlying kernel buffer,
 
 
+DRI2ATTACH_FORMAT { attachment: CARD32
+		    format:     CARD32 }
+
+	The DRI2ATTACH_FORMAT describes an attachment and the associated
+	format.  'attachment' describes the attachment point for the buffer,
+	'format' describes an opaque, device-dependent format for the buffer.
+
 			     âš™ âš™ âš™  âš™ âš™ âš™
 
 
@@ -281,6 +289,31 @@ The name of this extension is "DRI2".
 	rendering the next frame.
 
 
+┌───
+    DRI2GetBuffersWithFormat
+	drawable: DRAWABLE
+	attachments: LISTofDRI2ATTACH_FORMAT
+      â–¶	
+	width, height: CARD32
+	buffers: LISTofDRI2BUFFER
+└───
+	Errors: Window
+
+	Get buffers for the provided attachment points with the specified
+	formats for the given drawable.
+
+	If the DDX driver does not support one or more of the
+	specified attachment points or formats, a Value error is generated,
+	with the first unsupported attachment point as the error value.
+
+	'width' and 'height' describes the dimensions of the drawable.
+
+	'buffers' is a list of DRI2BUFFER for the given DRI2
+	attachment points.
+
+	This request is only available with protocol version 1.1 or
+	later.
+
 			     âš™ âš™ âš™  âš™ âš™ âš™
 
 
@@ -366,8 +399,11 @@ A.1 Common Types
 	0x6	DRI2BufferAccum
 	0x7	DRI2BufferFakeFrontLeft
 	0x8	DRI2BufferFakeFrontRight
+	0x9	DRI2BufferDepthStencil
 └───
-	Used to encode the possible attachment points.
+	Used to encode the possible attachment points.  The attachment
+	DRI2BufferDepthStencil is only available with protocol version 1.1 or
+	later.
 
 ┌───
     DRI2BUFFER
@@ -381,6 +417,14 @@ A.1 Common Types
 	manager name, the pitch and chars per pixel for a buffer
 	attached to a given drawable.
 
+┌───
+    DRI2ATTACH_FORMAT
+	4	CARD32	attachment
+	4	CARD32	format
+└───
+	Used to describe the attachment and format requested from the server.
+	This data type is only available with protocol version 1.1 or
+	later.
 
 A.2 Protocol Requests
 
@@ -474,6 +518,25 @@ A.2 Protocol Requests
 	24				unused	
 └───
 
+┌───
+    DRI2GetBuffersWithFormat
+	1	CARD8			major opcode
+	1	3			DRI2 opcode
+	2	3			length
+	4	DRAWABLE		drawable
+	4	n			number of attachments
+	8n	LISTofDRI2ATTACH_FORMAT	attachments and formats
+      â–¶	
+	1	1			Reply
+        1				unused
+	2	CARD16			sequence number
+	4	0			reply length
+	4	CARD32			width of drawable
+	4	CARD32			height of drawable
+	4	CARD32			buffer count
+	12				unused	
+	5n	LISTofDRI2BUFFER	buffers
+└───
 
 A.3 Protocol Events
 
diff --git a/dri2tokens.h b/dri2tokens.h
index 087159f..d56e4fb 100644
--- a/dri2tokens.h
+++ b/dri2tokens.h
@@ -42,6 +42,7 @@
 #define DRI2BufferAccum			6
 #define DRI2BufferFakeFrontLeft		7
 #define DRI2BufferFakeFrontRight	8
+#define DRI2BufferDepthStencil		9
 
 #define DRI2DriverDRI			0
 
-- 
1.6.0.6



More information about the xorg-devel mailing list