Diagnostics: the card's time by kind of list in ordinary runs (VICTORY_LIST_STAMPS=1), and what declares the widest shader writes (VICTORY_WRITE_DECLARERS=1) #453
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!453
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-453"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Jesper-Andersson on GitHub · 2026-11-27 10:30 UTC · original
Jesper-Andersson:list-stamps→main· +516 −0 · 3 files · 1 commits · openRefs #221.
The timing run from #106 (
VICTORY_GPU_TIMING) sends each list of a submission on its own and waits for it, with the relay off. Each list costs oneExecuteCommandListscall plus a CPU wake, about 45 us (13.5 ms a frame over 294 lists here), and nothing overlaps. Its sums by kind of list are therefore not those of the frames we play, and that run overstated our own share of the card's time. This adds a way to get the same split in an ordinary run. It also adds a line that names what declares the widest shader-write ranges, which the compare after each submission hashes whole.Change
VICTORY_LIST_STAMPS=1(diagnostics builds only, off by default),crates/victory-gpu/src/host/liststamps.rs. For a submission sent ahead, a timestamp list goes ahead of each run of lists of one kind (a prelude, the title's list, our steps on the card, the compare) and one goes behind the last. They go inside the sameExecuteCommandListscalls the lists always use, andmoved()keeps a run's stamp with it across the cuts atparts. The frame-rate line gets "the card's time by kind of list, as the lists ordinarily go": preludes, the title's lists, steps on the card, compares, others of ours. It also gives the time between submissions: our sends up to copies in the card's memory, a present's lists, and the card standing. The stamp lists come from a ring of 4,096 prebuilt lists (one query heap, one readback buffer), and a slot is handed out again only after its fence. When the ring is full the submission is left out and counted on the line, so it is never stalled. A missing or backward stamp makes that submission's stamps "unread" (counted, not summed).VICTORY_WRITE_DECLARERS=1(diagnostics builds only, off by default; off, a declaration costs one flag load).host::declared_byis called next towide_writefromdraw::readable(views in tables;draw.rsnotes the stage's shader in a thread-local while its tables are walked) and fromState::root_uav's write path (root views, by pipeline). At each frame-rate line,declarers_linegives the widest declared ranges since the last line. For each range it lists its declarers (a view in a table of shader<hash>, or a root view of pipeline<hashes>), how often a frame, and whether those shaders can store to buffers at all and by raw address. Only declarations of 1 MB or more are counted, as forwide_write.Where it does nothing
latefalse) get no stamps.Measured
From a local branch (main plus about 50 PRs, not
main), RTX 2070 SUPER 8 GB (driver 621.14), Ryzen 7 5800X, 32 GB, Windows 11, diag build, Series S + DLSS, in the world:VICTORY_LIST_STAMPS=1The
VICTORY_GPU_TIMINGrun on the same build costs about 13.5 ms a frame by itself and put our own lists at about 48 ms. With stamps, our own lists (compares, preludes and steps) come to about 6 ms. The declarer line showed that the widest range is the title's 174 MB heap buffer, compared whole twice a frame, and that it is declared by table views of two shaders. Root views don't declare it. That points any narrowing at the table-view path (draw::readable).Checks
cargo test -p victory-gpu --lib --locked --features diagnostics -- liststamps declarers_tests: 6 passed (6 new:a_stamp_goes_ahead_of_each_run_and_behind_the_last,a_runs_first_moves_to_its_stamp,runs_get_the_ticks_up_to_the_next_stamp,a_missing_or_backward_stamp_is_not_read,the_widest_range_comes_first_with_its_most_frequent_declarer,narrow_declarations_are_not_kept)cargo clippy -p victory-gpu --all-targets --locked --features diagnostics: no warnings in changed code (6 warnings already on main:texture.rs,host/panel.rs,host/place.rs,host/rtstamps.rsx2,watch.rs)cargo xtask policy: 3 files okNot checked
GetTimestampFrequency), so the numbers should carry over.VICTORY_LIST_STAMPS=1andVICTORY_GPU_TIMINGtogether: the stamps go only into submissions sent ahead.Related
VICTORY_GPU_TIMING). This gives the same split without the timing run's per-list sends and waits. It reuses #106'scopystat::Timedkinds and themarksit records.written_root_uavs).This change was made with AI assistance (Claude Code).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.