Commit ae33976
committed
Fix inverted vsync latch from the implicit swapchain present interval
When rtx.enableVsync is in its default WaitingForImplicitSwapchain
state, the vsync default is latched from the first swapchain's
PresentationInterval with a truthiness check. In D3D9,
D3DPRESENT_INTERVAL_IMMEDIATE (the only "present unsynchronized"
request) is 0x80000000, i.e. nonzero, so a game explicitly asking for
no vsync latches vsync On; D3DPRESENT_INTERVAL_DEFAULT (0), which
presents synchronized, latches Off. The two most common values map
backwards.
A game requesting IMMEDIATE at device creation therefore runs capped
to the display refresh with elevated present latency from boot. With
DLFG enabled the cap silently clears on the first interpolated 3D
frame (dispatchDLFG forces vsync off), which disguises the bug as
affecting menus and loading screens only; with DLFG off it persists.
The d3d9.presentInterval config cannot help because enableVsyncState
overrides the present interval at Present time.
Latch Off only for D3DPRESENT_INTERVAL_IMMEDIATE; DEFAULT, ONE and
TWO through FOUR latch On, matching D3D9 presentation interval
semantics. An explicit rtx.enableVsync user setting still takes
precedence.1 parent 7011b32 commit ae33976
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
336 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
337 | 347 | | |
338 | 348 | | |
339 | 349 | | |
| |||
0 commit comments