What: vk_sampler set mipLodBias 0 whatever the descriptor's lodBias, read as
Apple9 (an Apple M3 Max samples every level as with no bias). The
consumer's oracle (an AMD Radeon Pro 5300M and an Intel UHD 630) shows a
Mac with an Intel or AMD GPU adds the bias to every sample's level,
explicit (level()), gradient and implicit alike, clamped into the
texture's levels. So a guest presenting such a Mac read the wrong level.
How: the translator's SamplerUse gains lod_bias (with_lod_bias), a fact
the consumer states per bind from the Mac it presents; a plan's uses
leave it unset. With it, vk_sampler's mipLodBias is device_lod_bias's
(new, public): the bias within the device's maxSamplerLodBias, the limit
of its sign past it (Capped), none for a NaN (NotANumber) and none where
the portability subset withholds samplerMipLodBias (Withheld). Without
it, 0 as before; a use of texel coordinates takes none either way. Vulkan
adds mipLodBias to an explicit level too, so the device's sampler gives
the measured answer within the limit.
The runtime keeps the resolved MacClass in DeviceProperties (one place,
presented_class; lossless_compression derives from it). A state's taken
descriptor keeps its bias on IntelOrAmd (-0 as 0, NaN as none) and 0 on
AppleSilicon, and SamplerState::bound_use adds the flag at every bind:
a slot's, an argument sampler's, a heap set's array element, and the
attached-levels reckoning of the levels a draw samples. A bias the
device cannot take as it is is announced once as the state is made, the
new precision kind CappedLodBias (capped-lod-bias), never fatal.
Docs: vk_sampler, SamplerDescriptor::lod_bias, the runtime sampler module,
MacClass and DeviceOptions::mac_class name the answer per class; API.md's
catalogue lists capped-lod-bias and the Mac-class section the bias. The
api_surface and api_signatures tables take DeviceLodBias,
device_lod_bias, SamplerUse::lod_bias/with_lod_bias and the new kind.
REFUSALS.md regenerated unchanged.
Tests: metal::sampler's a_lod_bias_is_the_device_s_where_the_use_adds_it
(every committed profile, both uses) and
the_device_lod_bias_is_the_bias_within_what_the_device_takes (exact,
capped finite and infinite, NaN, withheld on MoltenVK's profile);
tests::sampler takes the bias per class; the lane's lod_bias tests a
device presenting each class: AppleSilicon reads the unbiased level
(kernel explicit, fragment implicit), IntelOrAmd the biased one, the
capped ones announced once (CAPPED_LOD_BIAS, listed as a site).
Evidence: potluck jobs in the report to main.