Skip to content

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

Open
KainanP wants to merge 1 commit into
LooperSalty:mainfrom
KainanP:perf/list-call-bench
Open

KainanP wants to merge 1 commit into
LooperSalty:mainfrom
KainanP:perf/list-call-bench

Conversation

@KainanP

@KainanP KainanP commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Re-ported onto the Vice-Tay base (#454), rebased onto main b6d86cf; 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 (b6d86cf)

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

KainanP commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

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
KainanP force-pushed the perf/list-call-bench branch from 61cdc8f to b8f3836 Compare November 26, 2026 20:45
@KainanP

KainanP commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

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).

…st bench)

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 <noreply@anthropic.com>
@KainanP
KainanP force-pushed the perf/list-call-bench branch from b8f3836 to 1d88f8b Compare November 26, 2026 23:47
@KainanP

KainanP commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Re-ported onto the Vice-Tay base (#454): rebased onto b6d86cf, 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).

Copy link
Copy Markdown
Contributor

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants