host: a submission's joined parts go to the queue in one call (VICTORY_PARTS_ONE_CALL) #330

Manually merged
github merged 2 commits from github-bot/gh-330 into main 2026-12-03 16:30:56 +00:00 AGit
Owner

@⁠t-jonesy on GitHub · 2026-12-03 15:39 UTC · original
t-jonesy:upstream/parts-one-call → main · +245 −5 · 3 files · 2 commits · merged 2026-12-03 16:26 UTC

Problem

RGP queue timings over 3 frames show the graphics queue idle for 2–8 ms per frame. Every gap falls at a boundary between kernel submissions:

  • about 8 µs at each of ~45 boundaries a frame;
  • 0.1–2.3 ms at 3 to 13 of them, even though the next work had already been queued 7–42 ms earlier.

That fits the kernel's limit on jobs in the ring and the scheduler's wake-up time. The ~45 boundaries are ~17 flights plus their joined parts, and each joined part goes to the queue in an ExecuteCommandLists call of its own.

Changes

  • VICTORY_PARTS_ONE_CALL=1 (off by default) sends a flight's joined parts in one ExecuteCommandLists call. A pooled list holding a global barrier (all syncs, all accesses: place.rs's wait_for_all) goes between each two parts, so each part still sees the previous one finished, as with a call boundary.
  • Only with enhanced barriers. If a barrier list can't be made, it falls back to separate calls.
  • A new per-second log line counts the calls made by submissions sent ahead (calls to the queue per frame by submissions sent ahead: …), so runs can be compared.
  • docs/SETTINGS.md lists the switch.

Results

off on
fps (3 alternating pairs, 60 s each) 22.9 / 23.2 / 22.9 → 23.0, min 22.2 23.7 / 23.6 / 23.5 → 23.6, min 23.0
queue calls / frame 64 19

The gain is +2.6%. On was faster in all 3 pairs, with 0 errors and no visual differences in screenshots. The switch has since stayed on in longer hands-on play with no problems seen. (Forcing the GPU to profile_peak made things 10% slower, so the bubbles aren't clock or power transitions.)

All of these numbers come from one machine:

  • Ryzen 9 7950X3D, RX 9070 XT (RDNA4)
  • RADV / Mesa 26.3.1 with this project's patches, Linux 7.3
  • 4K with FSR 4 performance, RT on
  • a steady camera, alternating A/B runs

They were measured on a fork whose base is about 150 commits behind current main; this branch is the same change rebased (it applied without conflicts). Untested on other GPUs, and not re-measured in game after the rebase.

Testing

  • 2 new unit tests (barrier placement, list order) and a real-card test (three chained buffer copies in one call with barrier lists).
  • ./build.sh (release) builds.
  • victory-gpu unit tests (Windows target under Wine, RADV): the three new tests pass, including the real-card one. The full suite has 311 passed and 6 failed; the same 6 tests (indirect::tests::host_list_* and watch::*) fail on unmodified main in the same environment.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ETU6PfySRvsjk18uHFtWya

**@⁠t-jonesy** on GitHub · 2026-12-03 15:39 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/330) `t-jonesy:upstream/parts-one-call` → `main` · +245 −5 · 3 files · 2 commits · merged 2026-12-03 16:26 UTC ## Problem RGP queue timings over 3 frames show the graphics queue idle for 2–8 ms per frame. Every gap falls at a boundary between kernel submissions: - about 8 µs at each of ~45 boundaries a frame; - 0.1–2.3 ms at 3 to 13 of them, even though the next work had already been queued 7–42 ms earlier. That fits the kernel's limit on jobs in the ring and the scheduler's wake-up time. The ~45 boundaries are ~17 flights plus their joined parts, and each joined part goes to the queue in an `ExecuteCommandLists` call of its own. ## Changes - **`VICTORY_PARTS_ONE_CALL=1`** (off by default) sends a flight's joined parts in one `ExecuteCommandLists` call. A pooled list holding a global barrier (all syncs, all accesses: `place.rs`'s `wait_for_all`) goes between each two parts, so each part still sees the previous one finished, as with a call boundary. - Only with enhanced barriers. If a barrier list can't be made, it falls back to separate calls. - A new per-second log line counts the calls made by submissions sent ahead (`calls to the queue per frame by submissions sent ahead: …`), so runs can be compared. - `docs/SETTINGS.md` lists the switch. ## Results | | off | on | |---|---|---| | fps (3 alternating pairs, 60 s each) | 22.9 / 23.2 / 22.9 → **23.0**, min 22.2 | 23.7 / 23.6 / 23.5 → **23.6**, min 23.0 | | queue calls / frame | 64 | **19** | The gain is +2.6%. On was faster in all 3 pairs, with 0 errors and no visual differences in screenshots. The switch has since stayed on in longer hands-on play with no problems seen. (Forcing the GPU to `profile_peak` made things 10% slower, so the bubbles aren't clock or power transitions.) All of these numbers come from **one machine**: - Ryzen 9 7950X3D, RX 9070 XT (RDNA4) - RADV / Mesa 26.3.1 with this project's patches, Linux 7.3 - 4K with FSR 4 performance, RT on - a steady camera, alternating A/B runs They were measured on a fork whose base is about 150 commits behind current `main`; this branch is the same change rebased (it applied without conflicts). **Untested on other GPUs**, and not re-measured in game after the rebase. ## Testing - 2 new unit tests (barrier placement, list order) and a real-card test (three chained buffer copies in one call with barrier lists). - `./build.sh` (release) builds. - victory-gpu unit tests (Windows target under Wine, RADV): the three new tests pass, including the real-card one. The full suite has 311 passed and 6 failed; the same 6 tests (`indirect::tests::host_list_*` and `watch::*`) fail on unmodified `main` in the same environment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ETU6PfySRvsjk18uHFtWya
Three RGP frames of the cinematic camera (4K, ~24 fps) put the graphics
queue's 2.1-7.8 ms of idle a frame entirely at the boundaries between
kernel submissions: about 8 us at each of ~45 a frame, and 0.1-2.3 ms at
3 to 13 of them, in two of the frames although the next submission had
been made 7-40 ms before. Those ~45 are ~17 flights plus their joined
parts, which go to the queue in calls of their own.

With VICTORY_PARTS_ONE_CALL=1 (and enhanced barriers), a flight's parts
go in one ExecuteCommandLists, a pooled list holding a global barrier
(all syncs, all accesses; place.rs's wait_for_all) between each two, so
what a part sees of the one before is as with a call boundary; ~19
boundaries a frame instead of ~45. Off by default.

A new frame-rate line counts the calls made by submissions sent ahead,
the joined parts that begin inside one, and how many went behind a
barrier, to compare runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01ETU6PfySRvsjk18uHFtWya
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01ETU6PfySRvsjk18uHFtWya
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 15:42:55 +00:00
github manually merged commit a92601ad84 into main 2026-12-03 16:30:56 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.