Repository navigation
Conversation
|
Overlaps with #440: both deduplicate Both were verified separately on Arch Linux x86_64, Windows MSVC release build under Wine 11.22 (
The difference is where the state lives: this PR dedupes in |
mercuryVM
left a comment
There was a problem hiding this comment.
Tested 657efd8 on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (265 passed, 0 failed).
I checked that dropping the repeated flush() + writing() keeps behaviour the same:
- For a range already declared,
Shadow::writingalready returned early. The merged snapshot range equals the existing one, so the snapshot was never retaken. The only effects of a repeat were an extrapendingentry and an extra refresh flush. - Refreshes queued between two declarations are still flushed by the next
title_written()step or by the batch flush before the lists run. The copy-back compare (host != old && t != h) gives the same result whichever flush applied them. - Copy-back now walks
batch.gpu_writesin declaration order with the same per-shadow, address and length dedup the removed loop did. It also covers lists named twice in one submission, since the batch spans the whole submission.
No issues found. I cannot reproduce the CPU-copy timings without a game package here.
AI-assisted (Claude Code).
…tions within a submission Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Automated triage for the maintainers. Needs rebase. This PR does not merge cleanly into current The content has not been reviewed yet; it will be once the branch is rebased onto Generated by Claude Code |
|
Triage verdict — Narrow the scope and rebase ( Evidence
Checks and limits
Next step
This verification was AI-assisted. |
What changed
World passes declare the same writable shadow-buffer ranges repeatedly. Each repeat used to flush the accumulated refreshes, even after the first declaration had taken the pre-submit snapshot and marked that exact range pending. Store the first declaration per shadow, address and length in the submission batch. Use that same ordered list for copy-back after the fence, replacing the second pass over the deferred command steps.
Verification
cargo test --locked -p victory-gpu --features diagnostics -- --test-threads=1passed 46 tests with one existing benchmark ignored. The added test covers repeated declarations, overlapping ranges, distinct shadows, and submission boundaries.cargo xtask policypassed. The PR contains only source and a synthetic test. AI-assisted (Codex).