Files
metal2vulkan/crates/metal2vulkan-runtime/src/compute
Anees Iqbal 45d69aff80 Dispatches keep their uses' storage and list no group counts outside predication
host_ab percall's gate holds a dispatch to 8.2 heap allocations a call (8.13 measured on the
M3 at the 11-03 re-bless). At a1ca5c673f a scratch allocation-site probe of the gate's
dispatch group (256 dispatch_threadgroups of tiny_kernel, nothing changed between them) counts
10 a call in steady state on the M3 Max (MoltenVK) and on gem10's RX 7900 XTX (RADV) alike, so
the gate fails on its own venue: the same ten sites in compute::record on both.

Two of them rebuilt per call what nothing needed rebuilt:

- binding::command_uses made each dispatch's uses in a CommandUses of its own (its uses, the
  sources added on 11-03 for patching a draw's buffer uses, and the plan's other uses: 3
  allocations), where a draw makes them over the last draw's storage, keeping those of what the
  encoder made resident (command_uses_into, LiveBind::uses). An encoder's own dispatch now
  does the same over LiveDispatch::uses; an indirect command's state still makes them whole.
- record listed every region's group count for predication.gates, which answers none outside
  a unit that gates dispatches: the counts are listed only where
  Predication::gates_dispatches says the unit gates them.

The uses a dispatch records, its gates and its commands are unchanged: command_uses_into is
the draws' path, whose builds with debug assertions check the kept uses against those made whole
at every command.

(cherry picked from commit 3ed927ecda1e395550b54db0c3b237827e45d3eb)
2026-11-08 14:31:46 -08:00
..