DRI2 Event BufferSwapComplete too long for core protocol?

Mikko Markus Torni mikko.markus.torni at iki.fi
Sun Nov 28 21:57:16 PST 2010


Hi,

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

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

-- 
Tel: +358-44-5233421



More information about the xorg mailing list