Files
reims-vgpu/docs/graphics-kext
Anees Iqbal 4a69d0b372 🐎 Draw and sample each IOSurface plane in its one shared block
Each process kept its own copy of every surface plane it used, synced through
the surface's pages: a drawable rendered in one process and composited in
another cost a full-plane write-back at the render's completion and a
full-plane upload before the compositor's commit, 1.8 ms of guest CPU a frame
for one 1080p surface on the 5080. Every process now takes the plane's shared
block from the kext, so one process's GPU writes reach another's GPU with no
copy. A header in the block holds the surface's seed as of the last sync,
which every holder reads and writes, so a plane is uploaded only after a CPU
write that no holder has synced yet. The write-back at completion stays until
a lock callback reaches the bundle. Where the kext gives no shared block, the
process keeps its own as before. IOSurface's use count is left untouched, as
Metal leaves it (measured on an M3 Max).
2026-11-05 21:58:31 -08:00
..