Repository navigation
Conversation
…e and declares it written, whichever list numbered it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
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.