Repository navigation
Conversation
|
Independent confirmation of the diagnosis, from a different ground (Linux/Proton, RX 7900 XT, RADV, fork The counters you are moving are the ones I measured before touching anything: Your 671 ms median to 0.0 ms matches my direction (mine: 20.2 ms to 0.0 ms with One thing that may be useful to you: I first assumed the wait was a convoy of our making — every refresh holding the read guard through its blake3 hashing and detiling, so the runtime's remap waited for us and then we waited for it — and measured it. Copying the texture out under the guard and dropping it before A question on the design, since you are the one who knows: for a mapping change whose extent cannot be determined (the "unknown extents" case you keep global exclusion for), how often does that happen in practice, and is the nonblocking read path still reachable then? In our runs the deferral rate with |
|
Verified on the other ground this fork is used on: Linux/Proton (CachyOS, RX 7900 XT, Mesa 26.3.1 RADV, vkd3d-proton 3.2.0, Proton Experimental Same counter from
So on a backend you did not test on, the property you claim holds: no window waited at all, and it does not pay the deferred-texture price the What it hands over to is worth writing down: with the wait gone, the lane is now asking — 62.9 ms median, 936 ms in the worst window (write watch and guards). That is #177's target, and on this box it is the largest remaining item in the texture lane. |
|
Tested on Windows 11 D3D12, RTX 5070 (driver 621.14), Ryzen 5 5600, 16 GB: fork main + this PR at World frames only (samples over 1,000 draws), one run each:
The texture refresh time is where it shows: down by about 8x, which matches the mapping-lock waits going away. In game, walls and surfaces that stayed blank or stale before now fill in while streaming, and the prison interior is playable at 1–2 fps. No hangs or device removals in either 10-minute run (also with #220 on top). The lock tests pass here. Caveat: one run per setup, and the run with this PR started on a cold shader cache. AI-assisted (Claude Code); no game files attached. |
|
Native Windows D3D12 / AMD RDNA2 data point, if useful. Setup: Windows 11 26100, RX 6800 XT 16 GB (RDNA2), driver 32.0.21045.29003, Ryzen 5 5600, 32 GB, Series X profile, diag build at Two runs: 180 s from the checkpoint (prologue), and 300 s from a fresh data dir (first boot/streaming).
Before the PR the frame line was 0.2 fps, 4.4-5.7 s/frame, textures 3.1-5.0 s; 14 of the 25 windows waited over 100 ms, the worst 7.9 s. With the PR the prologue runs at 1.2-1.5 fps, 669-822 ms/frame, 4,980-5,114 draws/frame, ~16-17 GB working set, with no device loss. The texture lane is 3.1 ms median, and the mapping wait is 0.0 ms in all but two windows (2.4 and 35.5 ms). This matches the Linux/RX 7900 XT and RTX 5070 reports, and it keeps the in-place read rather than deferring textures. My earlier #393 (defaulting AI-assisted: the runs above were made with an AI agent on my machine; I reviewed the logs and the result. No game files or captures are attached. |
|
A measurement from another NVIDIA card, for what it is worth.
Caveats: the "with" runs carried #191 and #154 too, so the attribution to this PR is by the counter it changes, not by an isolated A/B; and those runs did not go through exactly the same scene. I have not yet checked the picture of this PR alone against (Runs by me on the hardware above; numbers read from the logs and this note written with Claude Code.) |
|
Two things from a Linux machine this morning, and the second one is the reason to rebase rather than close. The branch no longer applies to title_memory_reading, title_memory_reading_now, title_memory_reading_range,
title_memory_remapped, title_memory_remapping, title_memory_remapping_range,
title_memory_written, writing as kernel_will_write,Nothing else conflicts, and it builds and runs after that. And it does exactly what it says on the newest
Zero, not "smaller": in 136 out of 136 windows the readers never waited at all. That matters more since this morning's measurement (#178) that the title holds the mapping lock for 3 844–8 020 ms a frame across 1 721–5 041 separate changes — there is almost never a free moment for a global lock to be acquired, which is why scoping it per range removes the wait rather than shortening it. I have the rebased commit (your change, the one-hunk resolution above) and can push it to my fork as a fresh PR if you would rather not force-push here — say which and I will. |
|
Independent Windows 11 run (build 26200, i5-8400, RTX 3060 12 GiB with driver 610.88, 32 GiB RAM). I compared the same warm-cache Series S checkpoint on local build
The same heavier bin had a maximum reported wait of 257.2 ms before and 0.1 ms after. In later 50-second windows around 4,500 draws, actual presents averaged 4.33 FPS before (222 frames) and 4.94 FPS after (253 frames). There was one launch per build and the later windows were sampled at different times after loading, so the frame-rate comparison is directional. No device removal was logged in either run. AI-assisted with OpenAI Codex. |
|
Reading d510ee4 (two attempts on the title's page mapping, both taken back out) — two costs in that area get treated as one, and this PR only addresses the second. The 32 ms of every cutscene frame in that note is the kernel map/unmap calls themselves. This PR does not touch them: What it changes is who waits. On 9376fd6 the write lock was held across the whole map operation ( With the diff, on the same save and scripted input, 7 minutes a side: texture wait 0.0 ms in 136 of 136 windows, lane total 599 → 59 ms median. Again as a caution: that is a wait figure, not a frame-rate one, and each side is a single run. Two runs of the same binary on this rig have differed by 2–4x at matched draw counts, so I would not put a fps number next to it. The case worth checking when reviewing: a view reaching past the requested range, where |
|
Rebased onto d510ee4, with the frame log's counters kept. Conflict in Measured on The texture lane moved 33 MB in 1,701 ms on the base and 161 MB in 330 ms here (19 MB/s
So the wait is gone everywhere it was measured, and it is worth about 1.3 s a frame in the |
|
Measured the same way as my earlier comment, on the same rig, and this one corrects it: the wait goes away, but above 3,000 draws the queue costs more than the wait it saves. Rig: RX 7900 XT (RDNA3), Mesa 26.3.1 RADV, Proton experimental, The win is real and it is in the lane that waits:
Bucked on draws and texture megabytes per frame, so the two runs are in comparable scenes, the same frames above 3,000 draws go the other way:
Inside those frames the movement is copies 213 -> 672, copying back 323 -> 1,240 ms, everything else 559 -> 1,020 ms, textures 1,613 -> 330 ms, GPU 104 -> 78 ms. Whatever the copying back does when the readers are no longer serialised, it is not the wait. What I think the cause is: a read in place does not take a shared lock, it takes one global mutex, twice - once to push a reader into a I tried the cheap-reader version of this idea to see whether the shape is the problem: the address space cut into 512 stripes of 64 KiB, a read or a change taking only the stripes its range covers, ascending, all of them when the extent is unknown. The regression goes away - So: the wait removal is worth having, and the read path has to be cheap before it can be had at every draw count. Worth knowing before this is merged as an improvement to frame time in general. |
Summary
Verification