[RFC] DRI2 synchronization and swap bits

Kristian Høgsberg krh at bitplanet.net
Sun Nov 1 08:15:21 PST 2009


On Fri, Oct 30, 2009 at 1:42 PM, Eric Anholt <eric at anholt.net> wrote:
> On Fri, 2009-10-30 at 10:59 -0700, Jesse Barnes wrote:
>> I've put up some trees (after learning my lesson about working in the
>> main tree) with the latest DRI2 sync/swap bits:
>>   git://git.freedesktop.org/home/jbarnes/xserver master branch
>>   git://git.freedesktop.org/home/jbarnes/mesa master branch
>>
>> They includes support for some new DRI2 requests (proto for which is in
>> the dri2-swapbuffers branch of dri2proto), including:
>>   DRI2SwapBuffers
>>   DRI2GetMSC
>>   DRI2WaitMSC
>> and
>>   DRI2WaitSBC
>>
>> These allow us to support GLX extensions like SGI_video_sync,
>> OML_swap_control and SGI_swap_interval.
>>
>> There have been a few comments about the protocol so far:
>>   1) DRI2SwapBuffers
>>      a) Concern about doing another round trip to fetch new buffers
>>       following the swap.
>>         I think this is a valid concern, we could potentially respond
>>         from the swap with the new buffers, but this would make some
>>         memory saving optimizations more difficult (e.g. freeing
>>         buffers if no drawing comes in for a short time after the swap).
>
> You're doing one round-trip anyway, and if users are concerned about the
> second one, go use XCB already.  (We need to go fix Mesa to do that).

DRI2SwapBuffers is a one-way request, but it's required to follow up
with a DRI2GetBuffers.  So it's only one round trip whether we use XCB
or not.

cheers,
Kristian


More information about the xorg-devel mailing list