sensics / OSVR-RenderManager

Apache License 2.0
64 stars 45 forks source link

ATW: "bubbles" of missed vsyncs in D3D11 ATW implementation #356

Open JeroMiya opened 6 years ago

JeroMiya commented 6 years ago

This is a result of testing this branch: https://github.com/sensics/OSVR-RenderManager/tree/nvidia-atw-updates

But it may affect the master branch as well. I'm noticing that the message that the ATW backend displays when it has missed a vsync comes in batches or "bubbles". That is, the ATW or time warp may end up taking too long and can't present in time for vsync. In this case, the inner D3D11 RenderManager instance blocks for a full frame (it reports that present takes 11ms or so) and then another message occurs. This generally results in bubbles of time where one vsync miss will itself cause the next one, and so on. Sometimes it settles down and manages to go back to hitting vsync consistently.

@russell-taylor Any ideas? I know you had a fix related to vsync misses - I'm not sure if this is related.

russell-taylor commented 6 years ago

My issue relating to missing vsync was one of reporting rather than one of time bubbles. With my testing on the master branch (with only one application with a few settings, and with only one HMD), things were smooth and did not exhibit these bubbles. I did have trouble with the addition of messages causing rendering bubbles, so it is possible that the warnings themselves are contributing. We could consider printing them only once every second or so and reporting summary statistics rather than printing them at every frame skip to see if that fixes the issue -- you could check this by adding a temporary static boolean that stops printing after the first time and see if that improves the judder performance.