Files
metal2vulkan/crates
Anees Iqbal f3418eacb9 rt: shaderResourceMinLod is enabled where the device reports it
A sample's min_lod_clamp other than 0 has one form in the translator, SPIR-V's MinLod image
operand, which needs shaderResourceMinLod; without it the translator refuses the function
(Feature::MinLodClamp). rt enabled the feature on no device, so every such function was refused at
creation.

floor: MIN_LOD_CLAMPS holds shaderResourceMinLod, in the step rates' shape: device creation enables
it where the device reports it, the translator's profile gets it through shader_enables, and a
device without it keeps the typed refusal. No answer chooses a second form.

Venues (vulkaninfo): every dumped venue reports it but the UHD 630's Windows driver (m3-max-48736):
RADV on the RX 7900 XTX, the three 780Ms and the RX 550, NVIDIA's driver on the RTX 2080, RTX 3090
and RTX 5080 Laptop, ANV on the Iris Xe, lavapipe and KosmicKrisp on the M3 Max (m3-max-48727 to
48731, 48737 and 61508).

Docs: the runtime README's Min-LOD clamps section with its feature table, and the render pipeline
states' known gap for a device without it. docs/REFUSALS.md regenerated: no change (the refusal is
the translator's and did not move).

Tests: floor's host test the_min_lod_clamp_is_enabled_where_reported (unreported, reported), the
README tables, and the device test min_lod.rs: engine sampling's sample_min_lod draws over a
16-texel texture of five levels, one colour each, under a linear mip filter; its derivatives make
the level of detail 0, so the clamp of 1.5 alone makes every pixel read levels 1 and 2 half and
half (green and blue within two codes of 128), or the state is refused naming MinLodClamp where
the profile lacks the feature.
2026-11-20 21:33:04 -08:00
..