diff --git a/crates/metal2vulkan-runtime/src/ycbcr.rs b/crates/metal2vulkan-runtime/src/ycbcr.rs index 83912da9e..904810f6d 100644 --- a/crates/metal2vulkan-runtime/src/ycbcr.rs +++ b/crates/metal2vulkan-runtime/src/ycbcr.rs @@ -954,7 +954,7 @@ impl YCbCrConversion { let state_at = made.shape_at + STATE_AT; let completed_at = made.shape_at + COMPLETED_AT; let word = |w: u32| w.to_le_bytes(); - let refresh = self + let refresh = made .refresh .as_ref() .filter(|refresh| refresh.planes == source); diff --git a/crates/metal2vulkan/src/tests/engine_ycbcr_in_place.rs b/crates/metal2vulkan/src/tests/engine_ycbcr_in_place.rs index 3323d08b2..4c101a5a8 100644 --- a/crates/metal2vulkan/src/tests/engine_ycbcr_in_place.rs +++ b/crates/metal2vulkan/src/tests/engine_ycbcr_in_place.rs @@ -1292,9 +1292,29 @@ fn a_slot_that_samples_and_gathers_reads_its_planes_in_place() { }; assert!(!notes(&a).contains(&other), "{what}: {:?}", notes(&a)); // The model's note holds only under the bound format and word, never outright. - assert!(!a.precision.contains(&filter), "{what}: {:?}", a.precision); - let noted = a.specialized.iter().any(|s| s.note == filter); - assert_eq!(noted, policy == "model", "{what}: {:?}", a.specialized); + let clauses: Vec<_> = a + .specialized + .iter() + .filter(|s| s.note == filter) + .flat_map(|s| &s.when) + .collect(); + let word = |c: &&crate::pipeline::artifact::SpecClause| { + c.all + .iter() + .any(|t| matches!(t.key, SpecKey::BoundSamplerWord(_))) + }; + assert_eq!( + !clauses.is_empty() && clauses.iter().all(word), + policy == "model", + "{what}: {:?}", + a.specialized + ); + assert_eq!( + notes(&a).contains(&filter), + policy == "model", + "{what}: {:?}", + notes(&a) + ); } } }