GPU: refresh view-memory textures that host-side writers changed #438
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/438"
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 fxceless/victory-fork. Originally posted by sennecools on 2026-11-25T00:49:27Z.
A texture in view memory is guarded (read-only, a write faults once) and otherwise hashed only every eighth frame, so writes the guard does not see leave it up to eight frames stale. Two such writers were unseen: the title filling physical pages through its pool while the same pages are sampled through its tiled heap, and the runtime writing physical pages through views of its own (DirectStorage page destinations, xmem
write_physical).Changes
VICTORY_GUARD_ALIASES=0turns this off).physical_written.kernel_will_writereturns a hold: the blocks are not guarded again (through either view) until the kernel write is done;write_mappedtakes it itself.Why: with
VICTORY_TEXTURE_GUARD=0(hash every check) orVICTORY_KEEP_VIEWS=0, flickering tiles in the intro went from 317 to 2 of 480, so stale content was the cause.Testing
diagnostics; clippy clean.Known limits: a runtime writer that neither faults nor reports (possibly the media code) stays unseen; an overlapped
ReadFileis held only until it is started.AI-assisted (Claude Code)
Draft: it is in our combined build and ran in the game without problems, but its effect on the flicker has not been measured yet.
AI-assisted.
Imported from fxceless/victory-fork. Originally posted by Fimpos on 2026-11-25T01:54:58Z.
Tested on RTX 5070 12 GB (Windows 11 25H2, driver 621.24) on top of
c96b4f2with VICTORY_RELAY=2 (plus #206, #410, #451, #457, #460, #462, #481, #139):Imported from fxceless/victory-fork. Originally posted by Pin0d1 on 2026-11-25T09:03:24Z.
@sennecools, @Revens2 pointed me here from #555. Both PRs have the same head,
5af49b5. I reran the three tests on the test-only commit, whose parent is that exact head.A write through a sibling mapping produced 0x11223344 in both independent GPU readbacks. Both journal consumers saw the same write, and the synchronous four-byte file read returned TEST while another holder covered part of its destination. All three passed in two fresh processes per adapter setting on Windows. The command is
cargo test --locked -p victory-gpu --lib watch:: -- --test-threads=1.Prepared with the help of Codex 6.2 Astra Max.
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.