Skip to content

android: A33 lifts the startup blind on the first commit newer than the override's binding (GL guests with a dormant Vulkan swapchain) - #32

Merged
utkarshdalal merged 2 commits into
gamenativefrom
gamescope-blind-lifts-on-newer-commit
Nov 4, 2026
Merged

utkarshdalal merged 2 commits into
gamenativefrom
gamescope-blind-lifts-on-newer-commit

Conversation

@utkarshdalal

@utkarshdalal utkarshdalal commented Nov 4, 2026 •

Copy link
Copy Markdown

Symptom

Tomb Raider I-III Remastered (OpenGL) under gamescope on the RP6: audio plays, the panel stays black for the whole session, HUD FPS 0.0, while the game draws (verified with WINEDEBUG=+opengl: ~200 swaps/s) and Xwayland receives its frames over MIT-SHM. (Reached only once the guest libGL fix GameNative/mesa#58 is in place; before it the game crashed at window map.)

The blind's one-shot log says it all: session-blank: blank=1 reaper=0 window=present override_bound=1 saw_game_window=1 right after the window maps, never followed by blank=0. Dave the Diver (DXVK) on the same device logs blank=1 then blank=0 143 ms later; SteamWorld Dig 2 (GL, no Vulkan) never binds an override and is never blanked.

Cause

A33 judges "is the game's content on screen" by the surface of the window's newest done commit: a commit from the window's own surface was taken to be wine's desktop. A GL guest hands its frames to Xwayland (the xlib libGL's XShmPutImage), so they arrive on the window's own surface, and this game also loads dxgi/d3d11, so the WSI shim binds an override surface for a swapchain that never presents. Judged by surface, every frame looks like the desktop.

Change

A33 is corrected in place (the A28 precedent), not re-issued as a new patch. What tells the desktop from content is time, not surface: the window's newest done commit id is stamped when the override is first seen bound, and the startup blind holds until a done commit newer than that arrives, from either surface. The exit case (override gone after having been bound) and the reaper blank are unchanged. The blind's log line now also states bound_commit and last_done_commit.

Expected: DXVK guests keep the startup blank until their first presented frame (their desktop commit precedes the swapchain). GL guests with a dormant Vulkan swapchain unblank on their first XShmPutImage frame.

android/README.md gains a section on the guest libGL beside glamor's Mesa: what it is, that it is the same file on both display servers, where it comes from and how it is built. That is where the stack is documented, so the note lives here and not on the Mesa branch.

Testing

  • RP6 (payload 20261104.1 + this gamescope + mesa#58 libGL): Tomb Raider I-III, Dave the Diver (DXVK, startup transition), SteamWorld Dig 2 (GL, no override): pending, results to follow here.

…he override's binding; README: the guest libGL beside glamor's Mesa
@utkarshdalal
utkarshdalal force-pushed the gamescope-blind-lifts-on-newer-commit branch from 4d9064e to e17f4a2 Compare November 4, 2026 13:45
@utkarshdalal utkarshdalal changed the title android: A59 — the session blind lifts on the first commit newer than the override's binding (GL guests with a dormant Vulkan swapchain) android: A33 lifts the startup blind on the first commit newer than the override's binding (GL guests with a dormant Vulkan swapchain) Nov 4, 2026
@utkarshdalal

Copy link
Copy Markdown
Author

RP6 result (2026-11-04, payload 20261104.1 + this gamescope from CI run 41841088388 + mesa#58 libGL)

Tomb Raider I-III Remastered under gamescope: renders, 60 fps (HUD FPS 60.0, CPU 32 %, GPU 20 %).

19:24:50.057  xwm: nested application window 0x1600001 (tomb123.exe, 1280x720) mapped: bringing it to the front
19:24:50.058  session-blank: blank=1 reaper=0 window=present override_bound=1 saw_game_window=1 bound_commit=1 last_done_commit=1
19:24:50.074  session-blank: blank=0 reaper=0 window=present override_bound=1 saw_game_window=1 bound_commit=1 last_done_commit=2

Blank at map, lifted 16 ms later on the first commit newer than the binding (the game's first XShmPutImage frame). Before this change the same session logged blank=1 once and stayed black with audio playing.

Dave the Diver (DXVK) startup transition, same binary: blank=1 0.5 s after map (bound_commit=3 last_done_commit=3), blank=0 when its first swapchain frame was done (last_done_commit=4), 2.9 s later. The blind still covers the desktop until DXVK's first presented frame; the longer wait is the game's own first-frame time on this launch, not the predicate.

Utkarsh's call: no further DXVK validation needed (the exit path and reaper blank are untouched).

@utkarshdalal
utkarshdalal merged commit 0cb9788 into gamenative Nov 4, 2026
1 check passed
@utkarshdalal
utkarshdalal deleted the gamescope-blind-lifts-on-newer-commit branch November 4, 2026 14:05
utkarshdalal added a commit to utkarshdalal/GameNative that referenced this pull request Nov 4, 2026
…ame) + guest libGL extra_libs-20261104 (32-bit colour on Xwayland) (#2344)

* gamescope: payload 20261104.2 (A33 blind lifts on the game's first frame) and guest libGL extra_libs-20261104 (32-bit colour on Xwayland)

Tomb Raider I-III Remastered (OpenGL) under gamescope: crashed 3 s after its
window mapped, then (once past that) sat black with audio playing.

- extra_libs-20261104.tzst: the guest libGL (Mesa xlib GLX on zink, the same
  file on X11 and gamescope) reported GLX_BUFFER_SIZE as the X visual's depth,
  24 on Xwayland against 32 on the in-app X server; the game's
  wglChoosePixelFormatARB needs 32 and got no format. GameNative/mesa#58 counts
  the emulated alpha channel. Same archive otherwise; the manifest entry's file
  name changes because the app caches archives by name.
- payload 20261104.2: gamescope A33's startup blind lifted only on a commit from
  the Vulkan override surface; a GL guest's frames arrive on the X window's own
  surface, and this game also binds an override it never presents on, so the
  blind never lifted. GameNative/gamescope#32: the blind lifts on the first
  commit newer than the override's binding. Only bin/gamescope differs from
  20261104.1.

RP6 verified: title screen at 60 fps under gamescope, blind on at map and off
16 ms later.

* legacy: bundle the extra_libs-20261104 archive (the legacy flavor extracts graphics_driver/extra_libs.tzst from the APK, not the manifest)

---------

Co-authored-by: Utkarsh Dalal <utkarsh.dalal@toptal.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