replay: defer clamp scratch copy until split transition completes #9
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!9
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-9"
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?
@battledogegames-design on GitHub · 2026-11-25 23:15 UTC · original
battledogegames-design:replay/defer-split-clamp-copy→main· +98 −29 · 2 files · 1 commits · merged 2026-11-26 08:17 UTCThe clamp-capture pass in
--skip-clampsuses a transition toINDIRECT_ARGUMENTas the signal to copy scratch into the replay results buffer. A split barrier carries that destination state on both halves. The editor consequently inserted transitions and aCopyBufferafterBEGIN_ONLY, while D3D12 still prohibits access to the resource.Capture after an ordinary transition or the completing
END_ONLY. Insert the copy immediately after that barrier, before any remaining barriers in the same call can change the state again. If a list cannot capture every requested clamp, return an error before replay consumes the results. The caller change propagates that error.The synthetic regression covers a begin-only prefix, an unrelated resource transition, a pipeline bind, completion, and a second scratch transition in the same barrier call. It checks the exact command order and one copy. Existing unsplit coverage passes.
Validation on Windows, Rust 1.98.1, base
0a43566Commands below ran in an isolated Cargo harness compiling the pinned editor and wire modules, using separate clean directories for baseline and corrected builds.
cargo test --locked clamp_copy_waits_for_the_end— original editor failed on the unexpected copy. Corrected regression passed.cargo test --locked— all 8 editor and wire tests passed.cargo build --lockedandcargo clippy --locked --all-targets -- -D warnings— passed.cargo check --offlinein a separate harness compiled the entire replay module, including the changed caller, against real Windows bindings and compile-only stand-ins for the external GPU/PNG services.cargo test --locked -p victory-gpu --features diagnostics --lib replay::stopped before compilation because the registry hostname could not resolve for lockedzlib-rs 0.6.8.Thanks to tatazildo for the NVIDIA validation in #3 that prompted this review. This change covers capture completed within a command list. Cross-list capture, actual frame replay and physical GPU behavior were not validated. The relationship to debug-layer messages 538, 1003 and 527 remains unproven. #5 separately addresses the replay fixture.
@gomeaw on GitHub · 2026-11-25 23:23 UTC · original · reviewed
Independent validation of
3bb5980in the target workspace on Windows x64, Rust 1.98.1.BEGIN_ONLYandEND_ONLYbarriers for the clamp scratch buffer. An argument-buffer transition sits between them. With the PR applied, the WARP replay with--skip-clampspassed the byte-for-byte image and buffer checks.replay/edit.rsandreplay/play.rsto0a43566made the same frame fail--skip-clampswith D3D12 IDs 534 and 535. The debug layer saw a full barrier while the split transition was pending.This reproduces the split-barrier issue independently of the fixture errors fixed by #5. The existing
--one-submitID 527 still appears in its own experiment.Windows comparison
AI-assisted with Codex. All inputs are synthetic.
@avatarmanz on GitHub · 2026-11-26 07:55 UTC · original
Merged into main in the next push (tests pass); thanks.