From 79f89e620e7ae5dce215cccdcc777ffe95a90747 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Thu, 12 Nov 2026 17:11:19 -0800 Subject: [PATCH] The held-work recovery test fills a buffer of the new generation after it What: work_held_unsubmitted_at_a_loss_fails_as_its_victims_in_queue_order fills a Shared buffer made after the recovery with each queue's later command buffer, not the one made before it. Why: a pooled Shared buffer made before a recovery may be left on the lost generation (MadeBeforeRecovery), and the later fill's encoding refused it (lane 23377, device_recovery.rs:106, at the test and the fix commits alike). Verified: the lane that follows runs the test before and after the fix. --- crates/metal2vulkan-runtime/src/tests/device_recovery.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/metal2vulkan-runtime/src/tests/device_recovery.rs b/crates/metal2vulkan-runtime/src/tests/device_recovery.rs index 9216628fd..baee20990 100644 --- a/crates/metal2vulkan-runtime/src/tests/device_recovery.rs +++ b/crates/metal2vulkan-runtime/src/tests/device_recovery.rs @@ -349,8 +349,10 @@ fn work_held_unsubmitted_at_a_loss_fails_as_its_victims_in_queue_order() { } } device.recover_for_test().unwrap(); + // A buffer of the new generation: a pooled `Shared` buffer made before may be left there. + let after = device.new_buffer(4096, ResourceOptions::shared()).unwrap(); for (at, queue) in queues.iter().enumerate() { - let later = filled_by(queue, &filled); + let later = filled_by(queue, &after); handled(at, 2, &later); later.commit().unwrap(); assert_eq!(outcome(&later), (CommandBufferStatus::Completed, None));