[PATCH] xserver/glx/dri2: use new GLX/DRI2 swap event types

Jesse Barnes jbarnes at virtuousgeek.org
Thu May 5 13:25:30 PDT 2011


On Thu, 05 May 2011 13:17:13 -0700
Jeremy Huddleston <jeremyhu at apple.com> wrote:

> 
> On May 5, 2011, at 1:09 PM, Jesse Barnes wrote:
> 
> > On Thu, 05 May 2011 12:59:50 -0700
> > Jeremy Huddleston <jeremyhu at apple.com> wrote:
> > 
> >> For *proto/mesa:
> >> Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
> > 
> > Thanks.
> > 
> >> For xserver:
> >> This looks incomplete.  You also need to update swap_count in DRI2DrawableRec to be CARD32.
> > 
> > That value is used in other places that actually preserve the full 64
> > bits.  I could add an explicit cast in the few places where we pass it
> > to the swap completion though if you think that's better...
> 
> Yes, I realize that there are some areas that use 64bit for sbc.  Do we really need 64bits for this?  If so, how do we properly to communicate the 64bit value between server/client?  Currently, your changes result in an implicit cast from 64bit to 32bits in DRI2SwapComplete which will cause problems if we really do need those extra bits:
> 
>     if (swap_complete)
>         swap_complete(client, swap_data, type, ust, frame, pPriv->swap_count);
> 
> It looks to me like much more of DRI2 should be rewritten to use 32bit swap counts, or there should be some other mechanism in place to communicate the full 64bit value.

Yeah there are other mechanisms (the OML sync extension) for
communicating the whole 64 bits.  Both the swap reply and msc reply
deal in the full 64 bits, just the swap event (an unrelated extension)
truncates to 32 bits.  (Also I think the 64 bit size for swap count in
the OML extension is just inertia; getting to a count that high even at
120Hz is going to take awhile.)

-- 
Jesse Barnes, Intel Open Source Technology Center


More information about the xorg-devel mailing list