DRI2/GLX: use new swap event types

Use the new event types so we can pass a valid SBC value to clients.
Fix up the completion calls to use CARD32 instead of CARD64 to match
the new field size.

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:
Jesse Barnes 2011-05-05 13:11:46 -07:00
commit 932513e23b
4 changed files with 9 additions and 11 deletions

View file

@ -357,9 +357,9 @@ vals_to_card64(CARD32 lo, CARD32 hi)
static void
DRI2SwapEvent(ClientPtr client, void *data, int type, CARD64 ust, CARD64 msc,
CARD64 sbc)
CARD32 sbc)
{
xDRI2BufferSwapComplete event;
xDRI2BufferSwapComplete2 event;
DrawablePtr pDrawable = data;
event.type = DRI2EventBase + DRI2_BufferSwapComplete;
@ -369,8 +369,7 @@ DRI2SwapEvent(ClientPtr client, void *data, int type, CARD64 ust, CARD64 msc,
event.ust_lo = ust & 0xffffffff;
event.msc_hi = (CARD64)msc >> 32;
event.msc_lo = msc & 0xffffffff;
event.sbc_hi = (CARD64)sbc >> 32;
event.sbc_lo = sbc & 0xffffffff;
event.sbc = sbc;
WriteEventsToClient(client, 1, (xEvent *)&event);
}