Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disabling v-sync in D3D11/D3D12 backend #325

Open
hzqst opened this issue Nov 21, 2024 · 0 comments
Open

Allow disabling v-sync in D3D11/D3D12 backend #325

hzqst opened this issue Nov 21, 2024 · 0 comments

Comments

@hzqst
Copy link

hzqst commented Nov 21, 2024

as #277 said, the vsync checkbox isn't working in D3D11/D3D12 backend.

image

after digging into msdn

It turns out that adding

swapChainDesc.Flags |= DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING;

after https://github.com/DiligentGraphics/DiligentCore/blob/953c6a45f215a9045ee8f7ce782621b0882c56d4/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.hpp#L191

and DXGI_PRESENT_ALLOW_TEARING right after the first arg of SwapChain->Present

https://github.com/DiligentGraphics/DiligentCore/blob/953c6a45f215a9045ee8f7ce782621b0882c56d4/Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp#L157

is mandatory in D3D11/12 backend.

All I changed are below:

image

image

OS version Windows 11 (builnum 10.0.22631.4460)

@hzqst hzqst changed the title Disable v-sync in D3D11/D3D12 backend Allow disabling v-sync in D3D11/D3D12 backend Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant