[Mesa-dev] [PATCH] xserver/glx/dri2: use new GLX/DRI2 swap event types
Jesse Barnes
jbarnes at virtuousgeek.org
Fri May 6 08:52:09 PDT 2011
On Fri, 06 May 2011 09:25:35 +0200
Michel Dänzer <michel at daenzer.net> wrote:
> On Don, 2011-05-05 at 14:02 -0700, Jesse Barnes wrote:
> > > > if (swap_complete) {
> > > > if (pPriv->swap_count > 0xffffffff)
> > > > ErrorF("something appropriate");
> > > > swap_complete(client, swap_data, type, ust, frame, (CARD32)pPriv->swap_count);
> > > > }
> > >
> > > Yeah, it's annoying. How about I leave out the error message and handle
> > > wrapping on the client side instead? That way at least the client code
> > > won't notice that the server is only transmitting 32 bits...
> >
> > Nevermind, that can't work generally since clients are free to
> > mask/unmask the events, so we could miss a 0 count and thus a wrap.
>
> Missing 0 isn't a problem, you can assume there's been a wraparound
> whenever the current value is smaller than the previous one. This would
> only fail if the client misses several wraparounds, in which case
> apparently it doesn't care all that much in the first place. :)
>
> Please do this.
Yeah, it's more of a problem with low counts potentially, but as you
say the app probably isn't looking at this field in that case...
Ok let me see how to do it (the DRI case looks easy, not sure where to
store the count in the indirect case though...)
--
Jesse Barnes, Intel Open Source Technology Center
More information about the mesa-dev
mailing list