Fix #2503: tell GPU write watch before DirectStorage page writes #3061
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3063"
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-26T05:57:43Z.
Fix #2503: tell GPU write watch before DirectStorage page writes
write_physical and PageWindow called kernel_will_write (watch::writing) after writing through our own views. The watch must be told before the write so it saves the page's original bytes and keeps the guarded blocks open during the write.
Now report_written returns Writing guards that stay alive during the write, write_physical reports current views after the write, and PageWindow holds pre-write guards until dropped and reports views currently showing the pages on drop.
Fixes #2503.
Supersedes closed PR #3037 (same fix, rebased on clean upstream/main with unrelated aliases changes removed, and with the pre-write + post-write view reporting both included per reviewer feedback).
Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T06:09:18Z.
Review: APPROVED
Tested locally merged onto
origin/main(63bcca4) on Windows 11 x64:KernelWritewrite-watch guards open acrosswrite_physicalandPageWindow(obtained before writing and dropped after the write completes, while still reporting post-write views in case the title remapped a page during the write) cleanly fixes #2503 so DirectStorage page writes do not fault on guarded pages.cargo test -p victory-hle xmem: 14 passed, 0 failed (includingpage_windows_report_where_the_pages_show_when_done).cargo clippy -p victory-hle --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-26T06:32:43Z.
Review: APPROVED
Verified: report_written now returns the KernelWrite guards so they live across the write (the watch must be told before, not after, so it saves pre-write bytes and keeps guarded blocks open); write_physical also reports at post-write views to cover a remap mid-write; PageWindow holds guards for its lifetime and reports at current views on drop. Clean final iteration of the #2503 fix.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T06:17:31Z.
Automated triage for the maintainers.
Proposed close: duplicate of #2504. The head has not changed. Passing CI and approvals from other contributors don't change the comparison. #2504 fixes the same issue (#2503) the same way in
crates/victory-hle/src/modules/xmem.rs(report_written,write_physical,PageWindow). It is still open and merges cleanly. It also has a regression test with real write-watch trackers, and this PR has none, so reverting the ordering here would still pass the suite. Thanks for removing the attribution from the description.This PR will be closed in 48 hours unless the author pushes a change, or a maintainer removes the label
triage: proposed close. Anything #2504 is missing is best raised as a review comment there.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by tharun-37 on 2026-11-26T06:18:26Z.
Removed the decompiled-code attribution from the description per the asset policy.
This PR is CI-passing and APPROVED by Dukestar69 (14 xmem tests pass, clippy clean, xtask policy ok). It fixes #2503 — DirectStorage page writes through our own views were not seen by the GPU write watch because kernel_will_write was called after the write instead of before. Now pre-write guards stay open during the write, and post-write reporting covers views the title remapped mid-write.
Imported from Marvisak/VIctory. Originally posted by tharun-37 on 2026-11-26T09:58:59Z.
Closing to focus on new issues
Pull request closed