fix(gamescope): default images under the frame limiter, refresh follows the panel

With Steam's Frame Limit on, gamescope forces FIFO while the WSI layer
always hands the driver MAILBOX, so a game with the eight images the app
asks for could queue up to seven frames ahead of the screen. While the
limiter forces FIFO the layer now uses its default of 3 images; DXVK and
VKD3D-Proton already recreate their swapchain when the limiter changes,
other apps are asked to with VK_SUBOPTIMAL_KHR (0119).

-r fixed gamescope's pacing and limiter rate for the whole session, so a
panel switched to another mode kept the old rate until the next session.
With GAMESCOPE_NESTED_REFRESH_FOLLOWS_HOST=1 the rate the host compositor
reports replaces it, and Steam gets the display information again (0120).
The session sets it whenever it passes -r.
This commit is contained in:
The412Banner committed 2026-10-26 20:58:43 +00:00
1 parent 73daaf7adc
commit c4ade69eb3
6 files changed
+166 -3

No files matched your search

+32 -2
View File
@@ -96,8 +96,7 @@ running AIO Graphics Test uncapped, Xwayland used 24-32% of a core and the game'
present thread sat about half idle.
The patch can keep the result for `DROIDDECK_WSI_BYPASS_CHECK_MS` milliseconds. Unset
or 0 keeps the per-present check; the app sets 100 only in Performance mode and 0
otherwise. With 100, a window resize or a flip/obscure change is seen up to 100 ms
or 0 keeps the per-present check; the app sets 100. With 100, a window resize or a flip/obscure change is seen up to 100 ms
later than before; surface creation and capability queries still check every time.
## 0118 Wayland: preserve signed plane positions
@@ -121,3 +120,34 @@ The old component lost the image in Fill and magnification. The tested executabl
matches the pinned p14 archive and the locally assembled APK. Hardware checks used
native Gamescope properties; the physical Back+LB shortcut was not independently
confirmed. The original APK and runtime were restored after validation.
## 0119 WSI: default image count while the frame limiter runs
The app sets `GAMESCOPE_WSI_MIN_IMAGE_COUNT=8` so an uncapped game keeps drawing while
gamescope turns its buffers around. With Steam's Frame Limit on, gamescope forces FIFO,
and the layer always hands the driver MAILBOX, so a game with eight images could queue
up to seven frames inside gamescope before it blocked: each one adds a frame of input
latency at the limited rate.
While the limiter forces FIFO, the layer now reports and enforces its default minimum
of 3 images instead of the raised count; with the limiter off it uses the raised count
as before. DXVK and VKD3D-Proton already recreate their swapchain when the limiter
changes (the layer returns `VK_ERROR_OUT_OF_DATE_KHR`), so their image count follows
the Quick Access menu. Other apps keep their swapchain on a limiter change; they now
get `VK_SUBOPTIMAL_KHR` while their image count no longer matches, unless the layer
marks them as not taking it (`NoSuboptimal`).
## 0120 Wayland: nested refresh follows the host
`-r` fixes the refresh gamescope paces at, and the frame limiter and Steam's Frame Limit
slider use the same value. The app passes the panel refresh at session start, so a
panel switched to another mode during the session (for example in the device's own
quick settings) left gamescope pacing at the old rate until the next session; only the
reported output refresh changed.
With `GAMESCOPE_NESTED_REFRESH_FOLLOWS_HOST=1`, a refresh the host compositor reports
through presentation feedback replaces the `-r` value, so pacing and the limiter switch
with the panel. `-r` still sets the starting rate, which avoids gamescope assuming
60 Hz until the first frame is shown. When the refresh changes, gamescope also sends
its `gamescope_control` display information to Steam again; Steam otherwise reads it
only when it binds.