GPU: skip CPU BLAKE3 texture hashing via xmem dirty-generation digests (VICTORY_TEXTURE_DIRTY_GEN=1) #1016

Open
HailLucifer666 wants to merge 6 commits from upstream-pr/1018 into main
HailLucifer666 commented 2026-11-25 16:21:43 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by HailLucifer666 on 2026-11-25T16:21:43Z.


Stacked on #231 -> #872: merge after #872.

Adds opt-in (VICTORY_TEXTURE_DIRTY_GEN=1, off by default) dirty-generation digest skipping in exture.rs using xmem::va_generation_digest via ictory_gpu::set_page_gen_oracle, plus VICTORY_TEXTURE_HASH_ORACLE=1 to detect any uncounted writes.

Verification

  • cargo test -p victory-gpu texture:: --locked -> 3 passed, 0 failed (dirty_gen_skips_rehash_when_digest_unchanged_and_detiles_when_bumped).
  • cargo test -p victory-hle xmem:: --locked -> 23 passed, 0 failed ( a_generation_digest_tracks_mapped_views_and_rejects_gaps).
  • cargo check -p victory --locked -> pass.
  • /kee mutation probe: ignoring last.gen_digest == Some(digest) fails dirty_gen_skips_rehash_when_digest_unchanged_and_detiles_when_bumped; restored byte-identical.
<!-- greyfinch-sync:fxceless/victory-fork:issue:6608781953 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1018). Originally posted by [HailLucifer666](https://github.com/HailLucifer666) on 2026-11-25T16:21:43Z. --- **Stacked on #231 -> #872: merge after #872.** Adds opt-in (VICTORY_TEXTURE_DIRTY_GEN=1, off by default) dirty-generation digest skipping in exture.rs using xmem::va_generation_digest via ictory_gpu::set_page_gen_oracle, plus VICTORY_TEXTURE_HASH_ORACLE=1 to detect any uncounted writes. ### Verification - cargo test -p victory-gpu texture:: --locked -> **3 passed, 0 failed** (dirty_gen_skips_rehash_when_digest_unchanged_and_detiles_when_bumped). - cargo test -p victory-hle xmem:: --locked -> **23 passed, 0 failed** ( a_generation_digest_tracks_mapped_views_and_rejects_gaps). - cargo check -p victory --locked -> pass. - /kee mutation probe: ignoring last.gen_digest == Some(digest) fails dirty_gen_skips_rehash_when_digest_unchanged_and_detiles_when_bumped; restored byte-identical.
MKmajster commented 2026-11-25 19:09:47 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by MKmajster on 2026-11-25T18:47:16Z.


For anyone who merges this alone: with VICTORY_TEXTURE_DIRTY_GEN=1 on main ca8829f + #1007 and without #872, the run ended while loading, before the world, with an access violation (a write to 0). As the description says, it needs #872 first. Without the switch the same build ran normally.

AI-assisted (Claude Code). No game data attached.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7171398941 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1018#issuecomment-7171398941). Originally posted by [MKmajster](https://github.com/MKmajster) on 2026-11-25T18:47:16Z. --- For anyone who merges this alone: with `VICTORY_TEXTURE_DIRTY_GEN=1` on `main` ca8829f + #1007 and without #872, the run ended while loading, before the world, with an access violation (a write to 0). As the description says, it needs #872 first. Without the switch the same build ran normally. AI-assisted (Claude Code). No game data attached.
HailLucifer666 commented 2026-11-25 21:05:53 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by HailLucifer666 on 2026-11-25T20:20:20Z.


Thanks @MKmajster — that confirms the dependency documented in the PR description: VICTORY_TEXTURE_DIRTY_GEN=1 calls xmem::va_generation_digest and relies on #872's persistent high-VA alias + per-page generation counters, so this PR is stacked on #231 -> #872 and must land after #872 (not cherry-picked onto main alone).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7173521317 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1018#issuecomment-7173521317). Originally posted by [HailLucifer666](https://github.com/HailLucifer666) on 2026-11-25T20:20:20Z. --- Thanks `@MKmajster` — that confirms the dependency documented in the PR description: `VICTORY_TEXTURE_DIRTY_GEN=1` calls `xmem::va_generation_digest` and relies on `#872`'s persistent high-VA alias + per-page generation counters, so this PR is stacked on `#231` -> `#872` and must land after `#872` (not cherry-picked onto `main` alone).
HailLucifer666 commented 2026-11-26 14:03:32 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by HailLucifer666 on 2026-11-26T13:59:34Z.


Rebased onto the new #872 head (08aa56ad); this head is now 606d1e68 (--onto, no conflicts). Verified: cargo check for victory-gpu, victory-hle and the victory app; victory-gpu texture:: 3 passed, 0 failed; clippy -D warnings on victory-gpu and victory-hle clean. It still needs #872 (and #231) to land first, as the description says.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7194121802 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1018#issuecomment-7194121802). Originally posted by [HailLucifer666](https://github.com/HailLucifer666) on 2026-11-26T13:59:34Z. --- Rebased onto the new `#872` head (`08aa56ad`); this head is now `606d1e68` (`--onto`, no conflicts). Verified: `cargo check` for victory-gpu, victory-hle and the victory app; `victory-gpu texture::` 3 passed, 0 failed; `clippy -D warnings` on victory-gpu and victory-hle clean. It still needs `#872` (and `#231`) to land first, as the description says.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1018:upstream-pr/1018'
git switch 'upstream-pr/1018'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/1018'
git switch 'upstream-pr/1018'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1018'
git switch 'upstream-pr/1018'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1018'
git switch 'main'
git merge --squash 'upstream-pr/1018'
git switch 'main'
git merge --ff-only 'upstream-pr/1018'
git switch 'main'
git merge 'upstream-pr/1018'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!1016
No description provided.