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

Present modes refactor #17903

Merged
merged 7 commits into from
Aug 14, 2023
Merged

Present modes refactor #17903

merged 7 commits into from
Aug 14, 2023

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Aug 13, 2023

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)

@hrydgard hrydgard added the GE emulation Backend-independent GPU issues label Aug 13, 2023
@hrydgard hrydgard added this to the v1.16.0 milestone Aug 13, 2023
Common/GPU/thin3d.cpp Outdated Show resolved Hide resolved
Common/GPU/thin3d.h Outdated Show resolved Hide resolved
Core/FrameTiming.cpp Outdated Show resolved Hide resolved
Core/MIPS/IR/IRCompVFPU.cpp Outdated Show resolved Hide resolved
@@ -166,6 +165,7 @@ bool GLDummyGraphicsContext::InitFromRenderThread(std::string *errorMessage) {
renderManager_->SetSwapFunction([&]() {
SDL_GL_SwapWindow(screen_);
});
// TODO: Support SwapInterval
Copy link
Collaborator

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]

Copy link
Owner Author

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.

@hrydgard hrydgard force-pushed the present-types-refactor branch from a163fe1 to d1b6aa7 Compare August 14, 2023 09:24
@hrydgard hrydgard merged commit e506ca2 into master Aug 14, 2023
@hrydgard hrydgard deleted the present-types-refactor branch August 14, 2023 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GE emulation Backend-independent GPU issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants