mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 05:46:03 +00:00
fix: pace gamescope's fixed-refresh frame limiter per window by time (#753)
This commit is contained in:
1 parent
ec537421ac
commit
02888834d4
3 files changed
+36
-2
No files matched your search
@@ -44,6 +44,13 @@ library list, before anything is published.
|
||||
read the window's attributes first, it kept the window as override-redirect and left it out of
|
||||
`GAMESCOPE_FOCUSABLE_WINDOWS`, so the client kept its loading screen over the running game
|
||||
(Skyrim SE, A Plague Tale: Innocence, on the games' own Xwayland). MapNotify now refreshes the flag.
|
||||
- `0115-limiter-paces-per-window.patch` - this app: on a fixed-refresh output the frame limiter
|
||||
(Steam's Frame Limit) let a capped window's frames out only on every Nth refresh of a global grid,
|
||||
so a frame finished just after its slot waited a whole extra slot. At 30 on 60 Hz one picture was
|
||||
held for three or four refreshes - "small stops and ladders" with frame generation - where a game's
|
||||
own limiter slips such a frame by one refresh. The fixed-refresh branch now paces each window by
|
||||
time, as the VRR branch already did: its next frame goes out on the first refresh a capped interval
|
||||
after its last one, with half a refresh of tolerance so an on-time window keeps every Nth refresh.
|
||||
|
||||
Sixteen more of Armada's patches are DRM/lease/HDR-on-KMS work for a native display, which this
|
||||
app's Wayland-hosted gamescope never reaches, or need a newer gamescope than the runtime has.
|
||||
@@ -0,0 +1,27 @@
|
||||
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
|
||||
index 5b0e300..b9b07ca 100644
|
||||
--- a/src/steamcompmgr.cpp
|
||||
+++ b/src/steamcompmgr.cpp
|
||||
@@ -6875,10 +6875,19 @@ static bool steamcompmgr_should_vblank_window( bool bShouldLimitFPS, uint64_t vb
|
||||
{
|
||||
if ( g_nSteamCompMgrTargetFPS && bShouldLimitFPS && nRefreshHz > nTargetFPS )
|
||||
{
|
||||
- int nVblankDivisor = nRefreshHz / nTargetFPS;
|
||||
+ if ( w && now )
|
||||
+ {
|
||||
+ uint64_t schedule = w->last_commit_first_latch_time + g_SteamCompMgrLimitedAppRefreshCycle;
|
||||
+ if ( now + g_SteamCompMgrAppRefreshCycle / 2 < schedule )
|
||||
+ bSendCallback = false;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ int nVblankDivisor = nRefreshHz / nTargetFPS;
|
||||
|
||||
- if ( vblank_idx % nVblankDivisor != 0 )
|
||||
- bSendCallback = false;
|
||||
+ if ( vblank_idx % nVblankDivisor != 0 )
|
||||
+ bSendCallback = false;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
GAMESCOPE_REPO=Droid-Deck/DroidDeck-Components
|
||||
GAMESCOPE_TAG=gamescope-3.16.29-p9
|
||||
GAMESCOPE_SHA256=7123a37bdbcd0d76d4bd1d7490e5d2017221e036395fdd48c1e92458594ca769
|
||||
GAMESCOPE_TAG=gamescope-3.16.29-p10
|
||||
GAMESCOPE_SHA256=e8e2433ae618458135ec271a30af7e80b282ff41f9931286e9bbad614838eca0
|
||||
Reference in new issue
Block a user