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

Fullscreen Performance Degredation #2259

Open
Muketsu opened this issue Jun 28, 2024 · 2 comments
Open

Fullscreen Performance Degredation #2259

Muketsu opened this issue Jun 28, 2024 · 2 comments
Labels

Comments

@Muketsu
Copy link

Muketsu commented Jun 28, 2024

Hello!

I've come across an issue where Vulkan framerate seems to drop off when an application enters fullscreen mode. Before I get into the details, I'm using an M1 Max MacBook Pro 16 inch, no external monitors are connected, and I've got the latest version of MacOS (14.5) and the latest Vulkan SDK for Mac from LunarG.

I’m working on a tech demo game engine that’s rendering part of a 3D scene with Vulkan and GLFW, and I also have a basic FPS counter implemented to track performance. Since MacOS usually imposes a system-wide Vsync, it runs at a consistent 120 FPS in windowed mode. As soon as I go to fullscreen mode, though, it drops down to about 80-90 FPS and gets stuck there.

At first I thought this might be related to fullscreen using more resolution, but if I turn off Vsync by using the MacOS Quartz debug tools, the FPS performance hovers between 140-180 FPS, regardless of if it’s in windowed or fullscreen mode. So from a hardware perspective, the system should be able to output more than enough frames to keep pace with the 120 Hz refresh rate.

I’m wondering if it could be related to MacOS’s Vsync and how it interacts with the variable refresh rate in the ProMotion retina screen, so I tried setting the MacBook screen to a fixed 60 Hz resolution, and doing that I got a smooth 60 Hz in windows and fullscreen mode.

I was also able to reproduce the same behavior in the default Vulkan cube demo app that comes with the SDK, by viewing the framerate with the Metal HUD, so I don't think it's related to anything specific in my code itself.

I've never posted an issue here before, so apologies if I didn't format this correctly or if more information is needed.

Thanks for your time!

John

@billhollings
Copy link
Contributor

Thanks for posting this, and thanks for the diligent research you did exploring different scenarios and possible causes! It's great that you explored this with the Cube demo, because it should allow us to easily replicate the issue.

I've never posted an issue here before, so apologies if I didn't format this correctly

No need to apologize. You provided great content!

@Muketsu
Copy link
Author

Muketsu commented Jun 29, 2024

Thanks, I'm glad the information I shared was helpful! Hopefully it can be reproduced pretty easily with the cube, but if there's anything else I can share, or test I can do, I'd be happy to!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants