From 418ff4c348d7b0ca09fd120c51b62fd478cd2d79 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Fri, 27 Nov 2026 01:22:20 -0800 Subject: [PATCH] rt tests: the over copy layouts test shows layouts by number, as ash's ImageLayout has no Debug here The test at 3df886d8f1 did not compile on lavapipe (job m3-max-76429): ash::vk::ImageLayout implements no Debug in this build. Its print and assertion messages now show each layout's number (VkImageLayout). --- .../metal2vulkan-runtime/src/tests/layouts.rs | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/crates/metal2vulkan-runtime/src/tests/layouts.rs b/crates/metal2vulkan-runtime/src/tests/layouts.rs index c7798b671..17fc58300 100644 --- a/crates/metal2vulkan-runtime/src/tests/layouts.rs +++ b/crates/metal2vulkan-runtime/src/tests/layouts.rs @@ -1310,23 +1310,27 @@ mod on_device { _ => {} } } - println!( - "over copy layouts: {name}: copies in from {into:?}, back from {back:?}, home {:?}", - over.home - ); + // Each layout by its number (`VkImageLayout`). + let shown = |froms: &[Option]| -> Vec> { + froms + .iter() + .map(|from| from.map(vk::ImageLayout::as_raw)) + .collect() + }; + let (ins, backs, home) = (shown(&into), shown(&back), over.home.as_raw()); + println!("over copy layouts: {name}: copies in from {ins:?}, back from {backs:?}, home {home}"); assert!( into.len() >= 2 && !back.is_empty(), - "{name}: two copies in and a copy back: in {into:?}, back {back:?}" + "{name}: two copies in and a copy back: in {ins:?}, back {backs:?}" ); assert!( into.iter() .all(|&from| from == Some(vk::ImageLayout::UNDEFINED)), - "{name}: each copy in from undefined: {into:?}" + "{name}: each copy in from undefined (0): {ins:?}" ); assert!( back.iter().all(|&from| from == Some(over.home)), - "{name}: each copy back from home {:?}: {back:?}", - over.home + "{name}: each copy back from home ({home}): {backs:?}" ); let after = moves(handle); assert!(