Repository navigation
Conversation
…xceless#269) A guarded texture in view memory that the guard saw no write to was hashed every eighth frame only. A texture the title rewrites through another view (the startup screens, video frames) changes where the guard cannot see it, so it was shown up to eight frames stale: repeated frames and flicker at startup and in the intro, gone with VICTORY_TEXTURE_GUARD=0. Each hash that finds a texture changed now notes the frame (`Last::rehash`, used by every hashing path), and for 16 frames after that the guard does not skip the texture. One that keeps changing is hashed at every check; one that stops goes back to taking turns, so still textures keep the guard's saving. The skip decision is a function (`guard_skips`) with unit tests. Not yet checked in the game: the change is to when a texture is hashed, not to what is read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I checked
The discovery interval depends on when that slot is checked. With a slot used every third host frame, eight checks can take 24 host frames. If the old image is present at every scheduled hash, neither version enters the hot window. This is a useful control for a follow-up capture, especially given that #115 has intro results from AMD and NVIDIA using direct alias-write tracking. Both models returned to the normal cadence once the texture settled. The harness mocked Windows guard, remap and detile operations. Game output and frame time still need a native run. Verified with Codex assistance. |
Review on fxceless#343 found that a newly read static texture was hashed at every check for its first 16 frames (18 hashes in 32 frames against 4 on main), because its first hash counted as a change. `Last::rehash` now notes the frame only when an earlier hash differs. A texture just read takes turns as before; one that changes enters the every-check window at its first changed hash. New test `only_a_second_differing_hash_is_a_change`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for running this. Pushed a follow-up (c4dc17e): a texture's first hash no longer opens the every-frame window, so a newly read static texture is back to main's cadence; one that changes enters it at its first changed digest. The "original contents at every scheduled hash" case is unchanged, as you say; only seeing the writes catches it, which is what #115 does at the source. This PR is meant to complement that: the hash net under the guard reacts within a frame, instead of up to eight, for any write path the guard still misses. Happy to rebase on #115 or close this if the maintainer prefers. |
Fixes #269.
Problem
With
VICTORY_TEXTURE_GUARDon (the default), a texture in view memory that the guard saw no write to is hashed only every eighth frame (HASH_EVERY, by address so textures take turns). The code already notes that a write through another view is not seen by the guard. The startup screens and intro are evidently written that way, so they were shown up to eight frames stale: repeated frames, jumping and flicker. #269 bisected it to this switch alone, and four more people in that thread confirmedVICTORY_TEXTURE_GUARD=0removes it.Fix
Lastgainschanged: the frame a hash last found the texture's memory changed. A newLast::rehashsets it, and every hashing path uses it (partly mapped, through the copy, in place, and the unlocked read).guard_skips. ForRECENTLY_CHANGED(16, two turns) frames after a change, a texture is not skipped.VICTORY_TEXTURE_GUARD=0.Testing
guard_tests::a_still_texture_takes_its_turnandguard_tests::a_changing_texture_is_hashed_at_every_frame, including frame counter wrap-around.cargo test -p victory-gpuon Windows 11 at this commit: 112 passed, 0 failed (1 ignored benchmark). No clippy warnings intexture.rs, with or without--features diagnostics.VICTORY_TEXTURE_GUARD=0stays the workaround until then.Developed with Claude Code on Claude Opus 5.5.
🤖 Generated with Claude Code