Repository navigation
Conversation
…k for a while Textures whose memory is written through another view of its pages (a video's frames, written by the runtime) are never seen written, so they were hashed only at every eighth frame, by address. A ring of three such frame textures then showed its older pictures in turn: the loading video strobed between old and new frames. A texture whose hash changed though no write was seen is now hashed at each of its next 64 checks; once it stays the same that long it goes back to the eighth-frame turn.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Tested on CachyOS Linux (
(AI-assisted build/log analysis.) |
|
Independent confirmation on RTX 3060 12 GB / i7-7700K, fork 4e17478 + an equivalent patch (hash a texture at every check for 60 frames after a change its guard did not see). Capture of the intro (OBS, 60 fps, mean luma per frame; counting frames where n matches n-6 but not n-2/n-4, i.e. a 3-texture cycle):
The log names the ring: three textures changed unseen in the same frame (0xb4a800000, 0xb4ac00000, 0xb4b000000), then two more triples a few frames later, and three more (0xc90…) during the opening cutscene. No new warnings, no visible cost in the intro (6 draws/frame, 30 fps). |
|
Tested on an RTX 4070 Laptop GPU (8 GB, driver 621.14, default TDR), i9-14900HX, Windows 11, Series X profile, diag build with Jump-backs in the intro. Every presented frame from 300 to 850 was saved (
The PR's log line fired as expected ( Cost, from runs without per-frame saving (saving every frame drops the intro to 5–7 fps, so those runs are not used here). The intro holds its 30 fps cap in all three, and reaches frames 512 and 1024 equally fast (about 18 s apart).
So #159 costs more than turning the guard off while the video plays (it hashes the 3840×2160 target each check), but drops back to the guarded cost once the video stops.
Not checked: whether it changes anything in the world; runs were 75–120 s. AI-assisted (Claude Code): the runs, frame comparison and numbers were produced by Claude Code and checked against the logs. |
|
I found one path that misses this PR’s unseen-write tracking on 6109393. When a remap is in progress and I put a one-file fix and synthetic regression directly on top of your head. The unlocked read now passes the same I reproduced the zero-counter failure on native Windows x64 and reran the same test after the fix. All four texture tests and the mapping synchronization test passed. The regression uses a synthetic 16-byte texture. AI-assisted. |
…uploads Credit NuraadGit (fxceless#159), ryotdev (unlocked reads), adritoyalser (fxceless#80), arminkhaleghirod (fxceless#39/fxceless#63), and brunofgmag (geometry A/B). Preserve inline placement for correctness testing. Native validation pending.
texture.rs: fxceless#159's unseen-write handling kept where both changes made the same fix (victory-amd's `unguarded` / `unseen_write` left out); the rest of victory-amd's texture changes (true-memory spans, lost views put back) kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What it fixes
On the loading/intro video the picture switched between older and newer frames, so the video strobed.
The video's frames are textures that the runtime writes through another view of their pages, so write watching never sees those writes. Such textures are only hashed every eighth frame, staggered by address. With a ring of three frame textures, a slot kept showing its old picture until its turn came round.
Change (
crates/victory-gpu/src/texture.rs)Lastgets anunseencounter. If a texture's hash changed although no write to it was seen, it is hashed at each of its next 64 checks instead of waiting for its eighth-frame turn.n <= 8or powers of two).a_texture_that_changed_unseen_is_hashed_at_each_check.Testing
RTX 2080 (8 GB, Windows 11), on this fork, warm shader cache:
cargo test -p victory-gpu --libpasses;cargo clippyadds no warnings.Cost: only textures that changed without a seen write get hashed more often, and only for 64 checks after each change.
AI-assisted (Claude Code). I reviewed and tested it.