-
-
Notifications
You must be signed in to change notification settings - Fork 172
Refine when presentation mode = auto
uses throttled mode
#2818
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
Conversation
e2afd28
to
07d8036
Compare
Nice quick fix @kcgen 🎉 , but we only need the last commit 😄 We've been back and forth on text mode special handling for a while and both of us came to the same conclusion that video output is video output — type of mode does not matter one bit. I'll say it again: I have experienced the issue both in graphics and text modes, in the past, and over the last couple of days too. Definitely in graphics modes as well in QPV, for example, and in the Quake video options menu! I'll test this later on my Windows box, but just the last commit 😄 I'm quite certain the rest are not necessary (well, the text mode special handling is more than not necessary; that would only cause the fix to apply to text modes and leaving graphics modes half-broken, so that's no good). But we can always discuss, for sure 😄 |
Excellent. Just double check that you're running in throttled VFR mode to exercise that code path. Then try feeding it changed frames with back-to-back timing tighter that 60 Hz to ensure that it's forced to drop frames (and the commit's "follow up present logic" is used). Some tricks to ensure you're in throttled mode is to set vsync true in your conf, or have your video driver enforcing vaync and preventing/overriding applications from changing it. Quake's time demo, especially using openglnb output, definitely runs > 70 fps (and it has a nice flashing graphical text cursor at the end when it reports the results). |
Yeah, that's a good way. Running my monitor in fixed 50 Hz mode and simply using the DOS prompt in VGA mode at 70 Hz and just executing DIR or something is also a good way. The issue reliably happens then. Or using QPV and just moving around on the screen. |
The throttled presenter skips frames that have inter-frame spacing narrower than the allowed frame period (sdl.frame.period_us). When a frame is skipped, /the presenter still tries to present it at its next oppourtunity.
07d8036
to
6008b5b
Compare
Round two ready:
Testing:
|
Nice @kcgen , I'm gonna test this in 30 mins. |
First thing, this fixed the problem @kcgen 🎉 Great job! 😎 Now on to the details: ReproductionI found a good way to spot the "too low dupe rate" problem that this PR 100% fixes. Starting at the cursor blink rate is not really reliable.
So, with current main, you get the variable latency problem, which manifests as "I pressed a key, but the screen got updated MUCH later, like 50+ ms later". Super jarring. With the current PR, this problem is finally gone! 🎉 Like it said, but to drive it home 100% this time 😅: not only text modes are affected!. But it's the easiest to spot this problem in text modes. You can do the "rhythm test" by typing the letter "A" or something in the DOS prompt at an even rhythm. Every few seconds, your even rhythm will be "broken" by an unexpected latency spike. Try it! ResultsTried the above test, then just using thec command prompt randomly, DOS Navigator, QPV (with image preview turned off), a bunch of demos, switching between modes, windowed <-> fullscreen, etc. Throttled VFR was consistently picked in these scenarios and things just worked as they should. Specifically:
So, to sum up:
Overall, great job, ship it! 😎 🤘🏻 |
Phew, thanks for raising this issue @johnnovak and running so many extensive tests. I feel like the approach is pretty robust heading into 0.81. |
|
Didn't know I needed some high tech display to run software from the 80s 😆 |
The first affordable 8k wide-gamut HDR 500 Hz+ VRR OLED will be a good candidate to replace my CRTs. Before that happens, it's a matter of different levels of compromises 😎 |
A handful of small adjustments, each separate.
Suggest reviewing commit-by-commit, and running various text and GUI benchmarks with
--nodefaultconf
and withoutput = openglnb
, to drive frame-rates as fast as possible.