From 3df4f73d9cfcdcd578e2789ddf59143b5f207ad9 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Wed, 18 Nov 2026 00:03:12 -0800 Subject: [PATCH] rt draw tests: the triangle test runs the new target's upload in a submission apart before it counts Legs 44820-44823 counted four barriers on every device where the test asked three: the upload that moves the freshly made target to its home layout led the measured submission, with its own barrier. The pass tests already run an empty command buffer first; this test now does the same, so it counts the pass's two barriers and the segment's end alone. --- crates/metal2vulkan-rt/src/tests/draw.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/metal2vulkan-rt/src/tests/draw.rs b/crates/metal2vulkan-rt/src/tests/draw.rs index 4683d4e29..18c4a39c3 100644 --- a/crates/metal2vulkan-rt/src/tests/draw.rs +++ b/crates/metal2vulkan-rt/src/tests/draw.rs @@ -266,6 +266,10 @@ mod on_device { TextureUsage::RENDER_TARGET, ); let queue = device.new_command_queue(4).expect("a queue"); + // The upload that moves the new target to its home layout, in a submission apart. + let first = queue.command_buffer().expect("a command buffer"); + (first.record_for_test(&[], |_, _| {})).expect("a command buffer's commands"); + run(name, &first); let counters = device.counters(); settled(&device); let before = counters.metrics();