Commit Graph

1 Commits

Author SHA1 Message Date
3233b9857f d3d12: track live console-heap V# slots in a host-RAM bitset
When released_backings or title_va_aliases().invalidations() advances,
refresh_console_heap() previously scanned all 32-byte slots of heap.copy
linearly to find live buffer V#s (!(w[3] >> 30) && (w[2] || w[6])). When
heap.copy sits in arena.mapped (uncached write-combined GPU memory), each
buffer release triggered ~180k uncached PCIe reads across a 5.5 MiB heap.

Add a portable host-RAM bitset (leonida::ConsoleHeapVsharpSlots in
runtime/src/console_heap_vsharp_slots.h) updated at every resource-heap
write to heap.copy (fix_console_slot, deferred fix_over zeroing,
for_each_zeroed, and add_console_heap reset), and iterate only live V#
slots during invalidation passes (0 reads from heap.copy; 64 slots skipped
per word via std::countr_zero).

Item: RT-CONSOLE-HEAP-VSHARP-BITSET
2026-11-25 17:20:50 +01:00