[Intel-gfx] [RFC] DRI2 swapbuffers

Jesse Barnes jbarnes at virtuousgeek.org
Wed Apr 15 00:16:33 CEST 2009


Here's an updated patchset for the DRI2 swapbuffers code.  There are
still some outstanding issues, but I made some changes to the
interfaces and refreshed the patches against more recent X server and
Mesa bits.

The main open issue at this point is how to handle getting the new
buffers.  The current code has the DRI2SwapBuffers request return the
new set, and uses a new setBuffers callback internally to Mesa to
update the render buffers.  Kristian thought we might be able to use
getBuffers instead, after invalidating the current drawables, but I
still haven't figured out a good way to do that.

There are also some bugs left unfixed here:
  - X server should fall back internally to CopyRegion if the swap
    fails to avoid extra round trips
  - 2D driver loses track of the front buffer in some cases (e.g.
    starting glsync -sb -w 1024 -h 600 on my 1024x600 screen under
    compiz leads to corruption)
  - 2D driver rotation handling isn't correct (though I hope we can
    replace the rotation stuff with a flip in the KMS case, since that
    will prevent tearing)
  - kernel driver still races between updating the front buffer and
    adding the object to the completion list, should be easy to fix
    though
That's all I'm aware of however.  It works really nicely in the simple
case now, and I've changed the ioctl to be KMS-only.  It now just
takes a CRTC id and an FB id, and does all the lookup & pin handling
in the kernel. 

-- 
Jesse Barnes, Intel Open Source Technology Center



More information about the Intel-gfx mailing list