dri2proto: Branch 'master'

Kristian Høgsberg krh at kemper.freedesktop.org
Thu Aug 28 13:06:10 PDT 2008


 Makefile.am  |    2 -
 configure.ac |    2 -
 dri2proto.h  |   63 +++++++++++++++++++++++++++++++++++++++--------------------
 dri2tokens.h |   44 +++++++++++++++++++++++++++++++++++++++++
 4 files changed, 88 insertions(+), 23 deletions(-)

New commits:
commit abb1edc487543c26856afdbe6a7e2c088a1e82ee
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Tue Aug 12 12:52:33 2008 -0400

    Update to 1.99.1 - drop sarea and perform swap buffer in X server.
    
    Still to resolve is the swap buffer request.  It should probably be
    broken into two requests, one to post the swap request and one to wait
    for it to be completed.  Also, need to find a good solution to
    CopySubBuffer that doesn't require a roundtrip per rectangle.
    
    Don't need to solve all this for 2.0, though, can add requests later on.

diff --git a/Makefile.am b/Makefile.am
index 984eede..64f26a5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
 dri2dir = $(includedir)/X11/extensions
-dri2_HEADERS = dri2proto.h
+dri2_HEADERS = dri2proto.h dri2tokens.h
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = dri2proto.pc
diff --git a/configure.ac b/configure.ac
index 05ab2b9..833686b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.57])
-AC_INIT([DRI2Proto], [1.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AC_INIT([DRI2Proto], [1.99.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 
 XORG_RELEASE_VERSION
diff --git a/dri2proto.h b/dri2proto.h
index 3e1727d..c355c2b 100644
--- a/dri2proto.h
+++ b/dri2proto.h
@@ -46,7 +46,8 @@
 #define X_DRI2AuthConnection		2
 #define X_DRI2CreateDrawable		3
 #define X_DRI2DestroyDrawable		4
-#define X_DRI2ReemitDrawableInfo	5
+#define X_DRI2GetBuffers		5
+#define X_DRI2SwapBuffers		6
 
 typedef struct {
     CARD8   reqType;
@@ -86,10 +87,10 @@ typedef struct {
     CARD32  length B32;
     CARD32  driverNameLength B32;
     CARD32  busIdLength B32;
-    CARD32  sareaHandle B32;
     CARD32  pad2 B32;
     CARD32  pad3 B32;
     CARD32  pad4 B32;
+    CARD32  pad5 B32;
 } xDRI2ConnectReply;
 #define sz_xDRI2ConnectReply	32
 
@@ -125,20 +126,6 @@ typedef struct {
 #define sz_xDRI2CreateDrawableReq	8
 
 typedef struct {
-    BYTE    type;   /* X_Reply */
-    BYTE    pad1;
-    CARD16  sequenceNumber B16;
-    CARD32  length B32;
-    CARD32  handle B32;
-    CARD32  head B32;
-    CARD32  pad2 B32;
-    CARD32  pad3 B32;
-    CARD32  pad4 B32;
-    CARD32  pad5 B32;
-} xDRI2CreateDrawableReply;
-#define sz_xDRI2CreateDrawableReply	32
-
-typedef struct {
     CARD8   reqType;
     CARD8   dri2ReqType;
     CARD16  length B16;
@@ -147,25 +134,59 @@ typedef struct {
 #define sz_xDRI2DestroyDrawableReq	8
 
 typedef struct {
+    CARD32  attachment B32;
+    CARD32  name B32;
+    CARD32  pitch B32;
+    CARD32  cpp B32;
+    CARD32  flags B32;
+} xDRI2Buffer;
+
+typedef struct {
+    CARD8   reqType;
+    CARD8   dri2ReqType;
+    CARD16  length B16;
+    CARD32  drawable B32;
+    CARD32  count B32;
+} xDRI2GetBuffersReq;
+#define sz_xDRI2GetBuffersReq   12
+
+typedef struct {
+    BYTE    type;   /* X_Reply */
+    BYTE    pad1;
+    CARD16  sequenceNumber B16;
+    CARD32  length B32;
+    CARD32  width B32;
+    CARD32  height B32;
+    CARD32  count B32;
+    CARD32  pad3 B32;
+    CARD32  pad4 B32;
+    CARD32  pad6 B32;
+} xDRI2GetBuffersReply;
+#define sz_xDRI2GetBuffersReply	32
+
+typedef struct {
     CARD8   reqType;
     CARD8   dri2ReqType;
     CARD16  length B16;
     CARD32  drawable B32;
-} xDRI2ReemitDrawableInfoReq;
-#define sz_xDRI2ReemitDrawableInfoReq   8
+    INT16   x B16, y B16;
+    CARD16  width B16, height B16;
+    CARD32  flags B32;
+} xDRI2SwapBuffersReq;
+#define sz_xDRI2SwapBuffersReq   20
 
 typedef struct {
     BYTE    type;   /* X_Reply */
     BYTE    pad1;
     CARD16  sequenceNumber B16;
     CARD32  length B32;
-    CARD32  head B32;
     CARD32  pad2 B32;
     CARD32  pad3 B32;
     CARD32  pad4 B32;
     CARD32  pad5 B32;
     CARD32  pad6 B32;
-} xDRI2ReemitDrawableInfoReply;
-#define sz_xDRI2ReemitDrawableInfoReply	32
+    CARD32  pad7 B32;
+} xDRI2SwapBuffersReply;
+#define sz_xDRI2SwapBuffersReply	32
 
 #endif
diff --git a/dri2tokens.h b/dri2tokens.h
new file mode 100644
index 0000000..3e71c17
--- /dev/null
+++ b/dri2tokens.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright © 2008 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Soft-
+ * ware"), to deal in the Software without restriction, including without
+ * limitation the rights to use, copy, modify, merge, publish, distribute,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, provided that the above copyright
+ * notice(s) and this permission notice appear in all copies of the Soft-
+ * ware and that both the above copyright notice(s) and this permission
+ * notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+ * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
+ * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
+ * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-
+ * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR-
+ * MANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization of
+ * the copyright holder.
+ *
+ * Authors:
+ *   Kristian Høgsberg (krh at redhat.com)
+ */
+
+#ifndef _DRI2_TOKENS_H_
+#define _DRI2_TOKENS_H_
+
+#define DRI2_BUFFER_FRONT_LEFT		0
+#define DRI2_BUFFER_BACK_LEFT		1
+#define DRI2_BUFFER_FRONT_RIGHT		2
+#define DRI2_BUFFER_BACK_RIGHT		3
+#define DRI2_BUFFER_DEPTH		4
+#define DRI2_BUFFER_STENCIL		5
+#define DRI2_BUFFER_ACCUM		6
+
+#endif


More information about the xorg-commit mailing list