perf(gpu): parallelize translation of eligible large thin command lists #599

Open
github-bot wants to merge 6 commits from github-bot/gh-599 into main AGit
Owner

@⁠tommiehansen on GitHub · 2026-12-05 14:51 UTC · original
tommiehansen:perf/phase8-thin-split-20261205 → main · +518 −14 · 3 files · 6 commits · open

Why

Translating a large already recorded graphics list serially can delay CPU submission even when independent segments can be translated concurrently.

What changes

Opt-in VICTORY_THIN_SPLIT=1: split queued, closed, eligible large recordings (at least 32 chunks) into ordered state checkpoints. Refuse indirect/compute, copies, uploads and unsupported commands. Smaller lists retain original path. Independent VICTORY_THIN_SPLIT_CENSUS=1 counts eligibility and actual splits even when splitting is disabled.

Benchmark results

Windows WARP native benchmark, 6f1d0d3, same binary off/on; four ABBA/BAAB blocks, eight repetitions per trial, four workers, 4096 draws.

Metric Original Split Change
Translation total 2.287 ms 1.838 ms −19.6%
Translation tail 1.945 ms 0.767 ms −60.6%
Submit 75.412 ms 72.193 ms −4.3%

All four translation blocks improved, ten splits and exact pixels. Current 4e6dfd6 CI enabled-only 4096 draws 1.840 ms total, 0.756 ms tail, 77.858 ms submit, eight samples; no split at 256 draws, two at 1500.
Independent RX 9070 XT report: 4K FSR Quality, HWRT, FG off, two repeats: 40/42 ms vs 40/41 ms; worst five-second window 50.1/59.7 vs 46.5/49.3 ms. No errors; average within noise, not native-resolution evidence.

Why this should be merged

Scoped CPU translation/tail savings for large admitted lists with exact ordering and small-list fallback. Ready for review opt-in; actual title eligibility remains workload dependent.

Validation

Current head two checkpoint tests, exact pixels at 256/1500/4096, diagnostics all-targets and census passed. Mixed state, descriptor reads and concurrent title replay requested.

Compatibility and dependencies

Default off; no HWRT foundation dependency. Preserve state checkpoints and refusal. Test CPU-bound scenes and report eligible/split counts, frame-time tails and visual parity.

Archived previous description, checklist and historical measurements.

**@⁠tommiehansen** on GitHub · 2026-12-05 14:51 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/599) `tommiehansen:perf/phase8-thin-split-20261205` → `main` · +518 −14 · 3 files · 6 commits · open ## Why Translating a large already recorded graphics list serially can delay CPU submission even when independent segments can be translated concurrently. ## What changes Opt-in VICTORY_THIN_SPLIT=1: split queued, closed, eligible large recordings (at least 32 chunks) into ordered state checkpoints. Refuse indirect/compute, copies, uploads and unsupported commands. Smaller lists retain original path. Independent VICTORY_THIN_SPLIT_CENSUS=1 counts eligibility and actual splits even when splitting is disabled. ## Benchmark results [Windows WARP native benchmark](https://github.com/tommiehansen/VIctory-xmem/actions/runs/47525827524/job/145692035029), 6f1d0d3, same binary off/on; four ABBA/BAAB blocks, eight repetitions per trial, four workers, 4096 draws. | Metric | Original | Split | Change | |---|---:|---:|---:| | Translation total | 2.287 ms | 1.838 ms | **−19.6%** | | Translation tail | 1.945 ms | 0.767 ms | **−60.6%** | | Submit | 75.412 ms | 72.193 ms | −4.3% | All four translation blocks improved, ten splits and exact pixels. Current 4e6dfd6 [CI](https://github.com/tommiehansen/VIctory-xmem/actions/runs/47536772033) enabled-only 4096 draws 1.840 ms total, 0.756 ms tail, 77.858 ms submit, eight samples; no split at 256 draws, two at 1500. [Independent RX 9070 XT report](https://git.gtahub.st/github/lobomfz--VIctory-xmem/pulls/599): 4K FSR Quality, HWRT, FG off, two repeats: 40/42 ms vs 40/41 ms; worst five-second window 50.1/59.7 vs 46.5/49.3 ms. No errors; average within noise, not native-resolution evidence. ## Why this should be merged Scoped CPU translation/tail savings for large admitted lists with exact ordering and small-list fallback. Ready for review opt-in; actual title eligibility remains workload dependent. ## Validation Current head two checkpoint tests, exact pixels at 256/1500/4096, diagnostics all-targets and census passed. Mixed state, descriptor reads and concurrent title replay requested. ## Compatibility and dependencies Default off; no HWRT foundation dependency. Preserve state checkpoints and refusal. Test CPU-bound scenes and report eligible/split counts, frame-time tails and visual parity. [Archived previous description, checklist and historical measurements](https://github.com/tommiehansen/VIctory-xmem/blob/04dd44857abe222961157663b89a4dfed4c7277c/archive/pr-descriptions-20261206.md).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 14:53:45 +00:00
Author
Owner

@⁠fsrajner on GitHub · 2026-12-05 20:06 UTC · original

A/B data point on RDNA 4. This PR was tested together with #612, #599, #553 and #608 in one build. All are opt-in, so the arms differ only by env.

Setup: RX 9070 XT 16 GB, Ryzen 7 7800X3D, CachyOS, repo-patched Mesa 26.3.1 RADV + vkd3d-proton, proton-cachyos-slr. Series X profile, 4K output with FSR 4.1.2 Quality, hardware RT (HW_RT + LEAN_BUILDER + REUSE), frame generation off, headless gamescope. Base: main @ 49f5f9e + rt-7-reuse + #542 (+ #611/#596, switched off). The four PRs merged with no conflicts.

Method: the same intro snapshot every run, 120 s after the first A press. One warm-up run, then two rounds of all five arms, interleaved. "Long frames" are the long frame lines (≥ 50 ms). This scene is GPU-bound: the submit thread waits ~16 ms a frame on the card.

arm ms/frame 5 s windows > 40 ms worst window gpu_wait long frames
base 40 / 42 22/36 50.1 / 59.7 ms 16.0 / 16.2 ms 262 / 249
#612 SUBRENDER_WORKERS=8 40 / 40 22/36 55.2 / 55.9 ms 20.9 / 21.6 ms 233 / 220
#599 THIN_SPLIT=1 40 / 41 25/36 46.5 / 49.3 ms 17.5 / 15.9 ms 246 / 246
#553 JOIN_BARRIERS=1 40 / 40 21/36 51.5 / 52.5 ms 16.3 / 15.6 ms 242 / 239
#608 EVENT_DIRTY_SHADOWS=1 42 / 41 28/36 56.1 / 48.9 ms 17.1 / 16.7 ms 268 / 270
  • For this PR: the best worst window of all arms (46.5 / 49.3 ms), but the mean and the slow-window share are within noise. No errors.
**@⁠fsrajner** on GitHub · 2026-12-05 20:06 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/599#issuecomment-7444535346) A/B data point on RDNA 4. This PR was tested together with #612, #599, #553 and #608 in one build. All are opt-in, so the arms differ only by env. **Setup:** RX 9070 XT 16 GB, Ryzen 7 7800X3D, CachyOS, repo-patched Mesa 26.3.1 RADV + vkd3d-proton, proton-cachyos-slr. Series X profile, 4K output with FSR 4.1.2 Quality, hardware RT (`HW_RT` + `LEAN_BUILDER` + `REUSE`), frame generation off, headless gamescope. Base: `main` @ `49f5f9e` + `rt-7-reuse` + #542 (+ #611/#596, switched off). The four PRs merged with no conflicts. **Method:** the same intro snapshot every run, 120 s after the first A press. One warm-up run, then two rounds of all five arms, interleaved. "Long frames" are the `long frame` lines (≥ 50 ms). This scene is GPU-bound: the submit thread waits ~16 ms a frame on the card. | arm | ms/frame | 5 s windows > 40 ms | worst window | gpu_wait | long frames | |---|---|---|---|---|---| | base | 40 / 42 | 22/36 | 50.1 / 59.7 ms | 16.0 / 16.2 ms | 262 / 249 | | #612 `SUBRENDER_WORKERS=8` | 40 / 40 | 22/36 | 55.2 / 55.9 ms | 20.9 / 21.6 ms | 233 / 220 | | #599 `THIN_SPLIT=1` | 40 / 41 | 25/36 | 46.5 / 49.3 ms | 17.5 / 15.9 ms | 246 / 246 | | #553 `JOIN_BARRIERS=1` | 40 / 40 | 21/36 | 51.5 / 52.5 ms | 16.3 / 15.6 ms | 242 / 239 | | #608 `EVENT_DIRTY_SHADOWS=1` | 42 / 41 | 28/36 | 56.1 / 48.9 ms | 17.1 / 16.7 ms | 268 / 270 | - For this PR: the best worst window of all arms (46.5 / 49.3 ms), but the mean and the slow-window share are within noise. No errors.
Author
Owner

@⁠Milkhaus-tech on GitHub · 2026-12-06 03:53 UTC · original

RDNA 4 A/B for VICTORY_THIN_SPLIT=1.

Setup: RX 9060 XT 16 GB (RDNA 4, Navi 44), Ryzen 7 5800X, 32 GB RAM, Ubuntu 26.04 (kernel 7.0.0-44), repo Mesa 26.3.1 RADV, GE-Proton11-11, resizable BAR on. Series X profile, potato preset, 1920x1080 output, VICTORY_FSR_4K=balanced, ML frame generation, ray tracing off.

Method: VICTORY_BENCH_ROUTE=downtown, with the same save restored before each run. I measured route start +30 s to +330 s from the stats: frame 5 s windows (about 59 per run). Rendered fps is shown; generated frames are not counted. "p10" is the 10th-percentile 5 s window. One arm per run; the arms were interleaved, not all A then all B. The default arm varied from 31.6 to 33.4 fps over 8 runs, so differences under about 2 fps are noise.

Build: main @ 8c4e663 + #596 + #637 + #639 + #611 + #599 + #626, all switches off except the one being tested.

Arm Runs avg fps p10 worst 5 s frames >50 ms /min frames >100 ms /min
default (same build) 5 32.0-33.4 (mean 32.6) 19.3-23.7 16.2-20.2 93-139 2.6-4.9
THIN_SPLIT=1 2 33.3, 32.1 23.7, 20.9 18.9, 18.2 95, 147 2.6, 2.8

No measurable change on this setup. The game uses about 9 of 16 threads, and the GPU is mostly the limit: the card reads about 90% busy in play, and waiting on it is a large part of long frames. So spreading list translation across more threads has little to win here. It could matter on CPUs with fewer cores or when the GPU isn't the bottleneck. No visual differences, errors or crashes.

**@⁠Milkhaus-tech** on GitHub · 2026-12-06 03:53 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/599#issuecomment-7451070973) RDNA 4 A/B for `VICTORY_THIN_SPLIT=1`. **Setup:** RX 9060 XT 16 GB (RDNA 4, Navi 44), Ryzen 7 5800X, 32 GB RAM, Ubuntu 26.04 (kernel 7.0.0-44), repo Mesa 26.3.1 RADV, GE-Proton11-11, resizable BAR on. Series X profile, potato preset, 1920x1080 output, `VICTORY_FSR_4K=balanced`, ML frame generation, ray tracing off. **Method:** `VICTORY_BENCH_ROUTE=downtown`, with the same save restored before each run. I measured route start +30 s to +330 s from the `stats: frame` 5 s windows (about 59 per run). Rendered fps is shown; generated frames are not counted. "p10" is the 10th-percentile 5 s window. One arm per run; the arms were interleaved, not all A then all B. The default arm varied from 31.6 to 33.4 fps over 8 runs, so differences under about 2 fps are noise. Build: `main` @ `8c4e663` + #596 + #637 + #639 + #611 + #599 + #626, all switches off except the one being tested. | Arm | Runs | avg fps | p10 | worst 5 s | frames >50 ms /min | frames >100 ms /min | |---|---|---|---|---|---|---| | default (same build) | 5 | 32.0-33.4 (mean 32.6) | 19.3-23.7 | 16.2-20.2 | 93-139 | 2.6-4.9 | | THIN_SPLIT=1 | 2 | 33.3, 32.1 | 23.7, 20.9 | 18.9, 18.2 | 95, 147 | 2.6, 2.8 | No measurable change on this setup. The game uses about 9 of 16 threads, and the GPU is mostly the limit: the card reads about 90% busy in play, and waiting on it is a large part of long frames. So spreading list translation across more threads has little to win here. It could matter on CPUs with fewer cores or when the GPU isn't the bottleneck. No visual differences, errors or crashes.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/599/head:github-bot/gh-599'
git switch 'github-bot/gh-599'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-599'
git switch 'github-bot/gh-599'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-599'
git switch 'github-bot/gh-599'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-599'
git switch 'main'
git merge --squash 'github-bot/gh-599'
git switch 'main'
git merge --ff-only 'github-bot/gh-599'
git switch 'main'
git merge 'github-bot/gh-599'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.