All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes-Y1mF5jBUw70BENJcbMCuUQ@public.gmane.org>
To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	xorg-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH] DRI2: fix swap complete event size by using a generic event
Date: Tue,  3 May 2011 10:59:14 -0700	[thread overview]
Message-ID: <1304445561-9910-2-git-send-email-jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <1304445561-9910-1-git-send-email-jbarnes-Y1mF5jBUw70BENJcbMCuUQ@public.gmane.org>

The existing swap complete event is too large to fit in an XEvent, so
use a generic event instead.  New servers and clients can use this
structure to fully pass the swap count along with the media stamp
counter, swap complete type, and timestamp.

Signed-off-by: Jesse Barnes <jbarnes-Y1mF5jBUw70BENJcbMCuUQ@public.gmane.org>
---
 configure.ac |    2 +-
 dri2proto.h  |   22 ++++++++++++++++++++--
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5b78d6b..9505f56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.60])
-AC_INIT([DRI2Proto], [2.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AC_INIT([DRI2Proto], [2.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
diff --git a/dri2proto.h b/dri2proto.h
index 9708a4a..5a7d3e1 100644
--- a/dri2proto.h
+++ b/dri2proto.h
@@ -35,7 +35,7 @@
 
 #define DRI2_NAME			"DRI2"
 #define DRI2_MAJOR			1
-#define DRI2_MINOR			3
+#define DRI2_MINOR			4
 
 #define DRI2NumberErrors		0
 #define DRI2NumberEvents		2
@@ -298,7 +298,25 @@ typedef struct {
     CARD32 sbc_hi B32;
     CARD32 sbc_lo B32;
 } xDRI2BufferSwapComplete;
-#define sz_xDRI2BufferSwapComplete 32
+#define sz_xDRI2BufferSwapComplete 32 /* This should have been 36 */
+
+/* Use a generic event so we can transmit the sbc_lo value as well */
+typedef struct {
+    BYTE type;
+    CARD8 extension;
+    CARD16 sequenceNumber B16;
+    CARD32 length B32; /* should always be 8 for this event */
+    CARD16 evtype B16;
+    CARD16 swap_event_type B16;
+    CARD32 drawable B32;
+    CARD32 ust_hi B32;
+    CARD32 ust_lo B32;
+    CARD32 msc_hi B32;
+    CARD32 msc_lo B32;
+    CARD32 sbc_hi B32;
+    CARD32 sbc_lo B32;
+} xDRI2BufferSwapComplete2;
+#define sz_xDRI2BufferSwapComplete2 38
 
 typedef struct {
     CARD8 type;
-- 
1.7.4.1

_______________________________________________
xorg-devel-go0+a7rfsptAfugRpC6u6w@public.gmane.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

  parent reply	other threads:[~2011-05-03 17:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03 17:59 [RFC] swap complete event handling fixes Jesse Barnes
     [not found] ` <1304445561-9910-1-git-send-email-jbarnes-Y1mF5jBUw70BENJcbMCuUQ@public.gmane.org>
2011-05-03 17:59   ` Jesse Barnes [this message]
2011-05-03 17:59   ` [PATCH] GLX: fix broken swap event size by using a generic event Jesse Barnes
2011-05-03 17:59   ` [PATCH 3/5] GLX: don't crash when indirect clients try to set an event mask Jesse Barnes
2011-05-03 17:59   ` [PATCH 4/5] DRI2: support generic swap event handling Jesse Barnes
2011-05-03 17:59 ` [PATCH 5/5] GLX: support generic swap events Jesse Barnes
2011-05-03 17:59 ` [PATCH 6/8] GLX/DRI2: pass drawable correctly for indirect " Jesse Barnes
2011-05-03 17:59 ` [PATCH 7/8] DRI2: support generic " Jesse Barnes
2011-05-03 17:59 ` [PATCH 8/8] GLX: " Jesse Barnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1304445561-9910-2-git-send-email-jbarnes@virtuousgeek.org \
    --to=jbarnes-y1mf5jbuw70benjcbmcuuq@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=xorg-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.