H23120
H23120

Reputation: 387

DXGI flip model locked to vsync

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?

Upvotes: 3

Views: 1238

Answers (2)

Froncu
Froncu

Reputation: 21

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!

Upvotes: 2

galop1n
galop1n

Reputation: 8824

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

Upvotes: 3

Related Questions