From b20fb4a89d160bcd447ffc2f32090efaff09ea00 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Thu, 26 Nov 2026 01:40:45 -0800 Subject: [PATCH] Translator tests: the mechanism table covers RuntimeFact::RobustStorageBuffers Its pipeline state, the consumer's VkPipelineRobustnessCreateInfo. Clippy of the workspace's tests stopped at the two exhaustive matches (job m3-max-75002, a CPU build). --- crates/metal2vulkan/src/device/tests/mechanism.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/metal2vulkan/src/device/tests/mechanism.rs b/crates/metal2vulkan/src/device/tests/mechanism.rs index b819373e1..62b7d5132 100644 --- a/crates/metal2vulkan/src/device/tests/mechanism.rs +++ b/crates/metal2vulkan/src/device/tests/mechanism.rs @@ -199,6 +199,7 @@ fn every_fact() -> Vec { }, RuntimeFact::PrivateArena { slot_bytes: 28_704 }, RuntimeFact::StencilBitDraws, + RuntimeFact::RobustStorageBuffers, ] } @@ -292,6 +293,7 @@ fn variant(f: &RuntimeFact) -> usize { RuntimeFact::GridTiles => 50, RuntimeFact::PrivateArena { .. } => 68, RuntimeFact::StencilBitDraws => 85, + RuntimeFact::RobustStorageBuffers => 86, } } @@ -299,7 +301,7 @@ fn variant(f: &RuntimeFact) -> usize { fn mechanism_is_total_over_every_fact_and_profile() { let facts = every_fact(); let covered: std::collections::BTreeSet = facts.iter().map(variant).collect(); - assert_eq!(covered, (0..86).collect(), "every_fact misses a variant"); + assert_eq!(covered, (0..87).collect(), "every_fact misses a variant"); for (stem, _) in super::committed_profiles() { let dev = device(&stem); let p = dev.profile(); @@ -423,6 +425,7 @@ fn mechanism_is_total_over_every_fact_and_profile() { | RuntimeFact::PrivateArena { .. } | RuntimeFact::StencilBitDraws => Mechanism::PushConstant, RuntimeFact::AliasedImageblock { .. } => Mechanism::None, + RuntimeFact::RobustStorageBuffers => Mechanism::PipelineState, RuntimeFact::CallStackDepth { .. } | RuntimeFact::OpenClMode => Mechanism::None, }; assert_eq!(m, expected, "{stem}: {fact:?}");