Gamescope payload 20261029.3: scan-out layout per session (fixes the surfaceflinger abort on Android 16 GLES devices)

Merged
UT
11d ago
+36-1

Description

Ships gamescope payload 20261029.3 and the matching libgamenative_drm.so from GameNative/gamenative-drm#31, plus the app side of a per-session scan-out layout (passing the daemon's choice to the guest). No UI, no new setting.

A RedMagic Astra (nubia NP05J, Android 16) user got a soft reboot a few seconds after every gamescope launch: its SurfaceFlinger runs Skia on GLES, and Android 16's Skia cannot draw our BGRA_8888 scan-out buffer (Unable to generate SkImage ... colorType 6), taking launcher, system UI, NFC and camera down with it. Android 14 and 15 draw the same buffer fine.

The daemon now keeps the BGRA_8888 pool by default (nothing changes for devices that work today) and switches to RGBA_8888 only on Android 16+ with a GLES render engine, which it detects from the backend property and the aconfig flag table. The app passes the daemon's choice to the guest as GNDRM_SCANOUT_LAYOUT; a container envVars entry of the same name overrides both sides.

Payload 20261029.3 = 20261029.1 + the new libgndrm_shim.so and libadrenotools_gamescope.so, sha256 e4c4285595bdaf54f9a3829d36d4c3011424c125d53b079637fc554105a0a8c2, live on downloads.gamenative.app and the R2 fallback.

Verified on the Odin 3 (Android 15) with this build: default layout bgra, Celeste and Half-Life 2 at 60 fps with correct colours and the game buffer scanned out directly; GNDRM_SCANOUT_LAYOUT=rgba in a container env gives the RGBA path at 57 fps with correct colours.

Recording

Not attached: the user-visible change is "the tablet no longer reboots"; colours were checked by screenshot on the Odin 3.

Type of Change

  • Bug fix
  • Performance / stability improvement
  • Compatibility improvements
  • Other (requires prior approval)

Checklist

  • If I have access to #code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.
  • This change aligns with the current project scope (core functionality, stability, or performance). If not, it has been explicitly approved beforehand.
  • I have attached a recording of the change.
  • I have read and agree to the contribution guidelines in CONTRIBUTING.md.

Summary by CodeRabbit

  • New Features
    • Gamescope display sessions now use the scanout layout selected by the active session when initializing the display surface, helping maintain correct color presentation across rendering configurations.
    • If the layout cannot be detected, startup uses a compatible default so the session can continue.
  • Updates
    • Updated the Gamescope payload version.