feat: Performance mode puts frame pacing and per-frame window-check fixes behind one switch (#1563)

Adds a Performance mode switch under Mode settings > Frame rate, off by default and stored per mode like the frame limit. Off keeps today's behaviour. On:

- with no frame limit, the compositor hands buffers back to the game as soon as they are replaced instead of once per refresh, and gamescope's WSI layer is asked for at least 8 swapchain images; a chosen frame limit still paces
- DROIDDECK_WSI_BYPASS_CHECK_MS=100 lets gamescope's WSI layer reuse its present-time Xwayland bypass check (patch 0117, gamescope-3.16.29-p13); WINE_OFFSCREEN_CHECK_MS=100 does the same for winex11 once a DroidDeck-Proton release carries that fix. Off sets both to 0.

The gamescope pack now ships the patched WSI layer and SessionFiles stages it over the runtime's stock copy. Two per-game options, off by default: PROTON_DXVK_D3D8 and WINE_D3D_CONFIG renderer=vulkan|gl.

AIO Graphics Test on an AYANEO Pocket FIT (Adreno 750), off -> on: Vulkan 204 -> 1787, OpenGL 296 -> 2169, D3D12 308 -> 3563, D3D11 1133 -> 2874, D3D9 1253 -> 3098 fps; DiRT Showdown 92.2 -> 93.4 (GPU-bound).
This commit is contained in:
The412Banner authored and GitHub committed 2026-10-25 20:29:26 +00:00
1 parent 12eac3e9ee
commit 38926b3157
17 files changed
+176 -11

No files matched your search

@@ -0,0 +1,42 @@
package com.droiddeck.launcher.session
import android.content.Context
import org.junit.Assert.*
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.RuntimeEnvironment
import org.robolectric.annotation.Config
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [33])
class PerformanceModeTest {
private val app get() = RuntimeEnvironment.getApplication()
private val session get() = app.getSharedPreferences("session", Context.MODE_PRIVATE)
@Before fun clear() { session.edit().clear().commit() }
@Test fun offByDefaultAndPerMode() {
assertFalse(SessionPrefs.performanceMode(app, SessionService.MODE_STEAM))
SessionPrefs.setPerformanceMode(app, SessionService.MODE_STEAM, true)
assertTrue(SessionPrefs.performanceMode(app, SessionService.MODE_STEAM))
assertFalse(SessionPrefs.performanceMode(app, SessionService.MODE_DESKTOP))
}
@Test fun offKeepsTodaysPacing() {
assertEquals(0, SessionPrefs.compositorFpsLimit(0, false))
assertEquals(60, SessionPrefs.compositorFpsLimit(60, false))
}
@Test fun onWithoutALimitIsUnpacedAndAChosenLimitStillPaces() {
assertEquals(SessionPrefs.FPS_UNPACED, SessionPrefs.compositorFpsLimit(0, true))
assertEquals(60, SessionPrefs.compositorFpsLimit(60, true))
}
@Test fun anOldUncappedFrameLimitReadsAsOff() {
session.edit().putInt("fpsLimit.steam", -1).commit()
assertEquals(0, SessionPrefs.fpsLimit(app, SessionService.MODE_STEAM))
assertFalse(SessionPrefs.fpsLimitChoices.any { it.first < 0 })
}
}