-
Notifications
You must be signed in to change notification settings - Fork 2.9k
CoreTiming: Improve frame pacing #13387
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
c042110 to
1cd1459
Compare
2c83183 to
eb43d47
Compare
f4451c0 to
79c1afb
Compare
79c1afb to
e1b5565
Compare
e1b5565 to
2741bb7
Compare
…o GPU thread.
2741bb7 to
7222188
Compare
|
Code wise I think this looks good. I did test on Windows and didn't see the same buttery smoothness @jordan-woyak was getting. However, they quickly found a solution and now I get similar numbers. Once there's some resolution from the Windows side, I think we can move forward here. Great work! |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was mentioned that we will save the Windows issues for a future PR. If so, this LGTM.
|
I figure we should get this on the road then. |
@Sam-Belliveau took a step in the right direction with #11348 but throttling at every event was unnecessary.
They limited
Throttleto 1200hz, but I think that ultimately lead to throttling on random events and not necessarily on critical presentation events.See comment by @phire here:
#11348 (comment)
Throttling is now done just before user input, statistics counting, and presentation.
GPU-thread cannot sanely use CoreTiming so a
presentation_timeis calculated from CPU-thread and sent in the "async request".This works well for "single" and "dual" core mode. Ideally this time would probably be sent to the various video backends, since at least vulkan has its own worker thread, but for now it's handled in
Present."Immediate XFB" does not gain this benefit. Timing information isn't readily available where that event is processed. I might argue that people wanting to use Immediate XFB care more about latency than pacing, though.
I'd also argue that needing to
ThrottleinPerfTrackerCallbackis unfortunate and I plan to move this functionality into one of the other throttled events in a future PR to minimize the amount of throttling.Frame pacing has become much better for me, from this:


To this:
Note the change from
-/+ 0.22ms->-/+ 0.02msI get an improvement like this in most games.
Input latency should, if anything, be better, since throttling happens just before input grabbing.