diff --git a/crates/metal2vulkan-runtime/README.md b/crates/metal2vulkan-runtime/README.md index 31053c0bf..2b934229b 100644 --- a/crates/metal2vulkan-runtime/README.md +++ b/crates/metal2vulkan-runtime/README.md @@ -2710,6 +2710,27 @@ while the driver's exit handler waited on a lock, with every runtime thread alre commit order (167 to 222 ms later) when no queue is marked, and starts it 0.4 ms after its commit beside the running command buffer when the busy queue is marked to a lower GPU priority (8 of 8, job m3-max-68129); its Radeon Pro 5300M ran both queues' work at once (job m3-max-68137). +- A command buffer that waits for an event's value runs after the whole command buffer that + signals it, not just after the signal. The signaller's later segments reach the one `VkQueue` + ahead of the waiter, and the barrier ending each segment orders every later command after them. + So a wait that a signal early in another queue's long command buffer meets, or that a host set + meets while such a command buffer runs, stalls for the rest of that command buffer. Metal's + documented order asks only that the waiter run after the signal. Measured with a command + buffer on one queue that runs a short dispatch, signals an `Event` and then dispatches for about + 100 ms, and a command buffer on another queue, committed after it, that waits for the signal + and then runs one short dispatch over buffers of its own, five rounds each. The waiter started + this long after the signal, in every round within 0.11 ms of the signalling command buffer's + end: + - 99.2 to 100.8 ms on an RTX 2080 (job m3-max-79162); + - 99.6 to 99.7 ms on a Radeon 780M with RADV (job m3-max-79142); + - 28.8 to 46.0 ms on an Iris Xe with ANV, where the signalling command buffer ran 28 to 46 ms + (job m3-max-79143); + - 110.5 to 110.9 ms on lavapipe, with the waiter over the signaller's buffers (job + m3-max-79126). + + Waiting instead for a `SharedEvent` that the host set just after both commits, the waiter + started when the other command buffer ended: 100.9 to 101.0 ms after the set on the RTX 2080, + 100.5 to 101.4 ms on the 780M, 28.5 to 29.0 ms on the Iris Xe and 110.3 to 111.0 ms on lavapipe. - On NVIDIA each submission pays the driver's latency per submission. The runtime submits each command buffer as soon as it can, so short command buffers committed back to back reach the GPU in several submissions: on an RTX 2080 (harness row `frame_5cb`: five short command buffers a