Files
reims-vgpu/docs/graphics-kext
Anees Iqbal 5260a14032 🔥 Copy read-only memory whole at each commit, with no compare
A copy of read-only memory kept a base, compared every page with it at each
commit that used it, and at completion compared again to drop the GPU's
writes. The owner's rule is no compare-and-skip on read-only copies: memory
that is not provably unchanging is copied whole at each commit that uses it.

What the guest sees: the GPU's writes to read-only memory are still dropped,
as Metal's are, but now at the next commit that uses the memory, when its
bytes are written into the range again, not at the completion of the command
buffer that wrote them. A command buffer that writes read-only memory still
in flight when another commit uses it has those writes overwritten. The
writable memory and the writable shadows keep their merge, unchanged.

On the host (rt, copied.rs): a dropping copy keeps no base, copies all of its
pages at each commit, does nothing at completion, and no longer holds its
command buffer's handlers back. Counted for each kind (writable, read-only,
unchanging): rt-copied-*-commits, the bytes (writable-compared-bytes,
read-only-copied-bytes, and restored-bytes, as before) and rt-copied-*-sync-ns,
and the read-only commits and bytes by the block's why
(rt-copied-read-only-why-N-*), which the surface pages' import hands the
copy.

In the bundle (RgfxMemoryShadow): a read-only shadow keeps no agreed copy and
is copied whole at each sync. The process's commits, write-backs, bytes and
time for each kind are logged as "RGFX: memory shadows, totals" within a
minute of a change.
2026-11-20 10:45:23 -08:00
..