Swap limit

Jesse Barnes jbarnes at virtuousgeek.org
Fri Dec 10 11:00:32 PST 2010

On Fri, 10 Dec 2010 15:40:38 +0100
Mario Kleiner <mario.kleiner at tuebingen.mpg.de> wrote:

> It schedules an immediate copy-swap via blitting. Unfortunately the ddx 
> doesn't know about the swap_interval, so it still synchronizes the 
> execution of the blit to vsync via vline waits. That's tear-free, but it 
> depends on the location and size of the drawable and the current 
> position of the scanout if this will cause an immediate swap (if scanout 
> is outside the drawables area) or a vsync'ed swap. It's a bit undefined 
> behaviour for non-fullscreen drawables and it effectively enforces a 
> minimum swap interval of 1 for fullscreen drawables, which is not what 
> we want.

That's actually the problem; swapbufferswait isn't *quite* equivalent
to swap interval = 1, since you can potentially do multiple blits
before the scanline intercepts your rect(s).

But regardless, we should add an API option to allow blits to happen
immediately when swap_interval = 0 both with and without tear
avoidance.  I think Pauli's followup covers this (tearing swap limit 0
vs tear free swap limit 0).

Jesse Barnes, Intel Open Source Technology Center

More information about the xorg-devel mailing list