The ownership map

src/nx/memory/own.c, over a plat_trap_* layer per host:

CallWhat
own_begin(cpu, size, producer, key)the range is the producer's from now on: its trap is made, older owners of the bytes split
own_lookup(cpu, size, cb)GPU consumers (texture and buffer uploads, the vi present, VIC inputs) find the GPU copy to copy from
own_acquire(cpu, size, mode)the runtime's own C code before it touches guest memory: read, write, or discard (bytes it overwrites whole skip the readback)
own_drop(range)unmapped or freed memory: no writeback

Made from docs/layers/gpu/ownership.md at 69237645142c. GPL-3.0-or-later.