[RFC] DRI2 synchronization and swap bits

Jesse Barnes jbarnes at virtuousgeek.org
Fri Oct 30 11:47:21 PDT 2009


On Fri, 30 Oct 2009 11:42:06 -0700
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).

Yeah, I don't think it's a huge deal, but every context switch we add
is that much more overhead (especially for low end platforms).

-- 
Jesse Barnes, Intel Open Source Technology Center


More information about the xorg-devel mailing list