DXGI flip model locked to vsync

1k views Asked by At

I found swap chain created with flip model (DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL or DXGI_SWAP_EFFECT_FLIP_DISCARD) was locked to VSync (1/60 sec), calling IDXGISwapChain1::Present1 method with SyncInterval set to 0 as follows doesn't work.

swap_chain->Present1(0, 0, &param);

Does anyone know how to disable VSync for DXGI flip model?

2

There are 2 answers

1
galop1n On BEST ANSWER

What is your version of Windows 10? UWP and windowed swap chain used to always be locked to VSync, prior to the 1511 build.

0
Froncu On

I know this was a long time ago, but I found a solution that worked for me.

When calling Present() on the swap chain, you should pass DXGI_PRESENT_ALLOW_TEARING as a flag (second parameter). For that to work, the swap chain requires the DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING flag to be set.

According to Microsoft's documentation, it's used for variable refresh rate displays. I guess that makes sense (I am still very much a newbie when it comes to graphics programming).

Hope that helps!