diff --git a/crates/metal2vulkan-harness/src/run.rs b/crates/metal2vulkan-harness/src/run.rs index 613ab251f..7bcb0bfe7 100644 --- a/crates/metal2vulkan-harness/src/run.rs +++ b/crates/metal2vulkan-harness/src/run.rs @@ -149,7 +149,8 @@ pub struct Report { /// Each timed run's host wall time, from the start of its encoding until the wait for the run /// before it returned, in microseconds: with two runs in flight, the time each run adds. The /// 100th and 200th runs' times leave out the wait for the device to go idle that reads the - /// gauges. + /// gauges, and an untimed run follows that wait, so the next timed run waits for a run in + /// flight, as every other does. pub wall_us: Vec, /// The runtime's counts of its work ([`Device::counts`]) over one run after the timed ones, /// committed alone and waited for, so nothing else is in flight. @@ -916,6 +917,12 @@ impl Session for Harness { // work in flight at that moment, which moves with completion timing. wait_run::(&in_flight)?; report.gauges.push((run, self.device.gauges())); + // An untimed run, so two are in flight again: the next timed run's wait is then + // for a run the GPU was running, not for this idle device's last one, whose wait + // returns at once and would time the encoding alone. + if run < runs.timed { + self.next(plan, &made, &mut in_flight, None)?; + } } } wait_run::(&in_flight)?;