diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-25 23:33:21 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 09:07:51 -0500 |
| commit | 36771ec53dc3769a75be6b0b878b9868e9648fdb (patch) | |
| tree | 909458afb9cba16f700838bc096bd417b8bd1e54 /runtime/src/vulkan_aftermath.cpp | |
| parent | acd9f98c1f751fda83df958c869bc91e2770fccc (diff) | |
d3d12: geometry copies in system memory, and retired when the title remaps their pages
Geometry copies held 4.4-6 GB of VRAM in world runs and were never evicted: a view retired only when its range was
freed, decommitted or unmapped, and the title streams by remapping the frames of its pools.
- LEONIDA_GEOMETRY_HOST (unset by default): 1 puts the copies in system memory outside VRAM, write-back where the
device offers a cached host type; 2 write-combined. The memory type is picked among the host-visible types that are
not device-local (memory_type_order alone would give the BAR first); a device with none keeps its types. Logged once
and in the geometry buffers line.
- LEONIDA_GEOMETRY_REMAP_RELEASE (on by default, 0 off): XMemMapPhysicalPages with pages, the scatter call and
CopyPageMappingsBatchX report the pages whose frame changed (or went) as released (xmem's RemapReleases, collected
under the fault lock, reported after it), so GeometryViews retires the copies over them through #2094's
drain_released and kAfterExecutes reaping. A page mapped again to its own frame is no change.
- A retired view is copied once more from its pages when they are readable: a list recorded before a remap that took
the view's address reads the new bytes, as the refresh this replaces would have given it.
- A stream-pool extent backed by a retired copy leaves pool_spans (it was kept for the device's life).
- A full release queue joins touching ranges before it collapses into one covering range.
Tests: geometry_views_test cases 14-16, xmem_test test_remap_releases.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/vulkan_aftermath.cpp')
0 files changed, 0 insertions, 0 deletions