aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/gpu_split.cpp
diff options
context:
space:
mode:
authorTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-30 09:10:10 -0400
committerTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-30 09:13:53 -0400
commitc7dffce68ad2678c9998045191991e1a6c8b228a (patch)
tree7aa9ecd3fd9f2d0a64992f2bee5d10c8a7349d53 /src/video_core/gpu_split.cpp
parent7f328339ddd2ba928856c29326e544f7aeeb9779 (diff)
dynarmic: keep the x64 JIT's per-block tables compact
Each emulated core has its own JIT, and Mario Kart World runs six. After three minutes of its title screen and attract demo, their bookkeeping held ~1.65 GB besides ~470 MB of compiled code, mostly empty slots: - patch_information: four small_vectors of code pointers per linked block (232 bytes a slot), and Patch() added an entry for every block compiled, linked or not (~800 MB); - block_ranges: an interval map with a hash set per segment (~300 bytes a block, ~460 MB) to answer invalidations, which only come when code is unmapped or reprotected; - fastmem_patch_info: 48 bytes per fastmem access in a hash map (~340 MB). Patch locations are now offsets into the code space with the patch kind in the low two bits, two inline and the rest in a vector, and Patch() no longer creates entries. Block ranges are a flat list scanned on invalidation (also dropping the invalidated blocks' ranges, the old TODO). Fastmem patch information is a list sorted by code offset (code is emitted in address order, so inserts are appends) with 24-byte entries, looked up by binary search when an access faults. Mario Kart World, 180 s: resident private memory at 150 s 6195 -> 4777 MiB, peak commit 16.0 -> 14.4 GB; frames and frame times unchanged.
Diffstat (limited to 'src/video_core/gpu_split.cpp')
0 files changed, 0 insertions, 0 deletions