-
Notifications
You must be signed in to change notification settings - Fork 224
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
MacOS+vsync: Game slows down to 5fps after taking 2-10 screenshots #661
Comments
I bet this is some MoltenVK issue |
I checked and this is definitely a MoltenVK bug. There is nothing in that code that could affect performance. It is very buggy in regards to vsync too (sometimes it syncs, sometimes it doesn't). Very frustrating, but nothing I can do on my side. |
Guess I can keep this open for now. |
Maybe grabbing from somewhere else than the swapchain might help? That'd also allow hidding some HUD elements or notify strings in screenshots. |
Setting MVK_CONFIG_SYNCHRONOUS_QUEUE_SUBMITS environment variable to |
If I take 2-10 screenshots, then after a random one of the screenshots the game suddenly slows down to 5 fps (at least that's what it says; feels more like 1 fps). This only happens for me with MacOS while vsync is on. The bug is dependably triggerable when I start the game with vsync on; it's not always triggerable if I've switched the setting while the game is running.
Once the issue happens, changing vsync to off does not fix it. Changing vsync to triple buffered does alleviate the issue, until I change it back to on or off.
I'm unable to reproduce this on Linux or Windows vkQuake, QS, or QSS. This is only slightly affected by the Max FPS setting (have tried with 60 and above 60 like 180): increasing the max fps slightly increases the framerate the game reports at during the slowdown (can get to 7-15 fps), though it oscillates and feels much more jank than what a consistent low framerate would be like.
While watching a scrolling sky texture during a slowdown, I think I figured out why it feels more like 1 fps: the game is consistently alternating between freezing for about a whole second and then quickly doing five frames. (Could some vsync timer be lowering its resolution to 1s somehow because of the quarter-second freeze during a screenshot, and so from then on for a whole second the game thinks it needs to wait more time before a frame, and then suddenly the timer ticks forward in one jump and a batch of frames all think it's time to go immediately until real time catches up to the vsync timer? I still need to actually look at the vsync code.)
Willing to debug this further over the next few days.
The text was updated successfully, but these errors were encountered: