-
-
Notifications
You must be signed in to change notification settings - Fork 589
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use frame timing and render time statistic to pace frames. Right now the criteria are simple: * Don't render multiple frames in one vblank cycle. Otherwise the rendered frame will be delay multiple cycles, which isn't ideal. * Start rendering as late as possible while still hit vblank. Refresh rate is estimated from a rolling average of frame timing. Render time is predicted from the rolling maximum of past 128 frames. The window size still needs to be investigated. Professionals might laugh at how rudimentary this is, but hopefully this is better than what we had before. Which is absolutely nothing at all. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
- Loading branch information
Showing
2 changed files
with
137 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters