Files
metal2vulkan/crates
Anees Iqbal 7edbf84c8f rt: a barrier between dispatches reaches dispatches only
A barrier a segment records between its dispatches (at a hazard in a serial encoder, at
memory_barrier, after a write through an address outside every resource, and the one an encoder
that wrote owes the next dispatch) took every command as both scopes: all commands' memory writes,
made visible to all commands' reads and writes. A segment records nothing else that touches memory
(its other commands are the timestamps), so the barrier now takes compute shader writes as its first
scope and compute shader reads and writes and indirect argument reads as its second
(Reach::Dispatches): the stages and accesses a dispatch has, decided by what the segment records,
with no query. The barrier at a segment's end, the upload's and the fill's keep every command.

The test recorder, which records fills and copies, keeps the wide barrier for the owed one before
its commands, and is not followed by a dispatch in any test.

Timed as a probe on the barrier redesign (M2V_PROBE_NARROW_BARRIER, m3-max-42031 to 42036, 42040),
dispatch_chain (512 serial dispatches on one buffer) steady time: 780M Phoenix 509 -> 333 us and
Hawk Point 529 -> 333 us (-35%), XTX 523 -> 492/505, equal on the 2080, 3090, RX 550 and UHD 630;
the 160-command-buffer row lower on both 780Ms and equal elsewhere. Slower on none.
2026-11-17 12:57:25 -08:00
..