-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
mach: linux/vulkan needs frame rate limiter to avoid severe issues with some distro+WM+nvidia combinations #444
Comments
This correctly sets presentation modes for vsync, both at startup and at runtime via a `setOptions` request. Note: There may still be platforms where setting vsync is not enough, and a frame rate limiter is needed to achieve proper synchronization. This is tracked in #444 and not fixed by this change. Fixes #307 Signed-off-by: Stephen Gutekanst <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
decision: before imposing a frame rate limiter on all our Linux users by default, we're going to wait and see if anyone can reproduce this behavior again. If you can, please do comment. Our hope/belief is that (a) some Dawn changes or (b) the multi-threaded rendering support we added (always on) may have resolved the poor vsync behavior. |
I've been able to re-produce this behavior (on 9250310) -- using the textured cube example and "Getting started", though I assume every mach causes this. Speed up and slow-down of the cube spinning, framerate goes between 22, 61, 181, etc. My window manager and entire system become quite unresponsive, and switching window focus is very slow and makes it worse, causing all windows to become unresponsive. I attempted to record this, but quickly realized it's actually pretty difficult because my encoder quickly fails when trying to do so, and OBS will stop recording if the encoder gets too far behind. A CPU encoder might work if I try it later. I tried setting
I can supply much more information here, or create a new issue, just let me know what's most important and where I should put it. |
We've had two reports of this type of behavior on (Linux, Vulkan, X11, NVIDIA, and less common distros), where we request no vsync (I believe?) and instead of the frame rate being smoothed, instead e.g. 60 frames are rendered in a burst almost instantaneously, then a vulkan swapchain call pauses for an entire second rendering nothing, then another burst, and so on:
KZUTLez.mp4
All instances appear to be solved by adding a frame rate limiter, e.g. opening any example application and adding
std.time.sleep(16 * std.time.ns_per_ms);
to the top ofpub fn update
The reports:
adayoldbagel
on Discord:GPU_BACKEND=opengl
works around the issue? Yesboopinski
on Discord:GPU_BACKEND=opengl
works around the issue? Yesbitflip
on Zig Discord:The text was updated successfully, but these errors were encountered: