Files
metal2vulkan/docs
Anees Iqbal 49215a4b4d RUNTIME 2284: live-buffer tables rebuild only a changed chunk's part, and share an unchanged set
A command buffer's live-buffer table (the resident set every heap-reaching pipeline's root table
names) was rebuilt from the whole sorted list at every commit: ResidentSet::new over ~2-4k listed
buffers, sort and bytes, 77% of commit_and_submit on the SR-shaped chain.

- Translator: bind::ResidentPart and ResidentSet::of_parts (new public items). resident_set is split
  into sort + fold; `joined` joins parts at their heads and re-sorts any parts whose ranges
  interleave, so the joined set equals the set of all their ranges.
- Runtime: each SortedChunks chunk keeps its derived part (a OnceLock, dropped when the chunk
  changes or goes). A table joins the parts. A table whose parts equal the last table's (pointer
  first, value only where the pointer differs) shares that table's LiveSet (set + uploaded buffer)
  and writes nothing. Inner.spare becomes Inner.last: Option<Arc<LiveSet>>, kept only while a
  buffer is listed and dropped at close(), as the spare was. Parts hold no buffers.
No translation output change; no Degradation kind or WorkCounts field.

Verified (livebuf2, msi): tip check m3-max-28960: clippy -D warnings --all-targets --all-features on
the translator and the runtime 0; translator tests 33/33 (resident, including the property test
a_set_joined_of_parts_is_the_set_of_their_ranges, 4000 random lists, >1000 interleaving;
api_surface; api_signatures); runtime tests on lavapipe 13/13 (sorted_chunks with
the_set_joined_of_the_chunks_parts_is_the_set_of_the_list, 6000 random changes, cached == fresh
each step; heap_reach_once now asserts a table after a buffer placed where a gone one lay shares the
earlier set and upload; device_recovery_live_table; live_bind; pending_rebind; rebind_behind_a_wait).
Release A/B m3-max-28959 (lavapipe, own target dirs, md5 a5be4364 base / 99dc49d3 tip, one run
each): commit ns per CB sr-2k 27423 -> 13754, sr-4k 45865 -> 20896 (noisy: a build shared the
host). LiveBuffers::table 77% -> 26% of commit_and_submit. Lint and the suites run after landing.
2026-11-14 04:24:52 -08:00
..