From a83916afc62b5c3fa5515bb75558672bf7cd4998 Mon Sep 17 00:00:00 2001 From: Garvit Surana <251430630+garvitsurana271@users.noreply.github.com> Date: Mon, 30 Nov 2026 16:36:45 +0000 Subject: [PATCH] test(gpu): the ANV sampler cap's bounds hold at compile time, where clippy's test lane refused an assertion on constants --- crates/stela-driver-gpu/src/metal/binding.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/stela-driver-gpu/src/metal/binding.rs b/crates/stela-driver-gpu/src/metal/binding.rs index 73574ca567..d6077829ea 100644 --- a/crates/stela-driver-gpu/src/metal/binding.rs +++ b/crates/stela-driver-gpu/src/metal/binding.rs @@ -2670,7 +2670,9 @@ mod tests { physical.identity.driver_id = DriverId::IntelOpenSourceMesa; let anv = HeapLayout::of(&physical); assert_eq!(anv.count(HeapArray::Samplers), HeapLayout::ANV_MAX_SAMPLERS); - assert!(HeapLayout::ANV_MAX_SAMPLERS >= 2 * 2048 && HeapLayout::ANV_MAX_SAMPLERS > 4000); + const _: () = assert!( + HeapLayout::ANV_MAX_SAMPLERS >= 2 * 2048 && HeapLayout::ANV_MAX_SAMPLERS > 4000 + ); for array in [HeapArray::SampledImages, HeapArray::StorageImages] { assert_eq!(anv.count(array), other.count(array)); }