Title memory: a texture refresh waits only for remaps of its own memory (VICTORY_REMAP_SPANS; from mandy) #544

Open
github-bot wants to merge 1 commit from github-bot/gh-544 into main AGit
Owner

@⁠voiceovarian1-max on GitHub · 2026-12-03 09:43 UTC · original
voiceovarian1-max:port-remap-spans → main · +303 −15 · 4 files · 1 commits · open

A texture refresh that reads title memory in place waited for every change of mapping of the
title's memory, wherever it was. Now each change declares the spans it may take away (each page
and the whole view it lies in, xmem.rs views_of / changing_pages), and a read waits only for a
change that touches its own range (watch.rs title_memory_reading_range). On by default;
VICTORY_REMAP_SPANS=0 waits for every change, as before.

Ported from ProjectLeonida/mandy 8f54f8371 (NotRexed, LEONIDA_REMAP_SPANS), GPL-3.0-or-later.
mandy measured it with 4 s phases walking and turning: median frame -1.3 ms (+-1.4) of 87 ms.

Tests (watch.rs): a named read and a change of its memory wait for each other; only what
touches waits; declared spans are joined.

What is in it

  • crates/victory-gpu/src/lib.rs | 4 +-
  • crates/victory-gpu/src/texture.rs | 13 +-
  • crates/victory-gpu/src/watch.rs | 231 ++++++++++++++++++++++++++++++++-
  • crates/victory-hle/src/modules/xmem.rs | 70 +++++++++-

Tested

  • cargo check --workspace --tests --locked on main 7dbcdcb: no errors, no warnings.
  • In the game: only together with the other ports from mandy, in one combined build (results to follow here before this leaves draft).

Not tested

  • This change on its own in the game; AMD and Intel cards; the Series X profile.

AI use

Claude Code with Claude Opus 5.5 ported this from mandy, resolved its conflicts with this tree and wrote this description.

🤖 Generated with Claude Code

**@⁠voiceovarian1-max** on GitHub · 2026-12-03 09:43 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/544) `voiceovarian1-max:port-remap-spans` → `main` · +303 −15 · 4 files · 1 commits · open A texture refresh that reads title memory in place waited for every change of mapping of the title's memory, wherever it was. Now each change declares the spans it may take away (each page and the whole view it lies in, xmem.rs views_of / changing_pages), and a read waits only for a change that touches its own range (watch.rs title_memory_reading_range). On by default; VICTORY_REMAP_SPANS=0 waits for every change, as before. Ported from ProjectLeonida/mandy 8f54f8371 (NotRexed, LEONIDA_REMAP_SPANS), GPL-3.0-or-later. mandy measured it with 4 s phases walking and turning: median frame -1.3 ms (+-1.4) of 87 ms. Tests (watch.rs): a named read and a change of its memory wait for each other; only what touches waits; declared spans are joined. **What is in it** - `crates/victory-gpu/src/lib.rs` | 4 +- - `crates/victory-gpu/src/texture.rs` | 13 +- - `crates/victory-gpu/src/watch.rs` | 231 ++++++++++++++++++++++++++++++++- - `crates/victory-hle/src/modules/xmem.rs` | 70 +++++++++- **Tested** - `cargo check --workspace --tests --locked` on `main` 7dbcdcb: no errors, no warnings. - In the game: only together with the other ports from mandy, in one combined build (results to follow here before this leaves draft). **Not tested** - This change on its own in the game; AMD and Intel cards; the Series X profile. **AI use** Claude Code with Claude Opus 5.5 ported this from mandy, resolved its conflicts with this tree and wrote this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A texture refresh that reads title memory in place waited for every change of mapping of the
title's memory, wherever it was. Now each change declares the spans it may take away (each page
and the whole view it lies in, xmem.rs views_of / changing_pages), and a read waits only for a
change that touches its own range (watch.rs title_memory_reading_range). On by default;
VICTORY_REMAP_SPANS=0 waits for every change, as before.

Ported from ProjectLeonida/mandy 8f54f8371 (NotRexed, LEONIDA_REMAP_SPANS), GPL-3.0-or-later.
mandy measured it with 4 s phases walking and turning: median frame -1.3 ms (+-1.4) of 87 ms.

Tests (watch.rs): a named read and a change of its memory wait for each other; only what
touches waits; declared spans are joined.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 09:46:04 +00:00
Author
Owner

@⁠voiceovarian1-max on GitHub · 2026-12-03 10:04 UTC · original

Combined test of this PR with #521, #543 and #544-#556, all merged onto main 7dbcdcb (branch fox-all of voiceovarian1-max/foxhound):

  • RTX 4070 Ti 12 GB (driver 617.14), i7-14700K, 32 GB, Windows 11 Pro 26300; release.
  • cargo test --workspace --locked -- --test-threads=4: 1,415 passed, 0 failed, 50 ignored (29 binaries), no SKIPPED.
  • Retail title, Series S profile, DLSS Balanced, 60 fps limit, keys pressed by the layer only (VICTORY_KEYS, no input from the PC): window scene 38-42 fps against 34-37 for main on the same boot; no device removal, no crash; a burst of 67 pictures showed no one-picture flicker of the character's clothes.
  • Not tested: each PR alone in the game; AMD and Intel; the Series X profile; long play.

Tested by Claude Code with Claude Opus 5.5 on the hardware named.

**@⁠voiceovarian1-max** on GitHub · 2026-12-03 10:04 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/544#issuecomment-7374687881) Combined test of this PR with #521, #543 and #544-#556, all merged onto `main` 7dbcdcb (branch fox-all of voiceovarian1-max/foxhound): - RTX 4070 Ti 12 GB (driver 617.14), i7-14700K, 32 GB, Windows 11 Pro 26300; release. - `cargo test --workspace --locked -- --test-threads=4`: 1,415 passed, 0 failed, 50 ignored (29 binaries), no `SKIPPED`. - Retail title, Series S profile, DLSS Balanced, 60 fps limit, keys pressed by the layer only (`VICTORY_KEYS`, no input from the PC): window scene 38-42 fps against 34-37 for `main` on the same boot; no device removal, no crash; a burst of 67 pictures showed no one-picture flicker of the character's clothes. - Not tested: each PR alone in the game; AMD and Intel; the Series X profile; long play. Tested by Claude Code with Claude Opus 5.5 on the hardware named.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/lib.rs
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.
git fetch -u origin '+refs/pull/544/head:github-bot/gh-544'
git switch 'github-bot/gh-544'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-544'
git switch 'github-bot/gh-544'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-544'
git switch 'github-bot/gh-544'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-544'
git switch 'main'
git merge --squash 'github-bot/gh-544'
git switch 'main'
git merge --ff-only 'github-bot/gh-544'
git switch 'main'
git merge 'github-bot/gh-544'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.