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

Jeremy Huddleston jeremyhu at apple.com
Thu May 5 13:17:13 PDT 2011

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.

More information about the mesa-dev mailing list