D3D12.X: every draw re-syncs buffer mirrors on the CPU (VirtualQuery, whole-buffer copies, index scan) #2389

Open
opened 2026-11-26 05:29:49 +00:00 by github-bot · 3 comments
Owner

@⁠KOLESNiii on GitHub · 2026-11-25 17:43 UTC · original

Some titles bind vertex and index buffers in their own memory, outside the unified-memory windows. XCL gives each such buffer a mirror in unified memory (#637), and list_x::sync_title_buffers (crates/xcl/src/hle/d3d12x/list_x.rs:3539 on main 3f4495a) brings the mirror up to date on every draw. Once one mirror exists, every DrawInstanced, DrawIndexedInstanced and DrawIndexedX on every list goes through it. Per draw, it:

  • checks the source with readable(), which falls back to a VirtualQuery walk for more than 64 KiB. #693 removed this check from the bind because it was too expensive there;
  • copies the whole vertex buffer for instanced draws, and the used range otherwise, even when the title has not written it;
  • reads every index of an indexed draw on the CPU to find the vertex range;
  • writes the copy into a mirror that usually sits in a sparse window, so the next submit's write-watch look finds the pages dirty and uploads them again.

Seen: in my title's menus (RTX 2070 SUPER, Ryzen 5 3600XT, Windows 11 26300, main 3f4495a release), the first two mirrors appear 36 s in: a 384 KiB index buffer and a 1.1 MiB vertex buffer. Draw counts in a world are far higher than the ~600 a second in those menus. I have no measurement of the function's cost yet, which is why the first part below is a counter.

None of the open work changes this path: #825 frees idle mirrors, #1995 re-keys MIRRORS, and #1488 covers the DrawIndexedX re-sync as a correctness bug.

Parts (one PR each, in this order):

  • #2391 – count and time it in XCL_ACTIVITY (diagnostics, first)
  • #2392 – check the source once per mirror, not with readable() per draw
  • #2393 – skip copies and index scans of unchanged buffers
  • #2394 – put mirrors in the coherent window, not sparse memory (low priority: measured, not uploaded again)

Found by code reading with Claude Code (Claude Opus 5.5).

**@⁠KOLESNiii** on GitHub · 2026-11-25 17:43 UTC · [original](https://github.com/xcl-dev/xcl/issues/2389) Some titles bind vertex and index buffers in their own memory, outside the unified-memory windows. XCL gives each such buffer a mirror in unified memory (#637), and `list_x::sync_title_buffers` (`crates/xcl/src/hle/d3d12x/list_x.rs:3539` on `main` 3f4495a) brings the mirror up to date **on every draw**. Once one mirror exists, every `DrawInstanced`, `DrawIndexedInstanced` and `DrawIndexedX` on every list goes through it. Per draw, it: - checks the source with `readable()`, which falls back to a `VirtualQuery` walk for more than 64 KiB. #693 removed this check from the bind because it was too expensive there; - copies the whole vertex buffer for instanced draws, and the used range otherwise, even when the title has not written it; - reads every index of an indexed draw on the CPU to find the vertex range; - writes the copy into a mirror that usually sits in a sparse window, so the next submit's write-watch look finds the pages dirty and uploads them again. **Seen:** in my title's menus (RTX 2070 SUPER, Ryzen 5 3600XT, Windows 11 26300, `main` 3f4495a release), the first two mirrors appear 36 s in: a 384 KiB index buffer and a 1.1 MiB vertex buffer. Draw counts in a world are far higher than the ~600 a second in those menus. I have no measurement of the function's cost yet, which is why the first part below is a counter. None of the open work changes this path: #825 frees idle mirrors, #1995 re-keys `MIRRORS`, and #1488 covers the `DrawIndexedX` re-sync as a correctness bug. **Parts** (one PR each, in this order): - [ ] #2391 – count and time it in `XCL_ACTIVITY` (diagnostics, first) - [ ] #2392 – check the source once per mirror, not with `readable()` per draw - [ ] #2393 – skip copies and index scans of unchanged buffers - [ ] #2394 – put mirrors in the coherent window, not sparse memory (**low priority**: measured, not uploaded again) *Found by code reading with Claude Code (Claude Opus 5.5).*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:29:49 +00:00
Author
Owner

@⁠KOLESNiii on GitHub · 2026-11-25 17:54 UTC · original

Measured: the sync is cheap on average, but readable() stalls the render thread for ~5 ms every few seconds. The copies are all redundant. Mirrors only appear while the coherent window is too small.

Setup: my title; main 3f4495a plus local timers and counters (not committed); release; RTX 2070 SUPER (32.0.16.2140), Ryzen 5 3600XT, Windows 11 26300. Two scripts/smoke.ps1 runs of 120 s each, both in menus (30 fps, ~390 draws/s).

When mirrors exist at all. With the learned coherent window (uma_coherent.txt, 4095 MB), the run made no mirrors, so sync_title_buffers returned at its first check. Mirrors only appeared after I removed that file for one run, which gives the 512 MB first-run window of #284. That run made two mirrors at 32.7 s, the same as my first report: a 448 KiB index buffer and a 1.2 MiB vertex buffer, both in a sparse window. So on this title, this issue is a first-run problem.

First-run window, 50–118 s, per 2 s, very steady:

per 2 s
draws through the sync / with a mirror 780 / 660
copies (whole buffers) 1,200 (0)
bytes copied 10.5 MiB, in 2.5 ms
indices scanned for the vertex range 1.98 M, in 0.55 ms
readable() calls (over 16 pages) 1,800 (0), 1.3 ms when none is slow
total time in the function 4.7 ms typically (~7 µs a mirrored draw), 9–18.6 ms with a slow readable()

What this means for each part:

  • #2391 (counters): I did these locally, with the counters described there. They produced the numbers in this comment.
  • #2392 (readable per draw): no range was over 16 pages, so the VirtualQuery fallback I expected for large ranges never fired. But in 18 of the 43 2-s windows that had mirrors (34–118 s), a single readable() call on ≤16 pages took 1.1–8.8 ms, most of them 4–5 ms. That is presumably resident_and_readable failing on a page that is not resident, followed by the VirtualQuery walk. It happens on the render thread inside a draw, so it is a hitch worth ~15 % of a 33 ms frame roughly every 4 s. This is the largest cost found here.
  • #2393 (unchanged sources): confirmed. The title does not rewrite these buffers: the sparse upload path finds the mirror pages unchanged (its uploaded total stays at 1,389–1,390 MB over 4,096 submits). Every copy and index scan is redundant: 5.3 MiB/s and ~1 M indices/s in menus.
  • #2394 (sparse mirrors): partly wrong as I wrote it. The mirror pages are 2,820 of the 3,630 write-watch dirty pages per 2 s (78 %). They are not uploaded again, though, because the sparse chunk hashes drop unchanged bytes. The cost is extra pages in the look and its chunk scan, which is small next to #582's per-look cost. Skipping unchanged copies (#2393) removes this as well, so #2394 is low priority.

Not measured: the world (never reached), and any draw with instances (none here, so no whole-buffer copies).

Measured and written with Claude Code (Claude Opus 5.5).

**@⁠KOLESNiii** on GitHub · 2026-11-25 17:54 UTC · [original](https://github.com/xcl-dev/xcl/issues/2389#issuecomment-7170173282) **Measured: the sync is cheap on average, but `readable()` stalls the render thread for ~5 ms every few seconds. The copies are all redundant. Mirrors only appear while the coherent window is too small.** **Setup:** my title; `main` 3f4495a plus local timers and counters (not committed); release; RTX 2070 SUPER (32.0.16.2140), Ryzen 5 3600XT, Windows 11 26300. Two `scripts/smoke.ps1` runs of 120 s each, both in menus (30 fps, ~390 draws/s). **When mirrors exist at all.** With the learned coherent window (`uma_coherent.txt`, 4095 MB), the run made **no mirrors**, so `sync_title_buffers` returned at its first check. Mirrors only appeared after I removed that file for one run, which gives the 512 MB first-run window of #284. That run made two mirrors at 32.7 s, the same as my first report: a 448 KiB index buffer and a 1.2 MiB vertex buffer, both in a sparse window. So on this title, this issue is a first-run problem. **First-run window, 50–118 s, per 2 s, very steady:** | | per 2 s | |---|---| | draws through the sync / with a mirror | 780 / 660 | | copies (whole buffers) | 1,200 (0) | | bytes copied | 10.5 MiB, in 2.5 ms | | indices scanned for the vertex range | 1.98 M, in 0.55 ms | | `readable()` calls (over 16 pages) | 1,800 (0), 1.3 ms when none is slow | | total time in the function | **4.7 ms** typically (~7 µs a mirrored draw), 9–18.6 ms with a slow `readable()` | What this means for each part: - **#2391 (counters):** I did these locally, with the counters described there. They produced the numbers in this comment. - **#2392 (`readable` per draw):** no range was over 16 pages, so the `VirtualQuery` fallback I expected for large ranges never fired. But in **18 of the 43** 2-s windows that had mirrors (34–118 s), a single `readable()` call on ≤16 pages took **1.1–8.8 ms**, most of them 4–5 ms. That is presumably `resident_and_readable` failing on a page that is not resident, followed by the `VirtualQuery` walk. It happens on the render thread inside a draw, so it is a hitch worth ~15 % of a 33 ms frame roughly every 4 s. This is the largest cost found here. - **#2393 (unchanged sources):** confirmed. The title does not rewrite these buffers: the sparse upload path finds the mirror pages unchanged (its uploaded total stays at 1,389–1,390 MB over 4,096 submits). Every copy and index scan is redundant: 5.3 MiB/s and ~1 M indices/s in menus. - **#2394 (sparse mirrors):** partly wrong as I wrote it. The mirror pages *are* 2,820 of the 3,630 write-watch dirty pages per 2 s (**78 %**). They are **not** uploaded again, though, because the sparse chunk hashes drop unchanged bytes. The cost is extra pages in the look and its chunk scan, which is small next to #582's per-look cost. Skipping unchanged copies (#2393) removes this as well, so #2394 is low priority. **Not measured:** the world (never reached), and any draw with instances (none here, so no whole-buffer copies). *Measured and written with Claude Code (Claude Opus 5.5).*
Author
Owner

@⁠KOLESNiii on GitHub · 2026-11-25 20:28 UTC · original

Result so far: the stack (#2416 → #2437 → #2478) makes the mirror sync slower on my title, not faster. #2478 is the reason.

Compared: bb01e85 (#2416's head, the counters on main 3f4495a) against 2bdfb90 (#2478's head, which holds #2437 too).

Setup:

  • RTX 2070 SUPER (32.0.16.2140), Ryzen 5 3600XT, Windows 11 26300, release builds.
  • Four scripts/smoke.ps1 runs of 120 s each, alternating bb01e85, 2bdfb90, bb01e85, 2bdfb90, each built from a clean tree of its commit.
  • Each run started without uma_coherent.txt, so the two mirrors of my first report are made (at 35–41 s).
  • Menus only. Numbers are the means of the XCL_ACTIVITY lines per 2 s once the mirrors exist (~40 windows a run).
bb01e85 run 1 bb01e85 run 2 2bdfb90 run 1 2bdfb90 run 2
frames shown (120 s) 2433 2451 1889 2056
draws through the sync 702 697 533 583
copies / KB copied 1,079 / 9,704 1,072 / 9,644 819 / 7,369 895 / 8,047
indices scanned 1.78 M 1.77 M 1.35 M 1.48 M
readable() calls, time 1,619, 29.6 ms 1,609, 24.5 ms 0 0
slowest readable() / windows with one over 1 ms 18.4 ms / 41 of 41 11.2 ms / 33 of 39 – –
time in the sync: median, mean, max 23.1, 33.3, 126 ms 21.8, 28.1, 116 ms 103.8, 101.2, 228 ms 41.4, 75.3, 243 ms
device removals / crashes 0 / 0 0 / 0 0 / 0 0 / 0

These are not comparable with my first report's numbers (4.7 ms in the sync per 2 s, 1.3 ms in readable()). This machine has been much slower since this afternoon, with a device hang on main as well. The four runs above were made back to back and alternated, so they compare with each other.

What each part did:

  • #2416 (counters): no change in behaviour. It is what makes these numbers visible.
  • #2437 (no readable() per draw): the stalls show up clearly in this state of the machine: 25–30 ms per 2 s, single calls of 11–18 ms, a call over 1 ms in almost every window. #2437 removes all of it. I have no run of #2437 alone from this session, so I can't say how much of that comes back as the cost of its fault-tolerant copy (ReadProcessMemory). In this morning's runs, on a faster machine, the total stayed the same: 4.74 ms before and after.
  • #2478 (copy only pages the write-watch says were written): this is a regression on this title. Copies fell only ~20 %, because the title rewrites these buffers every frame. A check against the source found no stale pages, and copies stayed at ~1,100–1,200 per 2 s; the bytes are the same, as found above. The GetWriteWatch call per draw costs more than the copies it saves. The sync time went up 2–4×, and frames fell 19 % (2433/2451 → 1889/2056), with the title also drawing fewer draws per 2 s.

Next:

  • #2478 should not be merged as it is. For a title that rewrites identical bytes, the write-watch can't tell a change from a rewrite.
  • A content comparison would fit this case: write the mirror only where its bytes differ, and reuse the vertex range when the index bytes are unchanged. That would cover the rest of #2393 and #2394.
  • #2437 needs a run on its own, after a restart, to show its net effect.

Not measured:

  • #2437 alone in this session, and any run after a restart.
  • The world, and draws with instances (none in these menus).
  • Other titles and other GPUs.

Measured and written with Claude Code (Claude Opus 5.5).

**@⁠KOLESNiii** on GitHub · 2026-11-25 20:28 UTC · [original](https://github.com/xcl-dev/xcl/issues/2389#issuecomment-7173733735) **Result so far: the stack (#2416 → #2437 → #2478) makes the mirror sync slower on my title, not faster. #2478 is the reason.** **Compared:** `bb01e85` (#2416's head, the counters on `main` 3f4495a) against `2bdfb90` (#2478's head, which holds #2437 too). **Setup:** - RTX 2070 SUPER (32.0.16.2140), Ryzen 5 3600XT, Windows 11 26300, release builds. - Four `scripts/smoke.ps1` runs of 120 s each, alternating `bb01e85`, `2bdfb90`, `bb01e85`, `2bdfb90`, each built from a clean tree of its commit. - Each run started without `uma_coherent.txt`, so the two mirrors of my first report are made (at 35–41 s). - Menus only. Numbers are the means of the `XCL_ACTIVITY` lines per 2 s once the mirrors exist (~40 windows a run). | | `bb01e85` run 1 | `bb01e85` run 2 | `2bdfb90` run 1 | `2bdfb90` run 2 | |---|---|---|---|---| | frames shown (120 s) | 2433 | 2451 | 1889 | 2056 | | draws through the sync | 702 | 697 | 533 | 583 | | copies / KB copied | 1,079 / 9,704 | 1,072 / 9,644 | 819 / 7,369 | 895 / 8,047 | | indices scanned | 1.78 M | 1.77 M | 1.35 M | 1.48 M | | `readable()` calls, time | 1,619, 29.6 ms | 1,609, 24.5 ms | 0 | 0 | | slowest `readable()` / windows with one over 1 ms | 18.4 ms / 41 of 41 | 11.2 ms / 33 of 39 | – | – | | time in the sync: median, mean, max | 23.1, 33.3, 126 ms | 21.8, 28.1, 116 ms | 103.8, 101.2, 228 ms | 41.4, 75.3, 243 ms | | device removals / crashes | 0 / 0 | 0 / 0 | 0 / 0 | 0 / 0 | These are not comparable with my first report's numbers (4.7 ms in the sync per 2 s, 1.3 ms in `readable()`). This machine has been much slower since this afternoon, with a device hang on `main` as well. The four runs above were made back to back and alternated, so they compare with each other. What each part did: - **#2416 (counters):** no change in behaviour. It is what makes these numbers visible. - **#2437 (no `readable()` per draw):** the stalls show up clearly in this state of the machine: 25–30 ms per 2 s, single calls of 11–18 ms, a call over 1 ms in almost every window. #2437 removes all of it. I have no run of #2437 alone from this session, so I can't say how much of that comes back as the cost of its fault-tolerant copy (`ReadProcessMemory`). In this morning's runs, on a faster machine, the total stayed the same: 4.74 ms before and after. - **#2478 (copy only pages the write-watch says were written):** this is a regression on this title. Copies fell only ~20 %, because the title rewrites these buffers every frame. A check against the source found no stale pages, and copies stayed at ~1,100–1,200 per 2 s; the bytes are the same, as found above. The `GetWriteWatch` call per draw costs more than the copies it saves. The sync time went up 2–4×, and frames fell 19 % (2433/2451 → 1889/2056), with the title also drawing fewer draws per 2 s. **Next:** - #2478 should not be merged as it is. For a title that rewrites identical bytes, the write-watch can't tell a change from a rewrite. - A content comparison would fit this case: write the mirror only where its bytes differ, and reuse the vertex range when the index bytes are unchanged. That would cover the rest of #2393 and #2394. - #2437 needs a run on its own, after a restart, to show its net effect. **Not measured:** - #2437 alone in this session, and any run after a restart. - The world, and draws with instances (none in these menus). - Other titles and other GPUs. *Measured and written with Claude Code (Claude Opus 5.5).*
Author
Owner

@⁠GXLD-N on GitHub · 2026-11-26 01:40 UTC · original

#2437 on its own, on a second machine: removing readable() saves about 1.1 ms of render-thread time per 2 s here, and the sync as a whole costs ~4 ms per 2 s. Frames don't move, because the menus are capped at 30 fps and the sync is ~0.2 % of the frame budget on this CPU.

This is the run of #2437 alone that #2389's last comment lists as not done, on different hardware.

Setup

  • RTX 4070 Ti SUPER 16 GB (driver 32.0.16.1088), Ryzen 7 7800X3D, 32 GB DDR5-6000, Windows 11 26300, Rust 1.100.0, release builds.
  • fdbb6fe (#2416's head, counters only) against c24fbbf (#2437's head, which holds #2416), each built from a clean tree of its commit.
  • Four scripts/smoke.ps1 runs of 120 s, alternating fdbb6fe, c24fbbf, fdbb6fe, c24fbbf. Each started without uma_coherent.txt, and there was no input (menus only).
  • Means of the buffer mirrors (2 s) lines from the first window with a mirror on (47–48 windows a run).
fdbb6fe run 1 c24fbbf run 1 fdbb6fe run 2 c24fbbf run 2
frames shown (120 s) 2,939 2,925 2,949 2,948
draws through the sync 778 765 764 764
copies / KB copied 1,197 / 10,757 1,177 / 10,577 1,175 / 10,563 1,175 / 10,559
indices scanned 1.98 M 1.94 M 1.94 M 1.94 M
readable() calls, time 1,795, 1.05 ms 0 1,763, 1.11 ms 0
slowest readable() (max over the run) 0.12 ms – 0.56 ms –
sync time in all 4.24 ms 3.69 ms 4.23 ms 4.26 ms
peak commit 14,781 MB 14,811 MB 14,808 MB 14,830 MB

No device removal and no crash in any run.

The four xcl-smoke blocks
xcl-smoke v1
commit: fdbb6fe7ec0027a5b0274364475f0204684a8c5e
gpu: NVIDIA GeForce RTX 4070 Ti SUPER
title: 333fa394
seconds: 120
exit: 0x0
frames shown: 2939 (PresentX 2939)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14781 MB
xcl-smoke v1
commit: c24fbbff5e1bcebfee2b24fd4399592664927da6
gpu: NVIDIA GeForce RTX 4070 Ti SUPER
title: 333fa394
seconds: 120
exit: 0x0
frames shown: 2925 (PresentX 2925)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14811 MB
xcl-smoke v1
commit: fdbb6fe7ec0027a5b0274364475f0204684a8c5e
gpu: NVIDIA GeForce RTX 4070 Ti SUPER
title: 333fa394
seconds: 120
exit: 0x0
frames shown: 2949 (PresentX 2949)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14808 MB
xcl-smoke v1
commit: c24fbbff5e1bcebfee2b24fd4399592664927da6
gpu: NVIDIA GeForce RTX 4070 Ti SUPER
title: 333fa394
seconds: 120
exit: 0x0
frames shown: 2948 (PresentX 2948)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14830 MB

What this shows

  • #2437 does what it says: no readable() calls, the same work otherwise (copies, KB and indices match within 2 %).
  • On this CPU readable() was cheap: about 1.1 ms per 2 s, never over 0.56 ms in a single call, and no calls over 16 pages. That is far from the 1.1–8.8 ms single calls (18.4 ms at worst) on the Ryzen 5 3600XT in #2389.
  • The sync time in all doesn't fall consistently: 3.69 and 4.26 ms with #2437 against 4.24 and 4.23 ms without. The ReadProcessMemory copy seems to cost about what the check saved here; two runs a side can't separate a 0.5 ms difference from noise.
  • Frames: no effect is measurable. The menus present at a steady 30 fps (60 a 2 s window) in all four runs, so a 2 ms/s saving can't show up there.

Not tested

  • The world, and draws with instances (none in these menus, so no whole-buffer copies).
  • #2478, and the stack as a whole.
  • A run after a reboot: "started without uma_coherent.txt" is the only restart here.
  • AMD GPUs and slower CPUs, where readable() costs more.

Measured and written with Claude Code (Claude Opus 5.5).

**@⁠GXLD-N** on GitHub · 2026-11-26 01:40 UTC · [original](https://github.com/xcl-dev/xcl/issues/2389#issuecomment-7180006770) **#2437 on its own, on a second machine: removing `readable()` saves about 1.1 ms of render-thread time per 2 s here, and the sync as a whole costs ~4 ms per 2 s. Frames don't move, because the menus are capped at 30 fps and the sync is ~0.2 % of the frame budget on this CPU.** This is the run of #2437 alone that #2389's last comment lists as not done, on different hardware. **Setup** - RTX 4070 Ti SUPER 16 GB (driver 32.0.16.1088), Ryzen 7 7800X3D, 32 GB DDR5-6000, Windows 11 26300, Rust 1.100.0, release builds. - `fdbb6fe` (#2416's head, counters only) against `c24fbbf` (#2437's head, which holds #2416), each built from a clean tree of its commit. - Four `scripts/smoke.ps1` runs of 120 s, alternating `fdbb6fe`, `c24fbbf`, `fdbb6fe`, `c24fbbf`. Each started without `uma_coherent.txt`, and there was no input (menus only). - Means of the `buffer mirrors (2 s)` lines from the first window with a mirror on (47–48 windows a run). | | `fdbb6fe` run 1 | `c24fbbf` run 1 | `fdbb6fe` run 2 | `c24fbbf` run 2 | |---|---:|---:|---:|---:| | frames shown (120 s) | 2,939 | 2,925 | 2,949 | 2,948 | | draws through the sync | 778 | 765 | 764 | 764 | | copies / KB copied | 1,197 / 10,757 | 1,177 / 10,577 | 1,175 / 10,563 | 1,175 / 10,559 | | indices scanned | 1.98 M | 1.94 M | 1.94 M | 1.94 M | | `readable()` calls, time | 1,795, 1.05 ms | 0 | 1,763, 1.11 ms | 0 | | slowest `readable()` (max over the run) | 0.12 ms | – | 0.56 ms | – | | sync time in all | 4.24 ms | 3.69 ms | 4.23 ms | 4.26 ms | | peak commit | 14,781 MB | 14,811 MB | 14,808 MB | 14,830 MB | No device removal and no crash in any run. <details><summary>The four <code>xcl-smoke</code> blocks</summary> ``` xcl-smoke v1 commit: fdbb6fe7ec0027a5b0274364475f0204684a8c5e gpu: NVIDIA GeForce RTX 4070 Ti SUPER title: 333fa394 seconds: 120 exit: 0x0 frames shown: 2939 (PresentX 2939) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14781 MB ``` ``` xcl-smoke v1 commit: c24fbbff5e1bcebfee2b24fd4399592664927da6 gpu: NVIDIA GeForce RTX 4070 Ti SUPER title: 333fa394 seconds: 120 exit: 0x0 frames shown: 2925 (PresentX 2925) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14811 MB ``` ``` xcl-smoke v1 commit: fdbb6fe7ec0027a5b0274364475f0204684a8c5e gpu: NVIDIA GeForce RTX 4070 Ti SUPER title: 333fa394 seconds: 120 exit: 0x0 frames shown: 2949 (PresentX 2949) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14808 MB ``` ``` xcl-smoke v1 commit: c24fbbff5e1bcebfee2b24fd4399592664927da6 gpu: NVIDIA GeForce RTX 4070 Ti SUPER title: 333fa394 seconds: 120 exit: 0x0 frames shown: 2948 (PresentX 2948) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14830 MB ``` </details> **What this shows** - #2437 does what it says: no `readable()` calls, the same work otherwise (copies, KB and indices match within 2 %). - On this CPU `readable()` was cheap: about 1.1 ms per 2 s, never over 0.56 ms in a single call, and no calls over 16 pages. That is far from the 1.1–8.8 ms single calls (18.4 ms at worst) on the Ryzen 5 3600XT in #2389. - The sync time in all doesn't fall consistently: 3.69 and 4.26 ms with #2437 against 4.24 and 4.23 ms without. The `ReadProcessMemory` copy seems to cost about what the check saved here; two runs a side can't separate a 0.5 ms difference from noise. - Frames: no effect is measurable. The menus present at a steady 30 fps (60 a 2 s window) in all four runs, so a 2 ms/s saving can't show up there. **Not tested** - The world, and draws with instances (none in these menus, so no whole-buffer copies). - #2478, and the stack as a whole. - A run after a reboot: "started without `uma_coherent.txt`" is the only restart here. - AMD GPUs and slower CPUs, where `readable()` costs more. *Measured and written with Claude Code (Claude Opus 5.5).*
This discussion has been locked. Commenting is limited to contributors.
No description provided.