Repository navigation
Conversation
|
I found a second ordering case after the sync-list snapshot at The follow-up stores the filling submission's existing The new regression forces the first reservation to fail and the second to allocate a real D3D12 buffer. It failed on this PR head because the earlier submission could see that buffer. It passed with the patch on an RTX 4060 and WARP. The focused diagnostics suite passed 15 tests. This is a synthetic allocation-order test. |
|
@tyr0nsur I carried your |
…h copy's before hashes once (port of Biskwit/VIctory-reloaded 4d3eae2)
Preserve EXEC masks across loop joins, including the light atlas used in 24/7 interiors. Include the shader regression cases from trustno1-coder#2853 and trustno1-coder#3871. Enable split submission in the two Foxhound launchers (trustno1-coder#3809). Snapshot the hash buffers before the sender records work (trustno1-coder#3881), including allocation failures affecting declared and probed ranges. Port the incremental resource sweep and empty-pass backoff from trustno1-coder#3858. Preserve manual flush behavior and include coverage for sweep progression and eviction.
…hes once (VICTORY_SUBMIT_SPLIT race) Conflicts: our own-memory split (own_until) gets befores[..own_until]; the direct loop keeps its index; the hash loop takes the one answer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With VICTORY_SUBMIT_SPLIT=1 the next submission's card_take can make a copy's "before" hash buffer (Card::before, a lock-free OnceLock) while card_record records the sync list of the one before it. card_record asked for that buffer separately for the sends' transitions (send::Own::record), for the fallback path's transition to a read state and for the hash passes, so a pass could be recorded over a copy still in COPY_DEST or UNORDERED_ACCESS with no barrier to a read state. The buffers are now looked at once, right after the sync list is taken, and that one answer goes to the sends, the transitions and the hash passes. A copy whose buffer appears later is hashed whole by the take that made it, which is behind this list on the queue. The compare lists recorded later in card_record are unchanged. Port of Biskwit/VIctory-reloaded 4d3eae2 (GPL-3.0-or-later). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When an earlier allocation fails, let that submission retain its conservative copy-back even if the split prepare thread has published a later buffer. Gate both sync and compare passes on the number of the first whole fill. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
a36da0b to
59c79f3
Compare
|
Thanks @tyr0nsur. I reviewed it and pulled your commit in as it is, with your authorship kept (59c79f3 after the rebase). The numbering holds: with the relay on, both take paths number from I also rebased the branch onto c71899d, since main had moved.
Thanks also @akimfomin for running the regression on the Lab branch. |
Fixes #
What it changes
With
VICTORY_SUBMIT_SPLIT=1, one thread prepares the next submission while the sending thread records and sends the one before it. The preparing side'scard_takemakes a copy's "before" hash buffer (Shadow::card_make_before;Card::beforeis a lock-freeOnceLock) withoutCARD_WORK, as the comment at its call site says. The sending thread holdsCARD_WORKwhile it records. (The comment insidecard_make_before, "the sole current caller already holdsCARD_WORK", is out of date.)card_recordasked whether a copy has its "before" buffer several times while recording one sync list:send::Own::record,card_has_before());COPY_DESTtoNON_PIXEL_SHADER_RESOURCE;card_before_gpu()).If the other thread makes the buffer between those reads, the first read says "none", so no barrier to a read state is recorded. A later read says "there", so a hash pass is recorded over a copy still in
COPY_DESTorUNORDERED_ACCESS.This change looks at each copy's buffer once, right after the sync list is taken (
befores), and gives that one answer to the sends, the transitions and the hash passes. A copy whose buffer appears later is hashed whole by the take that made it, which is behind this list on the queue.send::Own::recordtakes the answers as a newbeforesparameter. The compare lists recorded later incard_record(fromdeclaredandlooked) are not changed.This is a port of Biskwit/VIctory-reloaded 4d3eae2 (GPL-3.0-or-later, like this repository), adapted to main. We found the race by reading the code. We have not caught it in a log.
Why now: #3809 turns
VICTORY_SUBMIT_SPLIT=1on by default, and then this window exists in every run. With the split off, both sides run on one thread and nothing changes.How it was tested
VICTORY_SUBMIT_SPLIT=1.Vec<Option<u64>>per sync list. We did not A/B it for fps.cargo testpassed for the crates it touches:cargo test --release --locked -p victory-gpu --lib -- --test-threads=1on this branch: 921 passed, 1 failed. On unchanged main 41adb55 the result is identical: the same 921 passed and the same 1 failed.shader_cache::tests::every_switch_of_the_translator_is_in_the_key, which reports "VICTORY_SCALAR_SPLITS is not read by the translator any more".card_steps,menu,pool,resource). Each passes alone; see card_steps: the two "late" tests forget what an earlier one learned of their pages (order-dependent failure) #3668.cargo check --release --locked -p victory: passes.Checked for overlap
card_before/card_record/send::take. It touches the same functions, and this change is small enough to rebase either way.AI use: Claude Code (Claude Opus 5.5) prepared this branch, ran the tests and wrote this text. Posted with the account owner's approval.