[Mesa-dev] What use do swap interval > 1 and OML_sync_control divisor and remainder have?

Stéphane Marchesin stephane.marchesin at gmail.com
Wed Jan 29 11:36:56 PST 2014

On Fri, Jan 24, 2014 at 4:32 AM, Pekka Paalanen <ppaalanen at gmail.com> wrote:

> Hi,
> I am investigating what kind of Wayland protocol extensions would be
> needed to support proper presentation timing. Looking at existing
> works, I am wondering about two things whether they have any real use.
> Where is swap interval (e.g. eglSwapInterval) greater than one useful?
> Intervals 0 and 1 I understand, and Mesa EGL Wayland already supports
> those. But when would you like to make your framerate a fraction of the
> display's?

To save power. To target 30 Hz when you can't hit 60 Hz and would otherwise
get 45 Hz (and the corresponding jitter because you alternate 1 vblank per
frame - 2 vblanks per frame).

> When are the target-MSC related remainder and divisor parameters as
> defined in the GLX_OML_sync_control useful? Why does also X11 Present
> protocol include remainder and divisor?
> GLX_OML_sync_control defines that for interlaced displays MSC is
> incremented for each field. With divisor and remainder you could then
> target only top or bottom fields. Is that useful, and do we care about
> interlaced displays anymore?

1080i, which is the preferred resolution for a lot of TVs.

> I am contemplating on not supporting these, because I am going to
> propose using an UST-like clock as the "standard clock language" in
> Wayland present extension. Supporting MSC-based timings would add
> complexity. Therefore I would like to know where and how the above
> mentioned are useful, because I cannot imagine it myself.

You can look in Chrome for an interesting use of  GLX_OML_sync_control
(look for sync_control_vsync_provider.cc) . It is used to schedule the
rendering of the next frame without incurring too much latency, while
keeping a constant swap delay (to avoid the 45 Hz phenomenon, and to buffer
as many updates as possible before starting to draw without missing the
frame). Granted, there are some shortcomings (multi-monitor is one, as the
extension doesn't support those) but overall it helps.


> Please, let me know of real actual use cases and existing software,
> where these features offer a visible benefit and what that benefit is
> exactly. I am not interested in what one might do in theory, I am
> interested in real-world examples where they have proved useful. Well,
> maybe also theories if they allow taking advantage of some new cool
> technology.
> Btw. if you think that using UST for presentation timing and feedback
> is nonsense, and MSC is the only right way, let me know and I can start
> another email thread about that detail after preparing my material.
> Thanks,
> pq
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140129/af0cac32/attachment-0001.html>

More information about the xorg-devel mailing list