Files
metal2vulkan/crates
Anees Iqbal e52085541e Docs: Metal chooses between a sampler's two filters before the clamp into the texture's levels
level.rs stated Metal's rule as "every sampler magnifies where L + q is 0", with L + q taken after
the clamp into the texture's levels, and left a texture of one level unmeasured. A Metal probe of
the Apple M3 Max on macOS 27.0.1 (job m3-max-87718) measured it: a 16 x 4 rgba8Unorm texture of
one level, through runtime samplers without a mip filter whose filters differ (min nearest / mag
linear and the reverse), at level() and a kernel's bias() of -2, -0.5, 0, 1/64, 1/4, 1/2, 1, 2 and
5, 60 positions each, takes the magnification filter at -2, -0.5 and 0 and the minification
filter at every level from 1/64 up. The stated rule would have magnified at every level. So the
choice reads the level after the half rounding and the sampler's clamp, before the clamp into
the texture's levels. On a texture of more than one level the two readings agree, so the 2,230-
level probes the module cites still hold.

Comment-only. No code takes this choice where the module reads texels itself: an extended-range
sample's constexpr sampler with differing filters is refused, and a runtime word with mixed
filters reads nearest (extended's open gap). The device path follows Vulkan's rule (λ after the
sampler's [minLod, maxLod], before the view's levels), which the device paragraph now says matches
Metal's choice. No translation changes, so SEMANTICS_VERSION stays. level.rs is not a
runtime-sources input: pin-compute.py on this tree prints the committed e8f7cd09...6798, so
the pin does not move.
2026-12-04 21:23:46 -08:00
..