From: Jesse Barnes Subject: Re: [PATCH] glxproto: make GLX swap event struct match spec Date: Tue, 3 May 2011 14:08:58 -0700 Message-ID: <20110503140858.65d5f945@jbarnes-desktop> References: <1304450489-31415-1-git-send-email-jbarnes@virtuousgeek.org> <1304450489-31415-2-git-send-email-jbarnes@virtuousgeek.org> <20110503140231.704a1b5c@jbarnes-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110503140231.704a1b5c@jbarnes-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: xorg-devel-bounces+gcfxd-xorg-devel=m.gmane.org-go0+a7rfsptAfugRpC6u6w@public.gmane.org Errors-To: xorg-devel-bounces+gcfxd-xorg-devel=m.gmane.org-go0+a7rfsptAfugRpC6u6w@public.gmane.org Cc: xorg-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org List-Id: dri-devel@lists.freedesktop.org On Tue, 3 May 2011 14:02:31 -0700 Jesse Barnes wrote: > On Tue, 03 May 2011 13:54:38 -0700 > Keith Packard wrote: > > > On Tue, 3 May 2011 12:21:24 -0700, Jesse Barnes wrote: > > > > > We only spec a 32 bit swap count, so drop the high sbc field. > > > > You're missing the explicit 16-bit padding field after 'event_type' > > > > The documented encoding > > http://www.opengl.org/registry/specs/INTEL/swap_event.txt needs to be > > fixed to match this, it has the padding at the end which leaves most of > > the structure mis-aligned. > > Right, another case where we updated the spec incorrectly then failed > to make the code match the broken definition (the complete enums also > need to match the final values, which are correct in the first part of > the spec). Yay for divergence. Fixed version below. -- Jesse Barnes, Intel Open Source Technology Center >From f5403828c68af0f12c79c0504df0a4781ca84b2b Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Tue, 3 May 2011 12:14:10 -0700 Subject: [PATCH] glxproto: make GLX swap event struct match spec We only spec a 32 bit swap count, so drop the high sbc field. Also make the padding explicit (most compilers would have already done this since it's not a packed structure, but making it explicit should prevent surprises in the future). Signed-off-by: Jesse Barnes --- configure.ac | 2 +- glxproto.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index d88e6df..a3047e4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.60]) -AC_INIT([GLProto], [1.4.12], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AC_INIT([GLProto], [1.4.13], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE diff --git a/glxproto.h b/glxproto.h index 0ff44e3..dfa0647 100644 --- a/glxproto.h +++ b/glxproto.h @@ -1375,13 +1375,13 @@ typedef struct { BYTE pad; CARD16 sequenceNumber B16; CARD16 event_type B16; + CARD16 pad2; CARD32 drawable; CARD32 ust_hi B32; CARD32 ust_lo B32; CARD32 msc_hi B32; CARD32 msc_lo B32; - CARD32 sbc_hi B32; - CARD32 sbc_lo B32; + CARD32 sbc B32; } xGLXBufferSwapComplete; /************************************************************************/ -- 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