mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 13:55:58 +00:00
Merge commit 'e1a7d527fd412b6bd78833e01fe80f515e324971' into merge/main-into-non-adreno-all
# Conflicts: # .github/workflows/build.yml # app/build.gradle # app/src/main/java/com/droiddeck/launcher/core/DeviceReport.kt # app/src/main/java/com/droiddeck/launcher/gpu/DriverPairs.kt # app/src/main/java/com/droiddeck/launcher/gpu/GpuInfo.kt # app/src/main/java/com/droiddeck/launcher/gpu/TurnipDriver.java # app/src/main/java/com/droiddeck/launcher/gpu/TurnipReleases.kt # app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntime.java # app/src/main/java/com/droiddeck/launcher/session/SessionFiles.kt # app/src/main/java/com/droiddeck/launcher/session/SessionService.kt # app/src/main/res/values/strings.xml # app/src/test/java/com/droiddeck/launcher/ui/ComponentsPageProfileTest.kt # tools/build_local.sh # tools/gamescope/PATCHES.md # tools/gamescope/release.env # tools/linuxfs/overlay/usr/local/bin/droiddeck-game-env # tools/linuxfs/preload/netif.c # tools/linuxfs/preload/opens.c # tools/release/runtime_inputs.py
This commit is contained in:
commit
e7b523d653
574 files changed
+41749
-2616
No files matched your search
@@ -56,6 +56,13 @@ library list, before anything is published.
|
||||
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.
|
||||
- `0116-hold-overlay-repaint-for-next-frame.patch` - this app: on a fixed-refresh output every
|
||||
mangoapp commit asked for a repaint of its own, and mangoapp draws once per game frame just after
|
||||
that frame was shown, so a 60 fps game on a 120 Hz panel was composited twice per frame - 75 frames
|
||||
a second reached the screen, one in two 8 ms after the last with no new picture (Valheim, Stardew
|
||||
Valley, Among Us). The VRR path already leaves such repaints to the next game frame; on a fixed
|
||||
refresh output they now wait for it too, for at most `external_overlay_hold_cycles` refreshes (4,
|
||||
so 30 fps at 120 Hz still merges), and are painted on their own after that.
|
||||
|
||||
The system PowerVR driver uses the existing SDL/Wayland swapchain backend. Its additional patches are:
|
||||
|
||||
@@ -112,3 +119,22 @@ app's Wayland-hosted gamescope never reaches, or need a newer gamescope than the
|
||||
modifiers the driver supports but does not report EXPORTABLE uses them anyway, and an image with no
|
||||
usable modifier fails with a log line instead of asserting in `CVulkanTexture::BInit`. The Mali
|
||||
bridge forwards the phone driver's answer, which leaves EXPORTABLE out, though it exports dma-bufs.
|
||||
|
||||
The shared DroidDeck patch also includes `0116-release-cursor-shm-buffers.patch`: pointer cursor
|
||||
surfaces have no X11/xdg window association, so routing their commits through `g_PendingCommits`
|
||||
retained every old SHM buffer until the surface was destroyed. It ignores cursor-role commits before
|
||||
taking the buffer lock; X11 cursor images still follow the existing MouseCursor path. Window commits
|
||||
awaiting association are unchanged.
|
||||
|
||||
The live regression probe is `tools/tests/test_gamescope_cursor_shm.py`. Run it
|
||||
inside an active Gamescope session with access to that process's `/proc` fd
|
||||
directory. It submits 20 distinct SHM cursor buffers and requires at most the
|
||||
current buffer to remain open, then none after surface destruction. The
|
||||
`--unassigned-control` variant omits the cursor role and verifies that all 20
|
||||
commits awaiting a window association remain queued until surface destruction.
|
||||
|
||||
Device validation (2026-10-20): the stock component retained 20/20 cursor buffers;
|
||||
the patched component retained 1/20, then 0 after destruction. The unassigned
|
||||
control retained 20/20 and then 0. In Backpack Battles, two batches of ten touch
|
||||
drags leaked 188 and 197 SHM descriptors before the fix; the same batches added
|
||||
zero after the fix (112 total descriptors before and after each batch).
|
||||
@@ -0,0 +1,64 @@
|
||||
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
|
||||
index 214677d..6c9299d 100644
|
||||
--- a/src/steamcompmgr.cpp
|
||||
+++ b/src/steamcompmgr.cpp
|
||||
@@ -298,6 +298,7 @@ update_runtime_info();
|
||||
gamescope::ConVar<bool> cv_adaptive_sync( "adaptive_sync", false, "Whether or not adaptive sync is enabled if available." );
|
||||
gamescope::ConVar<bool> cv_adaptive_sync_ignore_overlay( "adaptive_sync_ignore_overlay", false, "Whether or not to ignore overlay planes for pushing commits with adaptive sync." );
|
||||
gamescope::ConVar<int> cv_adaptive_sync_overlay_cycles( "adaptive_sync_overlay_cycles", 1, "Number of vblank cycles to ignore overlay repaints before forcing a commit with adaptive sync." );
|
||||
+gamescope::ConVar<int> cv_external_overlay_hold_cycles( "external_overlay_hold_cycles", 4, "Number of vblank cycles an external overlay's repaint waits for the next base plane commit on a fixed refresh output, 0 repaints at once." );
|
||||
gamescope::ConVar<bool> cv_adaptive_sync_uncapped( "adaptive_sync_uncapped", true, "Whether or not to allow mailbox/immediate clients to run uncapped with adaptive sync by deferring paints until the display can take a new flip." );
|
||||
|
||||
gamescope::ConVar<bool> cv_upscale_preemptive( "upscale_preemptive", true, "Allow pre-emptive upscaling" );
|
||||
@@ -1119,6 +1120,7 @@ uint32_t lastPublishedInputCounter;
|
||||
|
||||
std::atomic<bool> hasRepaint = false;
|
||||
bool hasRepaintNonBasePlane = false;
|
||||
+bool hasRepaintExternalOverlay = false;
|
||||
|
||||
bool g_bUpdateForwardedVROverlays = false;
|
||||
|
||||
@@ -8015,7 +8017,10 @@ bool handle_done_commit( steamcompmgr_win_t *w, xwayland_ctx_t *ctx, uint64_t co
|
||||
if ( ( w == pFocus->externalOverlayWindow && w->opacity != TRANSLUCENT ) &&
|
||||
( GetBackend()->GetCurrentConnector() && !GetBackend()->GetCurrentConnector()->IsVRRActive() ) )
|
||||
{
|
||||
- hasRepaintNonBasePlane = true;
|
||||
+ if ( cv_external_overlay_hold_cycles > 0 )
|
||||
+ hasRepaintExternalOverlay = true;
|
||||
+ else
|
||||
+ hasRepaintNonBasePlane = true;
|
||||
}
|
||||
|
||||
// If this is the main plane, repaint
|
||||
@@ -10573,6 +10578,14 @@ steamcompmgr_main(int argc, char **argv)
|
||||
hasRepaint = true;
|
||||
|
||||
bool bPainted = false;
|
||||
+ bool bPaintedOutput = false;
|
||||
+
|
||||
+ static int nHeldExternalOverlayCycles = 0;
|
||||
+
|
||||
+ if ( !hasRepaintExternalOverlay )
|
||||
+ nHeldExternalOverlayCycles = 0;
|
||||
+ else if ( vblank && ++nHeldExternalOverlayCycles >= cv_external_overlay_hold_cycles )
|
||||
+ hasRepaintNonBasePlane = true;
|
||||
|
||||
static int nIgnoredOverlayRepaints = 0;
|
||||
|
||||
@@ -10733,6 +10746,7 @@ steamcompmgr_main(int argc, char **argv)
|
||||
paint_all( pPaintFocus, eFlipType == FlipType::Async );
|
||||
|
||||
bPainted = true;
|
||||
+ bPaintedOutput = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10751,6 +10765,8 @@ steamcompmgr_main(int argc, char **argv)
|
||||
|
||||
hasRepaint = false;
|
||||
hasRepaintNonBasePlane = false;
|
||||
+ if ( bPaintedOutput )
|
||||
+ hasRepaintExternalOverlay = false;
|
||||
nIgnoredOverlayRepaints = 0;
|
||||
|
||||
{
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/src/wlserver.cpp
|
||||
+++ b/src/wlserver.cpp
|
||||
@@ -203,6 +203,12 @@
|
||||
}
|
||||
|
||||
void xwayland_surface_commit(struct wlr_surface *wlr_surface) {
|
||||
+ // Cursor surfaces never acquire an X11/xdg window association. Keeping their
|
||||
+ // commits in g_PendingCommits pins every old SHM buffer until the cursor
|
||||
+ // surface is destroyed. X11 cursor images are handled by MouseCursor.
|
||||
+ if ( wlr_surface->role && strcmp( wlr_surface->role->name, "wl_pointer-cursor" ) == 0 )
|
||||
+ return;
|
||||
+
|
||||
wlr_surface->current.committed = 0;
|
||||
|
||||
wlserver_x11_surface_info *wlserver_x11_surface_info = get_wl_surface_info(wlr_surface)->x11_surface;
|
||||
Reference in new issue
Block a user