mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-23 06:46:02 +00:00
perf(gamescope): p18 – handle a finished frame in one loop pass (#1706)
0123 backports upstream 0efe47c and 666c52b by Matthew Schwartz (commit completion list lifetime, no Rc to a dying commit). 0124 polls a new commit's fence at import; a finished frame is marked done at once and handled in the same steamcompmgr pass instead of a second wake through the image waiter. commit_ready_check (default on) turns it off. Pins gamescope 3.16.29-p18 (0123 + 0124). On the AYANEO Pocket FIT about 81 % of commit fences are ready at import; gamescope-xwm 22-26 % -> 16 % of a core, gamescope_img 10-11 % -> under 2.5 %.
This commit is contained in:
1 parent
f4656ad83a
commit
8c4f97a170
4 files changed
+280
-2
No files matched your search
@@ -181,3 +181,21 @@ The nested Wayland backend's input thread reads the host display, but steamcompm
|
||||
does not watch that file descriptor, so buffer releases and presentation feedback
|
||||
queued by that read could wait up to one refresh for steamcompmgr's next poll. The
|
||||
input thread now wakes steamcompmgr after each read.
|
||||
|
||||
## 0123 commit: fence lifetime fixes from upstream
|
||||
|
||||
Backport of upstream commits 0efe47c and 666c52b by Matthew Schwartz (ValveSoftware/gamescope).
|
||||
Pending commits share ownership of their completion list with the Xwayland context, so a late
|
||||
fence signal can no longer append to a list freed with the context; and a commit being destroyed
|
||||
no longer hands the image waiter a new reference to itself. Both touch the code 0124 changes.
|
||||
|
||||
## 0124 commit: mark a finished frame done at import
|
||||
|
||||
Every game frame took two passes of steamcompmgr's loop: the import duplicated the buffer's
|
||||
fence and handed the commit to the image waiter (epoll add), then the waiter thread saw the fence
|
||||
signalled, removed and closed it and woke steamcompmgr again to handle the finished commit.
|
||||
`update_wayland_res` now polls the fence without waiting first. A frame that is already finished
|
||||
is marked done at once - no duplicate fence, no epoll add or delete, no waiter wake - and the main
|
||||
loop handles it in the same pass, after the import (FIFO commits still wait for a vblank). The
|
||||
`commit_ready_check` convar (default on, `gamescopectl commit_ready_check 0`) turns it off; the
|
||||
`xwm` log counts fences ready at import and waited for, every 10 s.
|
||||
Reference in new issue
Block a user