-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Present modes refactor #17903
Present modes refactor #17903
Conversation
headless/SDLHeadlessHost.cpp
Outdated
@@ -166,6 +165,7 @@ bool GLDummyGraphicsContext::InitFromRenderThread(std::string *errorMessage) { | |||
renderManager_->SetSwapFunction([&]() { | |||
SDL_GL_SwapWindow(screen_); | |||
}); | |||
// TODO: Support SwapInterval |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it's really necessary for headless either way, as long as it doesn't slow down and can still render. Ideally it shouldn't be presenting exactly, I guess, or it should but should always be immediate since it'll be in fast forward mode?
Seems like headless crashed or something with these changes, though. And that's even without an actual GPU, since it only runs softgpu on the GitHub runners.
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think when adding this comment, I thought I was in a regular SDL backend, hah.
a163fe1
to
d1b6aa7
Compare
Instead of ifdefs sprinkled around, the backends now report what present modes they support and whether they can change it dynamically without hitches, and we try to make some logical decisions. Also, this fixes a regression from the previous refactoring where D3D would no longer dynamically switch to IMMEDIATE when fast-forwarding.
This also enables the Vsync checkbox on Vulkan/Android, if MAILBOX/IMMEDIATE is available (not on all devices). Does seems to result in lower latency but less smooth framerate. In the future I hope to be able to get FIFO to the same latency.
I want to default Vsync to on on Android and off on PC, since previously it was defaulting to off everywhere but forced on on Android, so I renamed the INI setting, and made a new function to decide the default.
Also fixes the debug info issue mentioned in #17902 (comment)