mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 21:35:59 +00:00
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:
1 parent
73daaf7adc
commit
c4ade69eb3
6 files changed
+166
-3
No files matched your search
@@ -18,16 +18,19 @@ class SessionPacingTest(unittest.TestCase):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
env = dict(os.environ, XDG_RUNTIME_DIR=directory, BL_REFRESH=str(refresh),
|
||||
BL_MANGOAPP='0', BL_FPS='0', DROIDDECK_GAME_FRAME_LIMIT='0')
|
||||
env.pop('GAMESCOPE_NESTED_REFRESH_FOLLOWS_HOST', None)
|
||||
env.update(overrides)
|
||||
script = '''
|
||||
set -u
|
||||
mode=steam
|
||||
pipewire_stub() { return 1; }
|
||||
run_gamescope() { printf 'ARG:%s\\n' "$@"; }
|
||||
run_gamescope() { printf 'ARG:%s\\n' "$@"; printf 'FOLLOW:%s\\n' "${GAMESCOPE_NESTED_REFRESH_FOLLOWS_HOST:-}"; }
|
||||
''' + block
|
||||
result = subprocess.run(['bash', '-c', script], env=env, capture_output=True,
|
||||
text=True, timeout=5)
|
||||
self.assertEqual(0, result.returncode, result.stderr)
|
||||
self.follow = [line.removeprefix('FOLLOW:') for line in result.stdout.splitlines()
|
||||
if line.startswith('FOLLOW:')]
|
||||
return [line.removeprefix('ARG:') for line in result.stdout.splitlines()
|
||||
if line.startswith('ARG:')]
|
||||
|
||||
@@ -38,6 +41,12 @@ run_gamescope() { printf 'ARG:%s\\n' "$@"; }
|
||||
self.assertEqual(str(refresh), args[args.index('-r') + 1])
|
||||
self.assertIn('-e', args)
|
||||
|
||||
def test_gamescope_follows_the_panel_after_the_starting_rate(self):
|
||||
self.launch(144)
|
||||
self.assertEqual(['1'], self.follow)
|
||||
self.launch(0)
|
||||
self.assertEqual([''], self.follow)
|
||||
|
||||
def test_retired_cap_variables_do_not_override_the_display_rate(self):
|
||||
for performance in ('0', '1'):
|
||||
with self.subTest(performance=performance):
|
||||
|
||||
Reference in new issue
Block a user