diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 14:47:29 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 14:47:29 -0500 |
| commit | 84db5cd02736759eab9ffb4deedc98c52027c050 (patch) | |
| tree | 115e98973ad46f1c4494eeaa991b8df358a3e88d /runtime/src/tls_host.cpp | |
| parent | 2d43417d49fdd8f2d8241f75ea8fd0cdd8811137 (diff) | |
d3d12: console heap slots record what their V#s resolved to; a release re-fixes only the slots naming it (RT-VSHARP-SLOT-RECORDS)
After any arena release, title-window or geometry block destroyed, or alias change, the next submission walked
every live V# slot of the console heap (about 580,000 in world runs), reading each from the copy in ReBAR VRAM:
1.1-1.5 s a walk whatever the scene, about 2.9 s of a 4.6 s frame. It existed only because nothing recorded
which slot resolved into which backing.
Each V# half of a console resource heap's copy now has a record in host RAM (src/console_heap_slot_records.h):
the title's base and span, the device address its copy names, and whether it resolved or waits. Two indexes
(by base, by target; per power-of-two span class and 64 KiB-or-larger granule) find the halves near a range.
fix_console_slot, the only writer of a slot's copy, writes them; a zeroed range, a deferred slot and a
rewritten slot drop theirs; a destroyed heap takes them with it.
Releases (backing(), title_block_gone), alias ranges removed or replaced (TitleVaAliases tells its listeners
as it happens, forget_copy included) and additions (backings, alias ranges, title memory) go on an unbounded
per-device list. refresh_console_heaps takes it whole; every heap re-fixes exactly the slots it touches: a
release or removal every half naming the range, an addition the waiting halves over it. A new heap log line
gives the changes, slots looked at, slots fixed again and ms per submission.
Removed: the live_vsharps walk and its bitset (console_heap_vsharp_slots.h and its test), the release
generation checks (released_backings, TitleVaAliases::invalidations), LEONIDA_CONSOLE_RELEASE_FILTER, the
4,096-entry DescriptorRangeChanges ring with its full-sweep overflow and changed_ranges(), the empty-slot probe
and retry_unmapped_slots (unreachable: nothing set its flag). LEONIDA_CONSOLE_GPU_FILTER now defaults to unset
instead of the removed variable's value. The T# retries (retry_console_slots) stay.
Tests: console_heap_slot_records_test (portable): releasing a buffer 10 of 60,010 slots name looks at 10
entries and fixes 10 slots; an alias moved, removed and added back; overwritten and zeroed slots; partial
overlap; two slots on one backing; a buffer back; a refused alias copy backed later; a large span; a destroyed
heap; and 400 random rounds compared with a full re-resolution of every slot. d3d12_unmapped_vsharp_test now
expects all 128 waiting slots restored at the first submission after their alias comes (was: 16 by the probe in
64 submissions), none after it goes, and the slots naming a released buffer null. title_va_alias_test and
geometry_views_test check the listener in place of the ring.
Linux ctest 113/113; Windows suite under Wine (clang-cl, iGPU, RADV) equal to main 2d43417d4 test by test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/tls_host.cpp')
0 files changed, 0 insertions, 0 deletions