Repository navigation
Conversation
The guard protected one view of a texture's physical pages and heard only of faults there, so a write through another view of the same pages, or the runtime's own write into them (write_physical, DirectStorage page destinations), went unseen and the texture kept stale contents until its eighth-frame hash. The guard now protects every view of its pages, and the runtime reports its own writes.
|
Confirmed on AMD: this fixes the boot video stutter on an RX 6600M. Setup: AMD Radeon RX 6600M (8 GB, 32-lane waves), driver 32.0.21045.16010, Windows 11 26200, default TDR. Own 1.0.2.1 copy, Series X profile, What it looked like before: the boot video played visibly jerky, and the present timing did not explain it. With
Without it, the video's three frame buffers cycle: frames 761-770 show the same three images in turn ( Tests: Unrelated, from the same runs, in case it helps someone else: the 1.0-1.5 s freezes on the black screen before the first logo are a title worker making about 54,000 one-page AI-assisted (Claude Code); hashes, counts and log lines only. |
|
Confirmed the boot-video fix on an NVIDIA RTX 5070 (driver 610.88), Ryzen 7 7800X3D, Windows, native D3D12, Series X profile. I compared 4e17478 with #115 (2ef19e0, also cleanly applied to 2119b0e, whose source tree matches 4e17478). Both runs used the same saved setup, separately copied warm caches and identical inputs. I captured three bursts of 18 consecutive frames in the animated startup video, starting at host frames 390, 470 and 555. Both sides showed the moving intro in all three bursts. I hashed the decoded RGB pixels. A return means frame N matches N−3 with at least one different image in between.
I also ran the Windows shared-page regressions against main as negative controls: the write-through-another-view and newly-mapped-alias tests both failed with an empty dirty-page result on main and passed with #115. All 33 focused watch, XMem and DirectStorage tests passed with the change. These captures measure frame content, so I’m reporting the reversal fix separately from frame pacing or gameplay FPS. AI-assisted testing. World checkpoint follow-up. This revision also exited in two runs shortly after entering the prison scene on my RTX 5070. Windows exit code was 0x80000003 in both, without a reported GPU device loss. The last captured frames were 40 and 24 frames past the first 500-draw frame. One used joined rehash runs with descriptor statistics, the other the normal direct-queue play profile. I reran main with the latter profile and the same saved checkpoint and reached +150 frames. Earlier main comparisons reached +500. I haven't isolated which change accounts for the exits. The intro result above stands; I would keep later gameplay stability a separate check. The narrower patch from #63 applied to 4e17478 also gave 18 distinct frames in each of the three intro bursts and zero three-frame returns. With that patch, the same checkpoint reached +500 frames on the standard direct-queue play profile. |
|
A defect in this PR's What is wrong. The fix. The other views are made read-only and noted protected, not clean; Test. Measured on an RTX 5070 (driver 32.0.16.2124, Windows 11, diag build,
So this PR also matters outside textures: without it the copies of the memory the structure builder works in go stale within a second. It does not fix #16: the title still crashes 5-15 s after the builder starts with both changes (2 of 2 runs, Not tested: AMD, Intel, Windows 10, the boot video with the fix on top. AI use: Claude (Anthropic) in OpenCode, on my machine with my own copy of the title; no game data attached. |
|
Measured in the title with joroyt's Spexivus#1 ( RTX 4070,
So with The problem: the title stops itself in 2 of the 4 runs with this PR (one without Why it happens more with this PR: |
…ess#206 reverted) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Same stop as @SantannaCarlos describes, on another setup, and it comes fast with the speed switches. Setup: RTX 5060 Ti 16 GB (driver 621.24), i7-14700KF, Windows 10 22H2 (#22 for the Agility SDK), release build, Series X. Tree
Before both stops the log has With AI-assisted (Claude Code, Claude Opus 5.5); numbers from local logs, no game data attached. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Before: the texture guard made the 64 KiB blocks of one view read-only and learned of writes only at that address: a fault there,
watch::writing, or a mapping. Physical pages can be mapped at several addresses, though, and a write through another view of the same pages, or the runtime's own write into physical pages (write_physical, DirectStorage page destinations), never faults at the guarded address. The guard then reported the texture unwritten, so it was hashed only on its turn every eighth frame and kept showing stale contents in between.After: a write to the pages is seen whichever way it arrives.
watch.rs: the guard makes every view of the guarded physical pages read-only. A fault at any of them, orwriting, opens and marks all of them written. Newtitle_memory_written(section, offset, len)lets the runtime report its own writes into physical pages, and a view newly mapped over guarded pages makes their guards check again.inplace.rs: an index from (section, 64 KiB offset) to every view showing it, kept bytitle_memory_view/views_gone, withviews_between,pages_ofandviews_of_sectionto look it up.xmem.rs:write_physicalreports each run it writes;PageWindow::written()reports the window.dstorage.rscalls it after filling a page destination.texture.rs: withdiagnostics, a one-time warning when a hash finds a change the guard did not report, naming the texture, so any write path still missed shows up.Unchanged:
HASH_EVERY, and memory that is not written costs the same as before (no faults, no hash). The hash stays as the net under the guard.Tests: three new ones in
watch.rs(a write through another view, a view mapped beside a guarded one, a runtime write into physical pages).cargo test -p victory-gpu --features diagnostics120 passed,victory-hle95 passed, clippy clean with and withoutdiagnostics.