Wayland: Handle fifo_v1 and clean up suspension logic#101454
Merged
Repiteo merged 1 commit intogodotengine:masterfrom Apr 25, 2025
Merged
Wayland: Handle fifo_v1 and clean up suspension logic#101454Repiteo merged 1 commit intogodotengine:masterfrom
fifo_v1 and clean up suspension logic#101454Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
Before, the WSI was unfortunately quite broken and we had work around it by manually pacing frames. Needless to say it was not an ideal solution. Now, the WSI can make use of the new fifo_v1 protocol to work properly. If it's available, we'll trust the WSI by disabling manual frame pacing. While we're at it, let's clean up the suspension code a bit by removing some duplicated stuff and handling the suspension state through a switch case.
fifo_v1 and clean up suspension logic
akien-mga
approved these changes
Apr 24, 2025
Member
akien-mga
left a comment
There was a problem hiding this comment.
Changes look good to me.
I can't test yet easily as I'm mainly on KDE Plasma, and the latest stable release in Fedora 42 doesn't have the fifo_v1 implementation yet.
It seems to be slated for Plasma 6.4.0 which will be released mid June: https://community.kde.org/Schedules/Plasma_6#Future_releases
The implementation looks like we still use the same vsync emulation logic if FIFO is not available so it shouldn't cause issues for current users.
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before, the WSI was unfortunately quite broken and we had work around it by manually pacing frames. Needless to say it was not an ideal solution.
Now, the WSI can make use of the new fifo_v1 protocol to work properly. If it's available, we'll trust the WSI by disabling manual frame pacing.
While we're at it, let's clean up the suspension code a bit by removing some duplicated stuff and handling the suspension state through a switch case.
Note that fifo_v1 seems to be only used by the Vulkan WSI and not mesa's EGL implementation. For the time being the opengl backend will always manually throttle frames. I only found out about this while writing this PR.
As usual with this part of the backend, we need thorough testing for every combination. I did my best to try every compositor I could find but regular use with stuff like LSPs would be better.
Note that to try this new protocol you're going to need mesa starting from commit 63cbbf2a1c80742a4485417d984b1426b5262ac7 and one of the following:
There's also a WIP wlroots implementation but I had issues during my initial tests a month or two ago. If you want to play around with it it's over at MR !4463