Skip to content

Let the nested output's present mode be chosen (GAMESCOPE_NESTED_PRESENT_MODE) - #2438

Open
danielcamposramos wants to merge 1 commit into
ValveSoftware:masterfrom
danielcamposramos:nested-present-mode
Open

danielcamposramos wants to merge 1 commit into
ValveSoftware:masterfrom
danielcamposramos:nested-present-mode

Conversation

@danielcamposramos

@danielcamposramos danielcamposramos commented Sep 26, 2026 •

Copy link
Copy Markdown

@misyltoad, a gift from the 3D side, since ValveSoftware/Source-1-Games#8297 already has you in copy.

The nested output (SDL and Wayland backends) always presents with FIFO.
With the game on vsync inside gamescope, that is a second queue behind the first.

What it did: frames reached the screen in 4 ms / 33 ms pairs, against 15.6 to 17.7 ms (5th to 95th percentile) without gamescope.
On a stereo 3D TV, and in red/cyan anaglyph, fast camera turns then read as walls moving in depth.
Measured with a per-frame log of Half-Life 2's view angles, VR mode driving a 3D TV (RTX 3060, KDE Plasma on Wayland, gamescope in an SDL window on X11).

The change: GAMESCOPE_NESTED_PRESENT_MODE=mailbox or immediate picks that mode when the surface offers it, and logs the mode in use.
Unset, or not offered, it stays FIFO, so nothing changes by default.

Result: with the game free-running and the nested output on IMMEDIATE, the 95th percentile frame time went to 4.5 ms and the depth swim was gone, in side by side and in anaglyph.
NVIDIA offers no MAILBOX for this window, so the fallback path is exercised too.
IMMEDIATE did not tear, since the host compositor still composites the window.

If a command-line option suits the project better than a variable, I will change it.

AI partners were leveraged in the production of this work.

The nested output (SDL, Wayland backends) always presents with FIFO. With
the game on vsync inside gamescope, that is a second queue behind the
first, and frames reach the screen unevenly: a per-frame log of a game's
view angles showed 4 ms / 33 ms frame pairs through gamescope, against
15.6 to 17.7 ms (5th to 95th percentile) without it. On a stereo 3D TV
and in red/cyan anaglyph, fast camera turns then read as false depth.

GAMESCOPE_NESTED_PRESENT_MODE=mailbox or immediate picks that mode when
the surface offers it, and logs the mode in use. Unset, or not offered,
it stays FIFO as before. With the game free-running and the nested
output on IMMEDIATE, the 95th percentile frame time went to 4.5 ms and
the swim was gone. NVIDIA offers no MAILBOX for the window; IMMEDIATE did
not tear, since the host compositor still composites it.
danielcamposramos added a commit to danielcamposramos/sony-bravia-linux that referenced this pull request Sep 26, 2026
…ate posted

- Module (fcdb6730): motion blur off while VR is on. Source keeps the
  blur's previous view in statics shared by both eyes, so each eye blurs
  differently in turns; run p20: "blur wrecked the mouse movement". The
  player's own value is kept next to the module and restored when VR
  stops. SVRTV_BLUROFF=0 leaves it alone.
- ValveSoftware/gamescope#2438: GAMESCOPE_NESTED_PRESENT_MODE, built on
  master; the #8297 comment, discovery and solution. Drafts 06 and 07
  marked posted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant