« Return to Thread: Review Request: Swap vsync order, trade in 1frame lag, try harder to detect nvidia framerate (recently broke here ; -)

Re: Review Request: Swap vsync order, trade in 1frame lag, try harder to detect nvidia framerate (recently broke here ; -)

by Martin Gräßlin :: Rate this Message:

| View in Thread

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/103058/

I'm fine with it to go in even after feature freeze, just in case that you want to ship the whole package including the TODOs. Would be nice to have it before beta tagging, though.

kwin/options.cpp (Diff revision 1)
int currentRefreshRate()
67
            if (!ok)
68
                frate = QLocale::system().toFloat(reply, &ok);
69
            if (!ok)
70
                frate = QLocale(QLocale::German).toFloat(reply, &ok); // ","
71
            if (!ok)
72
                frate = QLocale(QLocale::English).toFloat(reply, &ok); // "."
meh that doesn't look nice. Is there no better way to get it? Let me guess: the language from nvidia_settings does not have to be the same as returned by QLocale::system()?

- Martin


On November 6th, 2011, 6:17 p.m., Thomas Lübking wrote:

Review request for kwin and Martin Gräßlin.
By Thomas Lübking.

Updated Nov. 6, 2011, 6:17 p.m.

Description

This performs a paint & glFlush immediately after the buffer swapping and defers the next swapping to the next anticipated frame (or idling)
The behavior is still not as deterministic as we hoped to be since we cannot measure the time for the actual vsync :\
I set a fuzzyness of 6ms what leads to a majority of 2-3ms times in waitsync but single wait times up to 8 or 9ms occur (what ultimately can be part of the syncing itself)

There's some debug code to print lagging.

TODO:
- attempt egl support
- probably lie to the effects about the time

Testing

I've used a CRT for testing which can sync every 11ms ie. 85Hz and lowered the maxFPS down to 10fps with pretty constant results for the time lost waiting for the sync.

Diffs

  • kwin/composite.cpp (bc29233)
  • kwin/options.cpp (19c3ee5)
  • kwin/scene.h (d8bcf48)
  • kwin/scene.cpp (413e46f)
  • kwin/scene_basic.h (a087eb5)
  • kwin/scene_basic.cpp (cc8dbdd)
  • kwin/scene_opengl.h (e13d8a5)
  • kwin/scene_opengl_egl.cpp (22e082c)
  • kwin/scene_opengl_glx.cpp (ddebcd0)
  • kwin/scene_xrender.h (6c916c8)
  • kwin/scene_xrender.cpp (3618d79)
  • kwin/workspace.h (e4db7e7)
  • kwin/workspace.cpp (70b2df8)

View Diff


_______________________________________________
kwin mailing list
kwin@...
https://mail.kde.org/mailman/listinfo/kwin

 « Return to Thread: Review Request: Swap vsync order, trade in 1frame lag, try harder to detect nvidia framerate (recently broke here ; -)