mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 02:49:57 -04:00
With the lazy write-back on, a village and Hyrule Field still merged 20 to 29 MiB a frame back into guest memory at the end of every submission, inside the GPU work the game's fence waits for. The new log line (mem: lazy write-back at frame N: written back and not armed since the last line) names the reason by bytes: none of it lay in frozen regions or on pages that could not be armed; it lay in regions held after a touch. The game's CPU reads a few words at the start of buffers its shaders fill (12 bytes into ranges of 6.3 and 15.2 MiB among others), about once a second. Each read gave back the whole armed range and held every 2 MiB region it reached for 1 s, doubling to 32 s, and nothing was armed in a held region. A touch now gives back the 64 KiB around its address, fetched alone, and holds only that piece; the rest of the range stays armed (wb_lazy_chunk, default 1; 0 is the old rule). More than four touches in one region within a second are taken as a reader going through the range: that range goes whole and its regions are held as before, and the region's touches go that way at once while it keeps being touched within a minute. Each of the first eight touches of a log window is logged under the perf trace with its thread, address, range and what was given back. Measured on one machine (NVIDIA, uncapped, frame generation off, scripted walks, medians over the windows of 46 s of world clock): - village: 121.8, 124.1 and 124.4 fps before; 138.0 and 135.4 with this change; GPU busy 4.8 to 4.15 ms a frame - Hyrule Field: 101.1 and 113.1 fps before; 131.5 and 131.3 after; GPU busy 6.5 to 4.7 ms - merged a frame: 20 to 29 MiB before, 1.7 to 2.0 MiB after - faults on armed pages in 1,000 frames: 14 and 16 before, 17 to 18 after in the village; 19 and 23 before, 17 to 21 after in Hyrule Field; time spent fetching the same (4 to 5 ms in 1,000 frames) A run with synthetic reads of four armed ranges per log window (wb_lazy_touch = 4, 769 faults) ended without an error. The picture of every presented frame of a village walk and a field walk (thumbnails, 10,131 and 9,531 frames) had no black frame. The village walk has single frames whose brightness jumps: 14 with the change and 28 without it in about 10,000 frames each; the two looked at, one of each, are jumps of the camera. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
68 KiB
68 KiB