Two measured changes to an extended-range sample's level, each from the M3 Max on macOS 27.0.1:
- A padded form's linear mip filter (R10Unorm_X6, RG10Unorm_X12 and their _sRGB twins) now
blends its two levels as BGR10_XR's and BGRA10_XR's do, through a constexpr sampler and through
a runtime one, and records PrecisionNote::BicubicFilterArithmetic. Before, a constexpr sampler's
was refused NotImplemented(Format), and a runtime sampler's read one level with no refusal. The
probe extended_linear_mip_blends (job m3-max-82967; 16,384 lanes per form and filter, 2D, five
levels, random codes) puts Metal's sample within 0.0157 of its own two levels' samples blended
by mix at the fraction truncated onto sixty-fourths. The note's doc and its docs/API.md
catalogue line gain that bound.
- A bfloat form's linear mip filter (R16Bfloat, RG16Bfloat, RGBA16Bfloat) is now its nearest mip
filter, which Metal's equals on every lane whose two levels differ (4,096, 8,192 and 16,384
lanes, nearest and linear filters). Before, a constexpr sampler's was refused. A runtime
sampler's already read that level.
What stays refused through a constexpr sampler:
- A two-plane form's linear mip filter (not measured). The probe only shows that a five-level
texture is made.
- RGB10A2Unorm_sRGB's linear mip filter (not measured). Jobs m3-max-83026 and m3-max-83029
explain why. A texture of five levels holds each level's own code, which a blit reads back per
level. Yet the M3 samples level 0's code at every explicit level, at gradients under a nearest
mip filter, at every level under a linear one, and in a 2D array's layer 1. RGB10A2Unorm, the
control, samples each level's code. Documented Metal samples the level asked for. So this is a
driver defect, which is not emulated (an Apple bug report is drafted), and the format's samples
keep reading the level the mip filter names. No conformance case samples that format's levels
today.
Docs: three comments named binder refusals that no code makes, and none of the three exists
(ResourcePlanner is gone):
- a runtime sampler word that states mixed filters;
- a runtime linear mip filter's clamp maximum below the last level;
- a runtime linear mip filter of an unmeasured form.
The comments sat in lower/sampler/extended.rs, select.rs and the extended-range tests'
module docs. They now state what happens: the word samples as nearest, the maximum is not read,
and a two-plane form's or RGB10A2Unorm_sRGB's runtime linear mip filter reads the nearest mip
filter's level. They also say this is an open gap that no consumer meets while the runtime makes
no texture of these formats (the runtime's Gap::TextureFormat).
The probe crates/metal2vulkan-conformance/probes/extended_linear_mip_blends.m gains the nearest
mip filter at the point's level, the two-plane question and each texture's level count.
SEMANTICS_VERSION moves to the next number, because refusals are removed and samples' answers
change. runtime-sources.sha256 is re-pinned because metal/format/mod.rs is a runtime input.
Tests (tests/engine_extended_range/levels.rs):
- unmeasured_linear_mip_filters_are_refused now builds a padded and a bfloat linear mip filter,
and still refuses a two-plane and an RGB10A2Unorm_sRGB one.
- measured_linear_mip_filters_blend_or_read_one_level: every padded and bfloat form's constexpr
sampler compiles, valid, under either mip filter, with the note on a padded linear one alone.
On the CPU interpreter, at 64 levels between two, through a constexpr and a runtime sampler, a
padded form's sample lies between its two levels' nearest-mip samples on every lane and
strictly between on some. A bfloat form's equals its nearest mip filter's, bit for bit.
Verified on the CPU with no device (job m3-max-83908): with metal/format/mod.rs,
lower/sampler/extended.rs and select.rs at 8e912a905d the two changed level tests fail, and here
the extended-range tests pass; the golden table differs from development's (semantics 2346) in 90
cells here and at 8e912a905d, so the change moves no existing cell by count; the refusal surface
check passes; cargo fmt, clippy (plain, --cfg m2v_gpu, --cfg m2v_cpu_icd), Rustdoc, the API
reference check and the doctests pass; the suites pass 3753 of 3754 (24 skipped), the one failure
golden_hashes_match_the_table, bless due as at 8e912a905d; the validation suite passes 1346 (3
skipped) and the conformance suite 1052. The states-only plays of this tree (m3-max-83910) make
what 8e912a905d's make (m3-max-83909): the gb-3090-r2 stream 10643 render and 15299 compute
states, the 780M windrag stream 8972 and 225, none refused.