-
Notifications
You must be signed in to change notification settings - Fork 227
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
vblankmanager: Port to timerfd #1053
Conversation
Some things to think about before merging:
|
Thoughts: Because we are using timerfd, ulWakeupTime should actually be the target point of the timerfd when using that, not the the current time from OnPollIn, so we can account for the scheduling quantums from the target wakeup time and other work (like we were wrt the pipe write before) |
07df97a
to
ab3368c
Compare
ab3368c
to
db59f4c
Compare
Seems like there is some unstable frametiming introduced by:
Not sure why yet... |
Ports vblankmanager to be timerfd based, and also fxies issues with re-arming at higher refresh rates. The old nudge thread method still exists (and is needed for VR), and it has also been improved to fix the re-arming issue. The old method can be enabled with GAMESCOPE_DISABLE_TIMERFD.
…d path Because we are using timerfd, ulWakeupTime should actually be the target point of the timerfd when using that, not the the current time from OnPollIn, so we can account for the scheduling quantums from the target wakeup time and other work (like we were wrt the pipe write before)
Fixed that, it was because nudge_steamcompmgr was not nudging the new FD on the g_SteamCompMgrWaiter but the old global nudge one that is now unused. |
db59f4c
to
1647094
Compare
72b53ae
to
2157920
Compare
I merged this PR into my own branch note: not sure if it would behave better w/ --rt, because gamescope EDIT: seems like the behavior is better, less stuttery w/ intel igpu (I think because of the compute queue that could be used when not running on nvidia) , and maybe slightly more better with intel igpu + running w/ realtime (--rt) |
If you are testing on NVIDIA I am not surprised at there being issues without WSI given the whole xserver interaction there. |
Ports vblankmanager to be timerfd based, and also fxies issues
with re-arming at higher refresh rates.
The old nudge thread method still exists (and is needed for VR), and
it has also been improved to fix the re-arming issue.
The old method can be enabled with GAMESCOPE_DISABLE_TIMERFD.
This additionally ports the main poll event loop to epoll with the new waitable system and fixes a presentWaitID bug in Vulkan.
cc: @sharkautarch Probably interests you?