[PATCH] DRI2/GLX: fix swap event handling
eric at anholt.net
Thu Apr 28 14:37:15 PDT 2011
On Thu, 28 Apr 2011 13:27:22 -0700, Jesse Barnes <jbarnes at virtuousgeek.org> wrote:
> Use the new swap event structure packing and send it to the client if
> possible. This means tracking client version information when clients
> connect. If they don't support the new packing, they'll get the old
> bits and fill junk into their sbc values when they receive the event.
> If they do support the new packing, send off the right data.
> --- a/glx/glxdri2.c
> +++ b/glx/glxdri2.c
> @@ -192,8 +192,17 @@ __glXdriSwapEvent(ClientPtr client, void *data, int type, CARD64 ust,
> wire.ust_lo = ust & 0xffffffff;
> wire.msc_hi = msc >> 32;
> wire.msc_lo = msc & 0xffffffff;
> - wire.sbc_hi = sbc >> 32;
> - wire.sbc_lo = sbc & 0xffffffff;
> + wire.sbc_hi = 0;
was that supposed to be wire.sbc_lo and not whacking wire.sbc_hi?
At first I was confused by this whole thing -- why not rearrange the
structure a bit if we're messing things up? Then I realized that this
let the server emit the mostly-the-same event structure and only steal
the other half of event_type for clients that understand the new 8-bit
event_type protocol. Seems like a reasonable approach.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the dri-devel