Skip to content
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

Defer frame waits if possible #18573

Merged
merged 4 commits into from
Dec 18, 2023
Merged

Defer frame waits if possible #18573

merged 4 commits into from
Dec 18, 2023

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Dec 18, 2023

To regulate speed, we insert waits into each frame. Previously, we waited right at the time we hit a vsync and stopped emulating, then continued to the submit phase of the frame, but with this, we submit the accumulated drawing commands to the GPU first, and then wait.

While due to the frame overlap we already have this won't result in a lot of extra performance, it should help latency slightly, especially if the driver is smart or if we add some of the other stuff from #17917 later.

EDIT: For some reason, this seems to have issues on Android. So, draft for now.

EDIT2: With the last commit, it now only has problems when you enable frameskipping fast-forward, and that's not Android-specific..

EDIT3: Fixed the logic, oops.

@hrydgard hrydgard added this to the v1.17.0 milestone Dec 18, 2023
@hrydgard hrydgard marked this pull request as ready for review December 18, 2023 16:17
@hrydgard hrydgard merged commit e64299f into master Dec 18, 2023
18 checks passed
@hrydgard hrydgard deleted the defer-frame-waits branch December 18, 2023 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant