DRI2 Event BufferSwapComplete too long for core protocol?

Ian Romanick idr at freedesktop.org
Thu Dec 16 12:19:29 PST 2010


-----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-----



More information about the xorg mailing list