Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2009"
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?
Imported from Marvisak/VIctory. Originally posted by tharun-37 on 2026-11-25T02:51:51Z.
Split from #2000 per review feedback (gpu-only, Windows path). #721: copy_back now writes only changed bytes. #722: page marked current only if title still matches. Builds clean; shadow tests pass.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T03:33:12Z.
Review: COMMENTED
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Copy-back writes only changed bytes + pages marked current (#721/#722) — part of a three-way split of #2000 (which fixed #721/#722/#726 in one PR): #2009 covers copy-back, #2010 covers #726's v_med3 NaN fix (shader, macOS-tested separately). Maintainer should compare #2000 vs #2009+#2010 and pick.
Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-25T03:20:47Z.
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at
57fdaea.victory-gpu: 141 passed, 2 failed, 2 ignored. This PR adds no test of its own for #721 / #722, so this only shows the existing tests still pass. The 2 are #1744's NVIDIA failures onmain(dynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_views, the heap-cap ones). Same asmainon this hardware. Not run: a title.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-25T03:08:05Z.
Triage verdict — Needs changes (
57fdaea)Evidence
57fdaeaaddresses the right invariant for #721. For #722, I would keep the PR in review until the final compare is tied to the page’s watch state.copy_backre-reads title bytes and compares them with the host copy, then separately callsTracked::taken, which protects the page and clears its dirty entry. From the code, a title write between the compare and that clear can leave a stale copy marked current.Checks and limits
Next step
write_mappedcall per changed run, so a passing dense or small test does not bound that cost. Prior sparse-write discussionThis verification was AI-assisted.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T09:17:01Z.
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main(conflicts incrates/victory-gpu/src/shadow.rsandcrates/victory-gpu/src/watch.rs). It will be reviewed again once it is rebased.From the earlier needs-work note, still open: regression tests in the PR for the #722 race and for #721, a bound or measurement for the per-run
write_mappedcost, and the overlap with #1024.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by ajsem1337 on 2026-11-25T10:48:27Z.
Deterministic reproduction of the guarded copy-back race
Following up on the race identified in review, a test simulates a GPU write by changing the host copy. During guarded snapshot copy-back, a test hook makes a second thread write to the tracked title page just before
Tracked::taken.main(940d32f)mainwith #2009 (57fdaea)Three seeds on main and two on the PR gave the same result. The other eight cases met their visibility deadlines on both builds.
On #2009 the write lands after the final comparison and before the page is re-protected. That write is marked as already copied. Marking the page current requires validating its bytes after re-protection and preserving later writes, including writes through aliases. Prior review · Related earlier report
Reproducer (test, test-only hook, and the one-line assertion change for this PR): https://gist.github.com/ajsem1337/551639fa596a63f63282956d42917b0c
Found with AI assistance (Codex wrote the original test, Claude Code ported it to
mainand ran it).Imported from Marvisak/VIctory. Originally posted by ajsem1337 on 2026-11-25T11:55:32Z.
Re-ran the reproducer from the gist on
b9ecb1e: theBeforeTakencase now passes for all three seeds (3913, 77, 1234567). The write made just beforeTracked::takenreaches the host copy one submission later (lost: 0, deferred: 32, waslost: 32onmainand on57fdaea), and the whole test passes.Limits: the gist's 0001 no longer applies to the changed
taken, so I put the sameBEFORE_TAKENhook in by hand at the same place (top oftaken, beforeguards()), plus 0002. The test covers that window only, not a write landing inside the guarded section, and it ran under Proton on an RX 7900 GRE, not on Windows.Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-25T16:26:25Z.
Independent GPU validation for PR #2009 (Windows, Rust 1.100.0/MSVC, head
b9ecb1e, no game data):cargo test --locked -p victory-gpu --lib shadow::testswithVICTORY_D3D12_WARP=0on RTX 5060 Laptop (driver 621.24) -> 4 tests passed (title_writes_under_a_busy_range_are_copied,snapshots_cover_the_declared_ranges_and_writes_go_back_once,marked_pages_go_back_by_the_bytes_the_gpu_changed,mark_runs_are_reused_and_joined), 141 filtered, exit 0; withVICTORY_D3D12_WARP=1 --features diagnostics(WARP) -> same 4 tests passed, 144 filtered, exit 0. Explicit adapter selection used because the hybrid laptop may default to the 780M iGPU. No real title or game data used. AI-assisted (Hy4 flash). GPU/driver: RTX 5060 Laptop, driver 621.24, Vulkan 1.4.357 (WARP second data point).Imported from Marvisak/VIctory. Originally posted by tharun-37 on 2026-11-26T03:26:31Z.
Closing to re-scope: taking on better-scoped issues instead.
Pull request closed