Guarded textures' turn hash (every 8th frame) reads ~30 MB/frame and found nothing in ~30 min; make the interval a switch? #886
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by MoisesAbdalla on 2026-11-28T08:34:09Z.
On a Ryzen 7 5700X (8 cores) + RTX 5060 Ti 16 GB,
63b902f, Series X, 1440p, DLSS Performance, frame generation 2x, the first boat ride: our frame is held by the CPU (the submitting thread and the title's own threads), the card is idle 10-15 ms a frame.In
Staging::refresh_timed(texture.rs), a guarded texture that nothing wrote is still hashed whole everyHASH_EVERY = 8frames, by its address, for a write the guard cannot see (through another view of its pages). I counted the refreshes that read the texture, by why, per frame on the boat:And every change a turn or hot hash found that no write the guard saw explains (
found_blind): 0 in 1,443 frame-rate lines (two runs, about 30 minutes of cutscenes and boat). The diagnosticscopystatline agrees:0.0 changes the guard did not seein every line of four runs.With the interval as a switch and
VICTORY_ABflipping it between 8 and 64 every 15 s in one run (78 phases of 15 s in the world, over two runs):The patch I measured with (default unchanged, 8):
VICTORY_TEXTURE_HASH_EVERY=<n>(1 to 1024) in place of the constant;VICTORY_TEXTURE_HASH_RAREunderVICTORY_AB(withVICTORY_TEXTURE_HASH_RARE_N, 64 by default);found_blindand one frame-rate line of the refreshes that read the texture, by why.Happy to open a pull request with it if that is useful, or to run something else on this machine.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-28T08:34:17Z.
Please attach both logs from the run that went wrong. Without them we can only guess. Paste
%LOCALAPPDATA%into the address bar of File Explorer to get there.%LOCALAPPDATA%\victory\logs\: the newestvictory-nvidia-play-<date>-<time>-<number>.log(fromvictory.exe) orvictory-nvidia-<date>-<time>.log(from the script launcher). The window shows its path at the start, on the lineLog: ....%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newestvictory-<date>-<time>-<number>.crash.login%LOCALAPPDATA%\VIctory\data\7952987A\temp\.Also say which GPU, Windows version (10 or 11)
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Robotniq on 2026-11-28T21:40:15Z.
A data point that supports the change, from an RTX 3070 Ti 8 GB / i7-13700F (Series S, DLSS Quality, 5-minute scripted runs on one route):
We keep 64 in our local launcher.
Measured with AI assistance (Claude Code); the runs were made on my machine.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by MoisesAbdalla on 2026-11-28T21:49:38Z.
A follow-up in a repeatable scene: four unattended runs of the same save (cutscenes, then Jason standing on the boat, no input; diagnostics build of
63b902f+ the patch, everything else default), alternating the default withVICTORY_TEXTURE_HASH_EVERY=64, frame-rate lines from 430 to 560 s after start (~4,000 draws a frame in all four):64 against 8: -1.67 ms a frame (SE 0.27), both pairs in the same direction (-0.8, -2.5). Still no change found that the guard had not seen.
Thanks for the second machine's numbers above: on this CPU-bound 8-core box the same change shows up as frame time.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kalberts0089-hash on 2026-11-29T09:23:54Z.
@MoisesAbdalla thanks. Here's a data point on what the hash alone costs, from an i7-13700KF. I can't run the game here, so I timed
digest()(texture.rs:1052) on slices of a 512 MB random pool, which means the reads come from DRAM. Single thread, opt-level 3, median of 60:That's about 11-12 GB/s, or ~0.085 ms per MB. Going from 30 to 4 MB a frame saves ~2.2-2.6 ms on whichever thread runs the refresh, the same order as your -2.5 / -1.67 ms. For Robotniq's 20 to 4.5 MB it predicts ~1.3 ms, but their frame time moved only ~0.3 ms. My guess is that thread wasn't what held their frame. Reading the title's memory in place may cost more than my buffer.
There's still no switch on main / v2026.11.29.01 (
829188e):HASH_EVERY = 8is a const at texture.rs:2192. #1712 (VICTORY_TEXTURE_TURN_SPREAD=1) only spreads the turns across the 8 frames, so the average bytes per frame stay the same. It might help p90 but not the mean (not measured).On the risk of 64: a blind change is caught up to N frames late (~0.4 s at 8, ~3.2 s at 64, at 20 fps). After the first catch,
found_blindkeeps the texture hot forHOT_FRAMES = 64(texture.rs:243), and new textures start hot. So textures written every frame, like the video ring, recover at any N. Only rare blind writes, more than 64 frames apart, get slower. A switch that defaults to 8 looks low-risk.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-29T23:07:35Z.
Closing this one: it was reported on v2026.11.28.02 or earlier, and a lot has changed since (crash fixes, memory, shaders, warm-up and speed).
If it still happens on v2026.11.29.05, please open a new issue with the newest play log from
%LOCALAPPDATA%\victory\logs\andcrashes.log, and we'll look at it there.