[osg-users] Enabling Vsync gives dramatic increase in latency

Jan Ciger jan.ciger at gmail.com
Sun Apr 19 04:28:53 PDT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/18/2015 04:30 PM, Björn Blissing wrote:
> 
> Although very interesting, this discussion regarding minimum
> latency is a bit of a tangent from my initial questions. Rendering
> with VSync Off is not normally what you do in a production
> environment.

Depends on what you define as "production environment". Consumer GPUs
have drivers optimized for games and there it is a common (and
default) setting to have vsync off for the sake of the highest frame
rate and lowest latencies. It is also a frequent recommendation to
turn vsync off when troubleshooting framerate issues in games. It may
start to change with the coming VR support where tearing is really
horrible, though.

Unfortunately the "pro" applications are a minority and Nvidia will
tell you that you should use a Quadro with differently optimized
drivers for "professional" applications.

> The interesting case is when you render with VSync enabled. Then I
> can live with 1-2 frames of (consistent) latency, given that the
> scene complexity is within what is possible to render within one
> frame. But with my starting point (OSG 3.2.1 running with 
> DrawThreadPerContext and NVIDIA default settings) was latencies of 
> 5-6 frames, which is way to much. Especially when you consider
> that all I rendered was ONE quad. I have a hard time to accept that
> driver issues causes latencies of these magnitudes.

One thing you could try is to repeat the test with VSYNC on using a
plain OpenGL test application, rendering the same scene. That will
rule out any threading or buffering issues that OSG could
theoretically add

My hunch is that with the default settings the driver simply buffers a
few frames to make sure it can synchronize with the scanout and not
block your program - typically what you would want in a game for a
smooth framerate without judder.

> Regarding rendering at higher frame rates. I will try to repeat my 
> measurements on a couple of 120 Hz monitors next week. These
> monitors also support Nvidia G-sync, so I will try that as well.
> And of course I will measure both the Oculus Rift DK1 and DK2 (the
> last one both in extended and direct mode).

It would be really great if you could post the results. I am fairly
interested to see what you get. Do you have the latency tester from
Oculus? It would be interesting to compare the results from that gizmo
with the results you have too - it could help to verify that the
measurement technique is the same.

Regards,

J.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iD8DBQFVM5Fyn11XseNj94gRAoimAJwLsVklZ/sX3gGEzN7/zxmNepv9cQCgoFAe
r9aoxIu2jVKB4vNbO432obM=
=BHeZ
-----END PGP SIGNATURE-----



More information about the osg-users mailing list