Fix vsync-off support for direct3d11 #13767
Open
+57
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes vsync-off support for direct3d11 by adding the appropriate swap chain and present flags, similar to direct3d12.
Description
There are details about the flags here, under the
DXGI_PRESENT_ALLOW_TEARING
section. These flags are also a requirement for VRR displays.This is easy to check by running
testsprite
with an overlay like PresentMon, and then observing the framerate. Before this PR, the framerate was limited to the monitor's refresh rate. This resulted in significant input latency which is now reduced in vsync-off / high framerate conditions (measured with a hardware latency analyzer).The
CheckFeatureSupport
method wasn't added untildxgi1_5.h
, so an additional check is made for this header, falling back to the previous vsync-off behavior if onlydxgi1_4.h
is available.Existing Issue(s)
None.