A rate-mapped pass records each draw once per region of its map, each with its own viewport and
scissor. On ANV (Mesa 26.2.6, Iris Xe) every such draw takes about 100 bytes of a device-wide
dynamic state pool of 1 GiB. A command buffer holds what its recording took until it is begun
again, reset or freed, and spare pools kept their command buffers' recordings for later takers.
A guest's ICB passes over a rate map, replayed by host steps at about 880k draws a step, filled
the pool with four command buffers alive. The core showed the "dynamic pool" block pool at its
1 GiB maximum, one command buffer holding 97.5 MiB of it, and its batch status
VK_ERROR_OUT_OF_DEVICE_MEMORY. ANV then wrote the next SF_CLIP_VIEWPORT through a null state
inside vkCmdDrawIndexed, and QEMU took a SIGSEGV.
A command buffer now counts the draws its recordings record (its host steps' included) with the
state commands they set (CommandBuffer::recorded, counted at render.rs's draw loop). Where the
count reaches spares::RECORDED (65,536), each pool it gives back sheds every command buffer it
holds, freed on the device's free thread as an idle spare's are, and rejoins the spares stocked
with a secondary. Below the bound nothing changes. The rerun check's pool passes its command
buffer's count. A kept chunk's pool passes 0, since its draws count in the command buffer that
recorded them.
Counted: WorkCounts::spare_command_buffers_freed_past_recorded (api_signatures.tsv). FAST-PATHS
records the gap that remains: command buffers alive at once that record enough to fill the pool
by themselves.
Tests: tests::spares::device::a_command_buffer_that_recorded_much_frees_its_pools_command_buffers
(lavapipe). The opt-in Iris probe runtime_lane::rate_mapped_volume (m2v_gpu_hazards) prints the
new count per round.