xmem: tell the GPU side of an unmapped view after unmapping it, not before #1005
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!1005
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1005"
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?
@SpaghettiMaster545 on GitHub · 2026-11-25 15:40 UTC · original
SpaghettiMaster545:pr/unmap-then-tell→main· +3 −1 · 1 files · 1 commits · openWhat was wrong
xmem::unmaptoldvictory_gputhat a view's memory had changed (title_memory_remapped) before it unmapped the view. A GPU copy refreshing that range in between could guard the blocks that were still mapped and note them clean. Once the view was gone they stayed clean, so copies kept the view's old bytes until something was mapped there again.How it shows in game
Buffers and textures in physical-page memory that the title unmaps and later reads (zeros, or whatever it maps there next) can keep showing their old contents on the card.
What the change does
The GPU side is told once the view is unmapped. That clears the stale guard state, and the next refresh takes the memory as it now is: its blocks known unmapped, their zeros copied once. The
shownbookkeeping is unchanged.How it was tested
cargo test --locked -p victory-hle --libpasses (98 passed).cargo clippy -p victory-hle --no-deps --all-targets --locked -- -D warningsis clean. Without--no-deps, clippy stops on the errorsmainalready has invictory-gpu.Developed with AI assistance (Claude Code).
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.