upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/shims/xmem.cpp
diff options
context:
space:
mode:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-27 05:16:43 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-27 05:16:43 -0500
commitb4a6c3673aae1121559da4a5eba0c3b7ada70045 (patch)
tree940494f1860d09dc97622d122ae16bd822734ff7 /runtime/shims/xmem.cpp
parent63bb5d1488a589a09a786783db90ea23d64799ca (diff)
page mirror: a range's pages bound at a second address, and a filter on the fill path (for heaps read in place)
Two additive hooks in src/title_mirror.h for console descriptor heaps read in place; nothing changes for a mirror that uses neither. - alias(lo, hi, buffer, offset) / unalias(lo): the pages of [lo, hi) are also bound into `buffer` at offset + (va - lo), follow their remaps and unmaps, and go in the same bind batches as the chunk binds, so the one wait (VulkanContext::note_mirror_bind) orders a reader of either address. A heap uses it to be read below 4 GiB of the arena, where 32-bit descriptor-table pointers reach. Pages not mapped stay unbound there and read zero. - filter_range(lo, hi) / unfilter_range(lo) and TitleMirrorHooks::filter: the home of a page in a filtered range is filled through the filter (the title's bytes in, what the GPU reads into the home), fresh when the home is made or its filter changes, not fresh on a refill after a write (the home then holds the filter's last output). The title's bytes are never written: the filter writes the home only, which is the mirror's own GPU memory. A home shown at a filtered and an unfiltered address holds the filtered bytes; when the filtered address goes it is filled as a copy again. home_bytes(va) gives a mapped page's home for writing one changed slot between fills. The counters count filtered fills. Test: title_mirror_hooks_test (no GPU, fake handles): binds into the second buffer with the chunk binds, after a map, a remap and an unmap, and none after unalias; filtered fills fresh and not, a copy outside the range, a home shown twice, refiltering a mapped page, unfiltering, and the title's bytes unchanged. vk_title_mirror_test passes as before (Ryzen 9 7950X3D iGPU, RADV, Mesa 26.3.1, under validation). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/shims/xmem.cpp')
0 files changed, 0 insertions, 0 deletions