Chief Blur Buster » 21 Dec 2013, 02:57
Good questions and thoughts; It's something I've been thinking of.
In regards to VSYNC ON input lag, I can confirm that VSYNC ON input lag is not necessarily always two frames lag. It really depends on how the game engine does it; e.g.:
- VSYNC ON, triple buffering, as you've mentioned - least input lag
- VSYNC ON, double buffering, rendering at the very last minute before VSYNC flip; less input lag because of fresher input reads during last-minute rendering. Risk of missing VSYNC but for predictable render times, this technique works well (some emulators such as WinUAE now have a command line option for this).
- VSYNC ON, double buffering, the regular way - more input lag
- VSYNC ON, multiple buffering (improper triple buffering, or worse) - even more input lag
Also, here's a great post I made on Overclock.net about GSYNC which I'll be cross-posting here, that answers the G-SYNC part of the question, and about how much latency occurs when you try to do a higher framerate.
Mark Rejhon wrote:
During GSYNC rate of 30fps-144fps, GSYNC is the same as VSYNC OFF, within a 1ms difference (the GSYNC poll time).
When you cap-out at 144fps, the input lag diverges. The monitor finally begins waiting. There's slightly less lag during VSYNC OFF 300fps than GSYNC 144fps, for example. But if you never play games at 300fps, that's not going to be important to you.
Let's for instance, take Quake Live, a game that runs at 125fps capped internally. [That was before the 250fps version that came out] In that game, there wouldn't be significant difference. So when playing Quake Live, at 125fps capped:
VSYNC ON:
- Quake Live renders frame
- Quake Live **WAITS** for vsync. Input lag occurs.
- Monitor displays frame
VSYNC OFF
- Quake Live renders frame
- Monitor immediately displays frame, mid-scan (splice!), creating tear
GSYNC
- Quake Live renders frame
- Monitor immediately displays frame, with new refresh cycle beginning *immediately* at the top edge, no tear.
____
The non-waiting frame rates of GSYNC is 30fps-144fps. Below 30fps, there's the re-refresh (like a DRAM self-refresh cycle) to prevent the screen from going stale. Above 144fps, you end up waiting for the previous refresh to finish, before displaying the new refresh.
In the range (30-144), there's only about ~1ms difference between GSYNC and VSYNC OFF during this frame rate range. If you never cap-out at 144fps, you don't have any waiting occuring. If you try to send more than 144fps in GSYNC mode, input lag differences does diverge because the monitor refreshes faster. But during 30fps through 144fps, there's almost no measurable latency difference between GSYNC and VSYNC OFF (~1ms, for the "is-the-monitor-ready" poll).
GSYNC actually doesn't have a regular VSYNC per se, since it's asynchronous rather than SYNChronous, so it's really actually a special kind of VSYNC OFF (that visually looks like VSYNC ON!) -- because the monitor will start refreshing *immediately* at the top edge (no tearline) rather than *immediately* in mid-scan (tearline occurs). So during 30fps-144fps range, it combines the pros of VSYNC OFF and VSYNC ON, without the cons of either. The "300fps+" players may still prefer VSYNC OFF if they love the extra few milliseconds -- the good news is GSYNC monitors support all three modes (VSYNC ON -and- VSYNC OFF -and- GSYNC).
.......
Now, let's give the situation, you're wanting to run an older game such as Counterstrike: GO or some game capable of 300fps or thereabouts.
Above 144fps, the input lag diverges between GSYNC and VSYNC OFF only because GSYNC has a 144fps framerate cap. Once you hit 144fps, it has to finally start waiting for the monitor to finish the previous refresh (much like waiting for VSYNC), so now it behaves like 144fps=144Hz VSYNC ON. Even so, this is more harmless than VSYNC ON because when framerate slows down during GSYNC below 144fps (e.g. 143fps), it will never suddenly halve to 72fps -- it will gracefully slow down. None of the jarring input lag change of sudden frame rate halvings. It is like driving a car with a continuously variable transmission (CVT), rather than a gear shifting effect. You don't feel/hear/notice gear effects. I can't tell apart 142fps, 143fps or 144fps. You do get less input lag at 300fps VSYNC OFF than 144fps VSYNC OFF, but GSYNC doesn't let you go 300fps. Even so, the theoretical maximum input lag divergence between GSYNC and VSYNC OFF is a theoretical 6.9 milliseconds (1/144sec) plus the GSYNC poll time (~1ms), if you successfully get infinite-framerate VSYNC OFF (which is impossible). In the real world, the average input lag diverence of 288fps VSYNC OFF relative to 144fps GSYNC would mathematically be an average of 1/288th of a second difference (only 1/288sec = 3.4 milliseconds extra lag (+ 1ms poll) for GSYNC 144fps versus VSYNC OFF 288fps). Most gamers, except the uber-elite competitive gamers, would not even care about that.
Even with elite competitive gamers, it doesn't matter with Quake Live....It is limited to 125fps so that's below the GSYNC cap. And when you play Battlefield 4, you ain't getting 300fps, either. Since most of the modern games you play, will not cap-out at 144fps, realistically, you won't be hitting the GSYNC 144fps limit. And 144fps isn't necessarily the final frontier for GSYNC monitors later this decade...
So you got it; GSYNC 144fps diverges from VSYNC OFF 288fps only a tiny bit -- about 4.5 milliseconds difference (1/2 of 6.9ms plus 1ms GSYNC "is-monitor-ready-for-new-refresh" poll time that NVIDIA mentioned).
Also, attempting to do 145fps on GSYNC, would only be a tiny difference between 1/145sec and 1/144sec = (6.993ms minus 6.944ms) = only a ~49 microsecond GPU latency difference between 145fps and 144fps. (Excluding the NVIDIA-quoted 1ms GSYNC poll time) So it's not too harmful to latency to attempt to try to exceed by a few frames per second. Latency difference grows the bigger the FPS goes between VSYNC OFF versus GSYNC. So, yes 300fps VSYNC OFF would have more divergence from 144fps GSYNC.
But say, you're playing a more GPU-hungry game such as BF4 and BF3, and your GPU is only capable of about 150fps or 160fps, then you're not being penalized much. And if this bothers you, setting fps_max to a slightly lower value like fps_max 142 or fps_max 143, to give some headroom below the monitor's maximum rate. This allows fresher input reads before rendering before immediate refresh (e.g. Direct3D Present() immediately renders & refreshes the screen with no waiting for VSYNC).
The great thing is that G-SYNC monitors also support traditional VSYNC OFF and VSYNC ON operations (and strobed and non-strobed operations), so you do have a great choice between a multitude of modes on a G-SYNC monitor.