Files
metal2vulkan/crates/metal2vulkan-runtime/examples
Anees Iqbal 2af00f020b dispatch_chain: --heap-churn, --heap-kept, --live and --binds ptr, timed per command buffer
The host's time takes --heap-churn K: each command buffer makes K buffers in
an automatic Private heap of the example's own before it encodes, its
dispatches take them as the two read-only buffers, and they are let go after
it completed, as a program that takes a command buffer's scratch from a heap
does (Geekbench's Super Resolution, through MPS: about 3.3 heap buffers made
and 2.8 freed a command buffer). --heap-kept H places H more buffers in that
heap and --live L makes L of the device's own, living through the runs.
HOST-CB prints the calling thread's ns per command buffer by phase (make,
place, encode, commit, free) and each thread group's CPU, the scheduler's
among them. (--heap, compenc's, places the words and zeros in a heap over
host pages; the two combine.)

--binds ptr runs bump_ptr, bump_wide with its first zero buffer read
through an address the dispatch sets as bytes (a Holder of one pointer, as
an argument buffer holds it): its command buffers take a root table, and
the device's resident set of its live buffers resolves the load
(live_buffers.rs), so the live table is made at each command buffer while
the list changes each one.

These are steelbrain/livebuf's a4709341d7 and 9a6dceb14b on development,
renamed beside compenc's --heap (bc1580095c). Verified: before and after of
the listing fix (RUNTIME 2271) ran a4709341d7's form on lavapipe (commit ns
per command buffer at 2048 kept heap buffers: 73.7 us before, 13.9 after);
this form is built and run on lavapipe in the lane's sweep job (report).
2026-11-14 01:55:12 -08:00
..