Adaptive V-Sync

Started by
0 comments, last by MJP 11 years, 11 months ago
Anyone know how to enable adaptive v-sync in my own D3D11 app/game?

At the moment I'm doing something like this:
[source lang="cpp"]
...
if (currentFPS >= MAX_FPS) {
swapChain->Present(1, 0); // do vertical sync
} else {
swapChain->Present(0, 0); // present immediately
}
...
[/source]
...but I think this is not exactly the same.

As long as I've searched now for a solution to this problem, I'm starting to suspect that one can only activate this feature in the control panel. But then again Rage can apparently enable it directly (although it's called 'smart v-sync' there).
Advertisement
RAGE can do it because Nvidia specifically added it to the driver for them...the driver probably just detects that the game you're playing is in fact RAGE, and then turns it on (they do stuff like this all of the time).

Unfortunately D3D11 doesn't really provide you with the low-level control and timing information that you need to pull off a soft VSYNC. Presenting and syncing is actually pretty complicated, since the CPU and GPU are working asynchronously. DXGI does provide you with some timing information via IDXGISwapChain::GetFrameStatistics (which is only available in fullscreen mode, btw), but I haven't had much success in using that to implement a soft VSYNC.

This topic is closed to new replies.

Advertisement