mismatch between the size of xDRI2BufferSwapComplete and sz_xDRI2BufferSwapComplete
SooChan Lim
soochanl at gmail.com
Thu Apr 14 22:21:03 PDT 2011
Hi, all.
I have been trying to test the DRI2 protocol in my local machine, and I
found that my test program gets the wrong sbc value when a test application
has the DRI2BufferSwapComplete Event.
I have looked into the source code related to DRI2, I found out that the
size of the xDRI2BufferSwapComplete is not 32 bytes.
The size of the xDRI2BufferSwapComplete is 36 bytes, but
sz_xDRI2BufferSwapComplete is defined 32 bytes.
The xEvent has to be 32 bytes, so I think that the size of
the xDRI2BufferSwapComplete has to be 32 bytes.
Therefore, I modified the dri2proto header.
Please see below and give me some opinion.
Thank you.
SooChan Lim
- protocol of xDRI2BufferSwapComplete
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
- file patched
diff --git a/dri2proto.h b/dri2proto.h
old mode 100644
new mode 100755
index 9708a4a..e9d77e2
--- a/dri2proto.h
+++ b/dri2proto.h
@@ -287,9 +287,8 @@ typedef struct {
typedef struct {
CARD8 type;
- CARD8 pad;
+ CARD8 event_type;
CARD16 sequenceNumber B16;
- CARD16 event_type B16;
CARD32 drawable B32;
CARD32 ust_hi B32;
CARD32 ust_lo B32;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110415/2646c3e4/attachment.html>
More information about the xorg-devel
mailing list