HLE/GPU: invalidate write trackers on 32-bit XMem allocation release and reuse #2822
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2824"
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 VlREX on 2026-11-25T21:32:21Z.
Summary
Notify GPU write trackers when 32-bit XMem allocations
are released and reused. Complementary to #2612.
Reproduced failure
new allocation was invisible: clean=true, taken=[]
Native verification
Ryzen 5 3600X / RX 5700 XT / Windows 10
Rust 1.98.1
Baseline:
13f91caTested head:
88c5ea1Remaining: full XMem integration regression,
workspace/HLE results and concurrent copy-back review.
No gameplay or FPS claims.
AI-assisted development (ChatGPT).
Native verification by VlREX.
Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T21:57:27Z.
Review: COMMENTED
Correct: VirtualQuery walks the allocation across split guard regions, fails closed on overflow or non-advancing regions, and the guard lock is held across VirtualFree + retain so no concurrent writing() can VirtualProtect a page another allocator may already have reused. remapped() drops both alias directions. LGTM.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T22:41:08Z.
Verified
88c5ea1dmerged ontomain(f3578e3) on Windows 11:watch::tests::release_and_reuse_marks_the_whole_title_allocation(--ignored --exact): 1/1 passed.watch::tests: 15/15 passed (1 ignored);victory-hlemodules::xmem::tests: 12/12 passed.cargo clippy --locked -p victory-gpu -p victory-hle --all-targets -- -D warnings(default &victory-gpu/diagnostics): 0 warnings;cargo xtask policy:190 files ok.release_title_allocation: walkingVirtualQuery(AllocationBase == address && Type == MEM_PRIVATE) captures multi-protection regions split byPAGE_GUARDwhile rejecting interior pointers; performingVirtualFree(MEM_RELEASE)insideguards()before clearingg.protectedand callingremapped()avoids callingVirtualProtecton freed/reused VA space and clearschanged/armed/alias_ofatomically without lock-order issues.Looks clean and ready to merge.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.