[Mesa-dev] DRM EGL swapbuffers?

Chia-I Wu olvaffe at gmail.com
Tue Feb 22 10:44:36 PST 2011

On Tue, Feb 22, 2011 at 1:56 AM, Thomas Hellstrom <thomas at shipmail.org> wrote:
> Hi, Chia-I,
> Looking at the EGL DRM implementation of swapbuffers, it looks like we're
> sort of ad-hoc attaching the backbuffer as a new scanout surface, using
> drmModeSetCrtc.
> I don't think this works very well on all hardware. In particular, I think
> drmModeSetCrtc may return before the swap actually takes place, which will
> cause rendering to the old front buffer while it is still displaying.
> Could you fill me in why the pageflip ioctl isn't used here, and a surface
> copy in situations where the pageflip ioctl can't be used? IIRC, the
> pageflip ioctl is required to block rendering to the old frontbuffer until
> the new frontbuffer is flipped in.
Yes, pageflip should be used when available.  I did not use it simply
because it was not available on my machine when the code was written,
and I haven't had the motivation to revisit the code yet..

> Thanks,
> Thomas

olv at LunarG.com

More information about the mesa-dev mailing list