gamescope: payload 20261103.6, a VSync-on game at the panel's rate on the vsync grid

Merged
UT
7d ago
+1-1

Description

Depends on GameNative/gamenative-drm#48 (open). Do not merge before it.

This ships GameNative/gamenative-drm#48 at 762e559 as gamescope payload 20261103.6 (app commit 9a7991215). The only change in the app is GamescopePayload.VERSION = 20261103.6.

762e559 narrows the first build, 8a5b695 (payload 20261103.5). The present wait is answered at queue only for a game with in-game VSync on, at a cap equal to the panel's rate, in a container whose present mode is not fifo. Every other case presents and answers exactly as on master. Setting a game's container present mode to fifo restores master's behaviour for that game. libgamenative_drm.so is unchanged.

What changes

At an FPS cap equal to the panel's rate (60 on a 60 Hz panel), a game with in-game VSync on is now presented as mailbox, with the shim's vsync-grid gate holding it to one frame per vblank. Its present wait is answered as soon as the game queues the present.

Everything else is unchanged:

  • games with VSync off at that cap (FIFO, gamescope's limiter);
  • caps below the panel's rate;
  • no cap;
  • a container set to MESA_VK_WSI_PRESENT_MODE=fifo;
  • frame generation.

Why

@joshuatam saw 40 fps at cap 60 on a 60 Hz panel, with CPU at 41 %, GPU at 64 %, and the HUD's LIMIT reading "--", so nothing was saturated. The game's CPU and GPU work were alternating behind the present wait instead of overlapping.

  • Under the FIFO declaration, DXVK waits for frame N's presentation before it starts frame N+1, and that wait was only answered after the GPU had finished frame N.
  • With the frame mostly GPU time, the GPU governor saw idle bubbles and did not ramp up.
  • On the X11 path the same game overlaps CPU and GPU, because the app's X server answers the wait when the present is requested.

Measured on the RP6

Dave the Diver at 1080p, 60 Hz, cap 60, VSync on, in the same spot:

before (GameNative/gamenative-drm#48 at d61b614)after (8a5b695; 762e559 in the same cell)
fps, moderate load4260.0
fps, heaviest spot—53-56, with the GPU governor holding 550 MHz
acquire-to-commit (commit_lat)23 ms14.3 ms
waits answered at queue—at_queue = commits

Payload 20261103.6

gamescope-gamenative-20261103.6.tzst, 14308746 B, sha256 d8d40c58db928e25f59371eb3fe337638d140f13febef1d3facd4747c387c183.

  • It is 20261102.4 with only lib/libadrenotools_gamescope.so replaced: 1014 members, same order and modes.
  • It is uploaded and verified on both CDN hosts. 20261103.5 (8a5b695) stays on the CDN.
membersha256from
lib/libadrenotools_gamescope.sod04525f26ad2693715b0f8e281d87be4be779631cb6232f664b493b03d433163GameNative/gamenative-drm#48 at 762e559, build string 202611031208762e559
bin/gamescope (unchanged)65d024fcee6af1b1f81b2281cc5223ee07615daa05aa8d9ecebe865526f8df69as in 20261102.4
bin/Xwayland (unchanged)4dded8566661423ee3c91490523d96240c85906bd00e0774adc912df9dd38698as in 20261102.4

Test steps

  1. Install the APK from this branch and open a game with the display server set to gamescope. On first launch payload 20261103.6 downloads. In logcat:
    • Gamescope payload 20261103.6 ready;
    • in the game process, gn-vkshim: ICD loaded [shim 202611031208 762e559].
  2. Use cap 60 on a 60 Hz panel, with in-game VSync on. The census line is printed once when frames start and again on any change:
    • expect gn-vkshim: present mode: declared=mailbox requested=fifo source=cap-rate-vsync … cap=60 gate=vsync.
    • With GNDRM_LOG_VKSHIM=1, the periodic line shows at_queue= rising with commits=.
  3. Same cap with in-game VSync off: expect declared=fifo … source=cap-rate gate=off, unchanged.

Recording

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 cubic

Ships GameNative/gamenative-drm#48 at 8a5b695 as gamescope payload 20261103.5. At an FPS cap equal to the panel's rate, a game with in-game VSync on is now presented as mailbox with the shim's vsync-grid gate, and its present wait is answered as soon as it queues the present, so the game's CPU and GPU work overlap instead of alternating (fixing 40 fps at cap 60 on a 60 Hz panel).

Unchanged

  • In-game VSync off at that cap, caps below the panel's rate, no cap, MESA_VK_WSI_PRESENT_MODE=fifo, and frame generation.
  • gamescope, Xwayland, and libgamenative_drm.so.

Summary by CodeRabbit

  • Maintenance
    • Updated the Gamescope payload version reference. The updated version is used for payload readiness checks and installation records, and changes the associated archive name. No changes to app features or user workflows are included in this update.