GPU: each list takes every copy of title memory by address, whichever list numbered it #370
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!370
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-370"
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?
@joroyt on GitHub · 2026-11-25 00:01 UTC · original
joroyt:memory-copies-per-list→main· +22 −12 · 1 files · 1 commits · openWhat
memory::readybrought the numbered copies up to date, and declared them written, once per list: at the list's first dispatch of a shader that reads title memory by address (first_read), at its first one that can store (first_write), and for the copies that very call numbered. A copy numbered in between by another list was left out of both. The module said so as a shortcut for the read side ("a copy another list numbers meanwhile is brought up to date by that list's submission, which may run after this one's").The title records its lists on several threads, and a shader finds a copy through the directory whichever list numbered it. So a list could:
Change (
crates/victory-gpu/src/memory.rs, +24/-12)Each list takes each copy once, for reading and for writing, kept per list with the keys
first_usealready has. Copies are only ever added, so a list walks them from the last one down and stops at the first it has taken: the cost per dispatch is one lookup plus the new copies, as before.Measured
RTX 5070 12 GB (32-lane waves, driver 32.0.16.2124), i9-14900KF, Windows 11, diag build, Series X profile.
With
VICTORY_BVH_BUILDER=1(on2119b0e+ #156, which the builder needs on a 32-lane card, + #115), a local counter of the copies the old conditions would have skipped: 16 dispatches in the first two seconds of the structure builder found copies another list had numbered: 210 copies not brought up to date and 210 not declared written in all (1 to 9 a dispatch, and one dispatch with 146); in 13 of the 16 the list stores. One run; the counter is not part of this change.Without the builder (this branch as it is, 423 s, into the world): no exception, 376-395 ms per frame at the end with 4,860 draws, against about 392 ms (
2119b0e) and 357 ms (2119b0e+ #156) in the same scene in two runs earlier the same evening. The runs are not a clean A/B (different lengths, the shader cache refilled after each rebuild), so read that as "no visible cost", not as a number.Checks:
cargo clippy --workspace --all-targets --locked -- -D warnings, the same with--all-features, andcargo test --workspace --locked(496 passed, 0 failed, 7 ignored), all on this branch.What this does not do
Not tested
VICTORY_RELAY,VICTORY_LATE_WAIT.AI use: found, written and measured with Claude (Anthropic) running in OpenCode on my machine, with my own copy of the title. No game data attached; counts and log lines only.
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.