[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    Re: DRI2 Event BufferSwapComplete too long for core protocol?
From:       Ian Romanick <idr () freedesktop ! org>
Date:       2010-12-16 20:19:29
Message-ID: 4D0A7451.6060500 () freedesktop ! org
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/28/2010 09:57 PM, Mikko Markus Torni wrote:

> I was updating my local dri2.xml based on the latest dri2proto.h [1]
> and I noticed that the DRI2 event BufferSwapComplete is too long to fit
> core protocol events.
> 
> The best I can calculate is
>     sizeof(xDRI2BufferSwapComplete) == 34
> which disagrees with
>     #define sz_xDRI2BufferSwapComplete 32
> 
> I suppose if event_type would be a CARD8, it could fit where the padding
> is now and the length discrepancy would be fixed.
> 
> Any comments?
> 
> ---
> 
> /* Excerpt from dri2proto.h */
> typedef struct {
>     CARD8 type;
>     CARD8 pad;
>     CARD16 sequenceNumber B16;
>     CARD16 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;
> } xDRI2BufferSwapComplete;
> #define sz_xDRI2BufferSwapComplete 32

There was a similar issue in the protocol for the GLX_INTEL_swap_event
spec.  It got fixed there, and I thought Jesse fixed it in the DRI2
extension as well.

> /* Excerpt from dri2tokens.h */
> /* Event sub-types for the swap complete event */
> #define DRI2_EXCHANGE_COMPLETE  0x1
> #define DRI2_BLIT_COMPLETE      0x2
> #define DRI2_FLIP_COMPLETE      0x3
> 
>   [1] http://cgit.freedesktop.org/xorg/proto/dri2proto/tree/dri2proto.h
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0KdEoACgkQX1gOwKyEAw95TgCeOt9ETtBsv9UPxgWvJ+Kh7Ry5
fxMAoILWfp5pU25MHWyQfqhwg3lUlhFQ
=3VLk
-----END PGP SIGNATURE-----
_______________________________________________
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: freedesktop-xorg@progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic