From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH] DRI2/GLX: fix swap event handling Date: Thu, 28 Apr 2011 14:37:15 -0700 Message-ID: <87vcxyhxbo.fsf@pollan.anholt.net> References: <1304022442-8070-1-git-send-email-jbarnes@virtuousgeek.org> <1304022442-8070-5-git-send-email-jbarnes@virtuousgeek.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1019140271==" Return-path: In-Reply-To: <1304022442-8070-5-git-send-email-jbarnes-Y1mF5jBUw70BENJcbMCuUQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: xorg-devel-bounces+gcfxd-xorg-devel=m.gmane.org-go0+a7rfsptAfugRpC6u6w@public.gmane.org Errors-To: xorg-devel-bounces+gcfxd-xorg-devel=m.gmane.org-go0+a7rfsptAfugRpC6u6w@public.gmane.org To: Jesse Barnes , dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, xorg-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org List-Id: dri-devel@lists.freedesktop.org --===============1019140271== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= On Thu, 28 Apr 2011 13:27:22 -0700, Jesse Barnes 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. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk253gsACgkQHUdvYGzw6ve9kgCfbzLnr5YEGCdOB/k3WWMmihz6 Z64AoJubnI+VHjDl+4PEeP9V+fEwZdqO =dP8Q -----END PGP SIGNATURE----- --=-=-=-- --===============1019140271== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xorg-devel-go0+a7rfsptAfugRpC6u6w@public.gmane.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel --===============1019140271==--