Files
metal2vulkan/crates/metal2vulkan-runtime/examples
Anees Iqbal 9dc44438fa RUNTIME 2388: WorkCounts count the uses a compute dispatch's tracking walks
What: two default-on counts, one relaxed add each per compute dispatch that records (compute.rs,
before its command_reaching or command_later): the dispatches whose uses hazard tracking took, and
those uses (each resource range the command reads or writes, those reached through what the
encoder made resident among them). Uses over dispatches is what a dispatch's tracking walks
(command_reaching, track, order_as, touch_reaching). Listed in the host_ab example's counts; the
dispatch_work lane test asserts four tracked dispatches of at least two uses each.

Why: a guest compute benchmark's dispatches cost 7 to 38 us each on a Radeon 780M, most of it
inclusive under command_reaching, track, settle_live and order_as, which scale with the uses a
dispatch reaches; the repository's dispatch bench reaches 5 and costs about 1.2K instructions
there. No count said how many uses the costly dispatches reach (dispatch_used_resources_listed
counts listings of what an encoder made resident, not uses per dispatch).

Verified: m3-max-33750 (msi) at the lane tip b7ed24d9a8: clippy (runtime + validation, all targets, all
features) 0; lavapipe runtime_lane::dispatch_work passes (4 dispatches tracked 8 uses, push and bind devices).
clippy m2v_gpu / m2v_cpu_icd and rustdoc follow.

Public surface: WorkCounts (for the lanes) gains dispatches_tracked and dispatch_uses_tracked, blessed in
api_signatures.tsv; a struct literal of WorkCounts must name them, Default and readers are unaffected.
2026-11-15 14:45:43 -08:00
..