test: time each command-list method as the title calls it (ignored list bench) #441

Open
github-bot wants to merge 1 commit from github-bot/gh-441 into main AGit
Owner

@⁠KainanP on GitHub · 2026-11-26 18:51 UTC · original
KainanP:perf/list-call-bench → main · +1161 −0 · 4 files · 1 commits · open

Re-ported onto the Vice-Tay base (#454), rebased onto main b6d86cf8; the numbers below were measured on that main. The Neptune-base version is kept on KainanP/AnyXboxX:perf/list-call-bench-neptune, the combined-base one on perf/list-call-bench-combined.

An #[ignore]d benchmark for the CPU cost of command-list methods, ported from my VIctory branch KainanP/VIctory@perf/list-call-bench (the method behind Marvisak/VIctory#3258, #3274, #3297, #3307). It is what #443 and #444 were measured with, so anyone can check their numbers, or an A/B of their own, without the game.

What it does

pipeline::list_bench calls each list method through the list's method table on the host device, the way the title does: root arguments, setters, barriers, DrawIndexedInstanced, Dispatch, ExecuteIndirect. The title buffers sit in write-watched memory, the view heap is a shader-visible title heap, and the pipelines' translations read root views, root constants and a six-texture table, as the title's do. Each row is the best of 5 × 20,000 calls; lists are reset every 2,000 calls.

cargo test -p victory-gpu --release --lib list_bench -- --ignored --nocapture       # from third_party/victory
  • VICTORY_LIST_BENCH_SCALING=1: only the draw sequence (root CBV, 4 root constants, index buffer, indexed draw) on 1 and on 5 threads at once, each thread recording its own list, all reading the same six textures.
  • VICTORY_LIST_BENCH_INDIRECT=1: only ExecuteIndirect (one indexed draw, one dispatch) on 1 and 5 threads, each list's close timed with the calls.
  • VICTORY_LIST_BENCH_PLACED=1: the draws' textures are views the title places in its memory without a resource object (device 0x230), as its streamed textures are.

The bench runs with the default settings, where each list call is translated inside the call. With the launcher's tuned set (VICTORY_THIN=1, VICTORY_THIN_THREADS=8) the title's call only writes its arguments down and the same translation (the same draw::readable, indirect::bound, ...) runs on our eight translating threads instead: what the bench times is that work, and the 5-thread rows are the closer case.

It complements Vice-Tay's own indirect::bench (a frame of indirect draws, GPU side); this one times the CPU side per call.

Changes

  • pipeline/list_bench.rs (new, test-only), one mod line in pipeline.rs.
  • list::has_newer_table (#[cfg(all(test, windows))]): which method table a list has, for the newer titles' slots.
  • THIRD_PARTY.md: one sentence after the Vice-Tay paragraph names KainanP/VIctory as the bench's source.

Nothing outside tests changes. It is #[ignore]d and needs a card, so CI doesn't run it. The file is the combined-base port as it was: it builds and runs unchanged on Vice-Tay.

Baseline on main (b6d86cf8)

RTX 4060 Laptop GPU, Core i7-14650HX, Windows 11, release, median of 7 runs (9 for the indirect rows) interleaved with the builds of #443 and #444. Measured at a quiet moment: no game running, Windows reported 0–31 % CPU load around the runs (mostly under 16 %), so these sit well below the Neptune numbers measured under 20–30 % foreign load.

ns main
DrawIndexedInstanced, six textures, nothing changed 1343
draw sequence, per draw, 1 thread / 5 threads 1340 / 3267
the same with placed views, 1 / 5 threads 1565 / 4315
Dispatch, nothing changed 637
ExecuteIndirect, 1 dispatch with the list's close, 1 / 5 threads 2445 / 3183
ExecuteIndirect, 1 indexed draw with the list's close, 1 / 5 threads 2957 / 4089
ResourceBarrier, 1 texture transition 289

Tests

cargo test -p victory-gpu --release --lib with this branch, one thread: RTX 4060 Laptop 421 passed, Intel UHD (a78b, VICTORY_D3D12_ADAPTER=Intel, which this base supports) 421 passed, WARP (--features diagnostics, VICTORY_D3D12_WARP=1) the same single failure as main (timeline::report::tests::real_waits_are_recorded_with_who_ended_them, unrelated). The bench itself also runs on the Intel UHD. Clippy on victory-gpu --all-targets, with and without --features diagnostics: only main's warning (overlay.rs, is_multiple_of). cargo xtask policy: ok. ruff: clean.

Not measured

A game frame. The bench gives the CPU cost per call; how many calls a frame makes, and how many threads translate at once, is the title's and the settings'. Please A/B the perf PRs in game.

AI use: Claude Code (Claude Opus 5.5) ported the benchmark, ran it and drafted this description.

🤖 Generated with Claude Code

**@⁠KainanP** on GitHub · 2026-11-26 18:51 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/441) `KainanP:perf/list-call-bench` → `main` · +1161 −0 · 4 files · 1 commits · open > **Re-ported onto the Vice-Tay base (#454)**, rebased onto main b6d86cf8; the numbers below were measured on that main. The Neptune-base version is kept on [`KainanP/AnyXboxX:perf/list-call-bench-neptune`](https://github.com/KainanP/AnyXboxX/tree/perf/list-call-bench-neptune), the combined-base one on [`perf/list-call-bench-combined`](https://github.com/KainanP/AnyXboxX/tree/perf/list-call-bench-combined). An `#[ignore]`d benchmark for the CPU cost of command-list methods, ported from my VIctory branch [`KainanP/VIctory@perf/list-call-bench`](https://github.com/KainanP/VIctory/tree/perf/list-call-bench) (the method behind Marvisak/VIctory#3258, #3274, #3297, #3307). It is what #443 and #444 were measured with, so anyone can check their numbers, or an A/B of their own, without the game. ## What it does `pipeline::list_bench` calls each list method **through the list's method table** on the host device, the way the title does: root arguments, setters, barriers, `DrawIndexedInstanced`, `Dispatch`, `ExecuteIndirect`. The title buffers sit in write-watched memory, the view heap is a shader-visible title heap, and the pipelines' translations read root views, root constants and a six-texture table, as the title's do. Each row is the best of 5 × 20,000 calls; lists are reset every 2,000 calls. ``` cargo test -p victory-gpu --release --lib list_bench -- --ignored --nocapture # from third_party/victory ``` - `VICTORY_LIST_BENCH_SCALING=1`: only the draw sequence (root CBV, 4 root constants, index buffer, indexed draw) on 1 and on 5 threads at once, each thread recording its own list, all reading the same six textures. - `VICTORY_LIST_BENCH_INDIRECT=1`: only `ExecuteIndirect` (one indexed draw, one dispatch) on 1 and 5 threads, each list's close timed with the calls. - `VICTORY_LIST_BENCH_PLACED=1`: the draws' textures are views the title places in its memory without a resource object (device 0x230), as its streamed textures are. The bench runs with the default settings, where each list call is translated inside the call. With the launcher's tuned set (`VICTORY_THIN=1`, `VICTORY_THIN_THREADS=8`) the title's call only writes its arguments down and the same translation (the same `draw::readable`, `indirect::bound`, ...) runs on our eight translating threads instead: what the bench times is that work, and the 5-thread rows are the closer case. It complements Vice-Tay's own `indirect::bench` (a frame of indirect draws, GPU side); this one times the CPU side per call. ## Changes - `pipeline/list_bench.rs` (new, test-only), one `mod` line in `pipeline.rs`. - `list::has_newer_table` (`#[cfg(all(test, windows))]`): which method table a list has, for the newer titles' slots. - `THIRD_PARTY.md`: one sentence after the Vice-Tay paragraph names KainanP/VIctory as the bench's source. Nothing outside tests changes. It is `#[ignore]`d and needs a card, so CI doesn't run it. The file is the combined-base port as it was: it builds and runs unchanged on Vice-Tay. ## Baseline on main (b6d86cf8) RTX 4060 Laptop GPU, Core i7-14650HX, Windows 11, release, median of 7 runs (9 for the indirect rows) interleaved with the builds of #443 and #444. Measured at a quiet moment: no game running, Windows reported 0–31 % CPU load around the runs (mostly under 16 %), so these sit well below the Neptune numbers measured under 20–30 % foreign load. | ns | main | |---|---:| | `DrawIndexedInstanced`, six textures, nothing changed | 1343 | | draw sequence, per draw, 1 thread / 5 threads | 1340 / 3267 | | the same with placed views, 1 / 5 threads | 1565 / 4315 | | `Dispatch`, nothing changed | 637 | | `ExecuteIndirect`, 1 dispatch with the list's close, 1 / 5 threads | 2445 / 3183 | | `ExecuteIndirect`, 1 indexed draw with the list's close, 1 / 5 threads | 2957 / 4089 | | `ResourceBarrier`, 1 texture transition | 289 | ## Tests `cargo test -p victory-gpu --release --lib` with this branch, one thread: RTX 4060 Laptop 421 passed, Intel UHD (a78b, `VICTORY_D3D12_ADAPTER=Intel`, which this base supports) 421 passed, WARP (`--features diagnostics`, `VICTORY_D3D12_WARP=1`) the same single failure as main (`timeline::report::tests::real_waits_are_recorded_with_who_ended_them`, unrelated). The bench itself also runs on the Intel UHD. Clippy on `victory-gpu --all-targets`, with and without `--features diagnostics`: only main's warning (`overlay.rs`, `is_multiple_of`). `cargo xtask policy`: ok. ruff: clean. ## Not measured A game frame. The bench gives the CPU cost per call; how many calls a frame makes, and how many threads translate at once, is the title's and the settings'. Please A/B the perf PRs in game. _AI use: Claude Code (Claude Opus 5.5) ported the benchmark, ran it and drafted this description._ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
An #[ignore]d test, pipeline::list_bench, that calls each list method
through the list's method table on the host device, the way the title's
render threads do: root arguments, setters, barriers, draws, dispatches
and ExecuteIndirect, with buffers in write-watched memory, a
shader-visible title view heap and pipelines whose translations read a
six-texture table, root views and root constants. Each row is the best
of 5 x 20,000 calls.

VICTORY_LIST_BENCH_SCALING=1 runs only the draw sequence on 1 and on 5
threads at once (each thread records its own list, all read the same
textures), VICTORY_LIST_BENCH_INDIRECT=1 only ExecuteIndirect on 1 and
5 threads with each list's close timed with the calls, and
VICTORY_LIST_BENCH_PLACED=1 makes the draws' textures views the title
places in its memory (device 0x230), as its streamed textures are.

cargo test -p victory-gpu --release --lib list_bench -- --ignored --nocapture

Not run in CI (ignored, needs a card). Adapted to this tree: list
method slots of newer titles (list::has_newer_table, test-only), the
translated-shader fields, its own write-watched pool.

Source: KainanP/VIctory perf/list-call-bench (427db00)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 18:56:39 +00:00
github-bot force-pushed github-bot/gh-441 from 24536942ad to 61cdc8fd4f 2026-11-26 20:24:48 +00:00 Compare
Author
Owner

@⁠KainanP on GitHub · 2026-11-26 20:21 UTC · original

Rebased onto the combined base (#409). The bench needed one change for this base's translated-shader fields, and its THIRD_PARTY.md row moved to the combined base's table. The description has new baseline numbers for main 37d4686, default and with anyxboxx run's tuned set. Suites on RTX/Intel/WARP give the same results as main, and clippy, policy and ruff are clean. #445 is closed (already in the base), and #443/#444 are re-ported.

AI use: Claude Code (Claude Opus 5.5).

**@⁠KainanP** on GitHub · 2026-11-26 20:21 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/441#issuecomment-7202587065) Rebased onto the combined base (#409). The bench needed one change for this base's translated-shader fields, and its `THIRD_PARTY.md` row moved to the combined base's table. The description has new baseline numbers for main 37d4686, default and with `anyxboxx run`'s tuned set. Suites on RTX/Intel/WARP give the same results as main, and clippy, policy and ruff are clean. #445 is closed (already in the base), and #443/#444 are re-ported. _AI use: Claude Code (Claude Opus 5.5)._
github-bot force-pushed github-bot/gh-441 from 61cdc8fd4f to b8f38364e8 2026-11-26 20:50:58 +00:00 Compare
Author
Owner

@⁠KainanP on GitHub · 2026-11-26 20:46 UTC · original

Main reverted #409 (#452), so this is back to the Neptune-base version measured in the original body, rebased onto 15024d5 (RTX: its tests pass, and the suite gives the same results as before). The combined-base port is kept on branch perf/list-call-bench-combined for when it returns.

AI use: Claude Code (Claude Opus 5.5).

**@⁠KainanP** on GitHub · 2026-11-26 20:46 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/441#issuecomment-7203052130) Main reverted #409 (#452), so this is back to the Neptune-base version measured in the original body, rebased onto 15024d5 (RTX: its tests pass, and the suite gives the same results as before). The combined-base port is kept on branch [`perf/list-call-bench-combined`](https://github.com/KainanP/AnyXboxX/tree/perf/list-call-bench-combined) for when it returns. _AI use: Claude Code (Claude Opus 5.5)._
github-bot force-pushed github-bot/gh-441 from b8f38364e8 to 1d88f8b018 2026-11-27 00:37:54 +00:00 Compare
Author
Owner

@⁠KainanP on GitHub · 2026-11-26 23:48 UTC · original

Re-ported onto the Vice-Tay base (#454): rebased onto b6d86cf8, the bench file builds and runs unchanged there (RTX and Intel UHD), and the description now has main's baseline on the new base, measured at a quiet moment (no game running). The Neptune version is kept on perf/list-call-bench-neptune. #445 is closed (the base already covers it).

AI use: Claude Code (Claude Opus 5.5).

**@⁠KainanP** on GitHub · 2026-11-26 23:48 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/441#issuecomment-7205879510) Re-ported onto the Vice-Tay base (#454): rebased onto b6d86cf8, the bench file builds and runs unchanged there (RTX and Intel UHD), and the description now has main's baseline on the new base, measured at a quiet moment (no game running). The Neptune version is kept on [`perf/list-call-bench-neptune`](https://github.com/KainanP/AnyXboxX/tree/perf/list-call-bench-neptune). #445 is closed (the base already covers it). _AI use: Claude Code (Claude Opus 5.5)._
Author
Owner

@⁠akimfomin on GitHub · 2026-11-27 00:09 UTC · original

Your three Vice-Tay ports can be combined on current AnyXboxX 5a08a33. I applied #441 1d88f8b, #443 946b2de, then #444 e6e7c9e using Git's merge-tree. No textual conflicts. The final tree is e880fcc0a27a4a6db1f43c7742d8f775a4f09235. That is a tree check; I did not compile or measure the combined candidate.

This gives a small next test for a second contributor: compare #441 alone with all three at the same base, same hardware and settings, using the synthetic list_bench fixture. For another rebase, hand PortBridge #98 and the PR/target pair to your agent. A link to the result there makes the exact base and run reusable by the VIctory forks. AI-assisted Git check.

**@⁠akimfomin** on GitHub · 2026-11-27 00:09 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/441#issuecomment-7206222409) Your three Vice-Tay ports can be combined on current [AnyXboxX `5a08a33`](https://github.com/LooperSalty/AnyXboxX/commit/5a08a334ef216eff98d2c7d9a9166f94c9ef70ed). I applied `#441 1d88f8b`, `#443 946b2de`, then `#444 e6e7c9e` using Git's merge-tree. No textual conflicts. The final tree is `e880fcc0a27a4a6db1f43c7742d8f775a4f09235`. That is a tree check; I did not compile or measure the combined candidate. This gives a small next test for a second contributor: compare #441 alone with all three at the same base, same hardware and settings, using the synthetic [`list_bench` fixture](https://github.com/LooperSalty/AnyXboxX/blob/1d88f8b01801edec1c12cd8dd66fd76c89f75a2f/third_party/victory/crates/victory-gpu/src/pipeline/list_bench.rs). For another rebase, hand [PortBridge #98](https://github.com/akimfomin/PortBridge/issues/98) and the PR/target pair to your agent. A link to the result there makes the exact base and run reusable by the VIctory forks. AI-assisted Git check.
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/441/head:github-bot/gh-441'
git switch 'github-bot/gh-441'

Merge

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