diff --git a/crates/metal2vulkan-rt/src/tests/sampler.rs b/crates/metal2vulkan-rt/src/tests/sampler.rs index fa09b4d15..a994260b7 100644 --- a/crates/metal2vulkan-rt/src/tests/sampler.rs +++ b/crates/metal2vulkan-rt/src/tests/sampler.rs @@ -210,7 +210,7 @@ mod on_device { gap(render.set_fragment_sampler_state_with_lod_clamps(Some(&state), 0.0, f32::NAN, 1)); render.end_encoding(); command_buffer.commit().expect("a commit"); - crate::tests::command::on_device::finished(name, &command_buffer); + crate::tests::command::on_device::finished(&name, &command_buffer); assert_eq!(command_buffer.error(), None, "{name}"); } } diff --git a/crates/metal2vulkan/src/metal/sampler.rs b/crates/metal2vulkan/src/metal/sampler.rs index f464888f6..af8779cf5 100644 --- a/crates/metal2vulkan/src/metal/sampler.rs +++ b/crates/metal2vulkan/src/metal/sampler.rs @@ -287,10 +287,10 @@ pub(crate) fn mipmapped_min_lod(lo: f32) -> f32 { /// Whether `desc` samples alike with its LOD clamps replaced by `lod_min_clamp` and /// `lod_max_clamp`, as Metal's bind-time clamps replace them /// (`setFragmentSamplerState:lodMinClamp:lodMaxClamp:atIndex:`, its vertex and compute forms, and -/// their range forms): where each bound, held to `[0, LAST_WORD_LEVEL]`, is the descriptor's own -/// so held. A sample's level is clamped into the bounds and then to the texture's levels, which -/// are at least 0 and at most 14 (Metal's largest textures have 15 levels), so a bound below 0 -/// clamps as 0 does and every bound at or past [`LAST_WORD_LEVEL`] clamps nothing, in Metal's +/// their range forms): where each bound, held to `[0, 15]`, is the descriptor's own so held. A +/// sample's level is clamped into the bounds and then to the texture's levels, which are at least +/// 0 and at most 14 (Metal's largest textures have 15 levels), so a bound below 0 clamps as 0 does +/// and every bound at or past 15 (the last level a sampler word names) clamps nothing, in Metal's /// sampler, in the device sampler [`vk_sampler`] makes (Vulkan clamps the level into `[minLod, /// maxLod]` and then to the view's levels) and in the word [`SamplerWord::of`] makes. A NaN bound /// reads alike with none.