-
Notifications
You must be signed in to change notification settings - Fork 53
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
Added Adaptive Tearing options and enabled Latent Sync 2x.. modes #152
base: main
Are you sure you want to change the base?
Conversation
Does that even happen? Latent Sync is VSYNC off, I'm having a hard time picturing how render latency gets > 1 frame. This seems more like a feature appropriate for non-Latent Sync modes. I like the premise of letting the screen tear for 1 or more frames until latency comes down for fixed-refresh users, a lot, but I don't think that's a problem that Latent Sync has to begin with. |
It happens when Latent Sync is used with You can easily reproduce it by enabling Latent Sync, disabling tearing and temporarily losing Independent Flip. When presentation mode transitions from Composed Flip to Independent Flip, Render Latency rises above 1 frame. I only tested this on a fixed-refresh 60 Hz monitor, maybe it's less of an issue on higher refresh rates?
In non-Latent Sync mode, especially fixed-refresh VSync, you'd have to toggle presentation interval to 0/1 which goes back and forth between Latent Sync and Normal modes. That's why I restricted Adaptive Tearing modes to Latent Sync - presentation interval stays the same (0) and it's simply easier toggling tearing On/Off. |
Update: I also implemented Adaptive VSync mode for non-Latent-Sync usage. It temporarily turns VSync Off / Tearing On (without enabling Latent Sync) if FPS is unstable or Render Latency exceeds 1 frame. |
Marked as draft. I'm finishing off another Tearing Mode "Always Off (Low Latency)" (temporarily lowers FPS limit if Render Latency exceeds 1 frame) :) |
@Nustat0, you should consider squashing these 106 commits together into a single commit, or just a few commits. The total overall patch is far too small to justify 106 commits. |
Sorry about the commits, I wasn't satisfied with the original implementation and things got out of control after I started discovering more and more edge cases. I'll mark this PR as ready for review once I'm done reworking adaptive tearing modes and then we can discuss whether to squash the commits or split this mess into smaller PRs :D |
8960ab0
to
4766697
Compare
Added new tearing modes for regular V-Sync:
Added new tearing modes for Latent Sync:
Made Latent Sync non-tearing modes functional in D3D9 / FSE games by forcing Presentation Interval 1.
Reset frame limiter when V-Sync gets stuck at high variation or ±0.0 ms input latency (applies to "Adaptive V-Sync", "Adaptive (Prefer Off)" and "Always Off (Low Latency)" tearing modes).
Display actual Delay Bias value when Auto Bias is enabled (updates every 200 ms).
Remember last selected Target Input Latency value when switching between millisecond / percentage modes.
Hidden Maximum Bias slider if Target Input Latency is in percentage mode (it will only take effect in millisecond mode).
Refactored and enabled Latent Sync 2x.. modes.
Restricted 2x.. Scan Mode selection to 5 entries after enabling 4x mode or higher:
1/x 1:1 (2x) 3x 4x
1/x 1:1 2x 3x (4x) 5x 6x
1/x 1:1 4x 5x (6x) 7x 8x
1/x 1:1 6x 7x (8x) 9x 10x
...Re-enabled Buffer Count and Max Device Latency settings for OpenGL-IK and NVIDIA's OpenGL / Vulkan -> D3D11 interop:
Always show Visualize Tearlines checkbox:
Made Resync Rate second-based instead of frame-count-based (60 seconds by default).
Updated Delay Bias tooltip (Adaptive Sync option is obsolete).