Rule 1: where the device has a native form it is the only form. The
emulated filters reproduced Metal's datapath bit for bit: a 2^-16
Catmull-Rom weight table, two-word integer sums truncated onto grids
and rounded half up, exact quotients, ties-away half rounding, a 12-bit
sRGB grid snap, 64ths of a level and 256ths of a blend, and the
anisotropic filter's piecewise log2 and chord exp2. All of it is gone.
Bicubic (lower/sampler/bicubic.rs, bicubic/routines.rs):
- One routine, `Plane::sum`: Catmull-Rom weights computed in f32 from
the fraction (vec4 Horner), the sixteen taps summed by the device's
multiply and add, rows then columns; Metal's bilinear rule (32-bit
float formats, a level under four texels) is the device's FMix of
the four inner taps already fetched; UNORM/SNORM clamps.
- 1D: `Line::sum`, the device's FMix of its two taps.
- An 8-bit sRGB twin's taps are the device's transfer, not the
1/4095 grid. A half result is the device's narrowing
(`narrow::round`), not ties-away.
- Kept: Metal's footprint, addressing, mirror pin, filter selection,
`Quad::exact` (in-place YCbCr's filter, owner form H, not touched).
- Deleted: the weight table routine, the exact/half/accumulated plane
and row routines, the block and float-quad routines, their words and
specials; metal::bicubic's test-only table and its test.
Extended range (lower/sampler/extended.rs):
- Linear, 3D and the linear mip filter's level blend decode their taps
through xrconv's functions as they are, then FMix in f32 at the f32
fractions; the level weight is the f32 fraction, not 64ths; a half
result is the device's narrowing. Bicubic clamps into the format's
decoded endpoints. The in-place decode keeps `Quad::exact`.
- Deleted: the step tables' callers (steps_of, step, level_taps,
half_of) and, in xrconv's extended_range.rs and texel_round.rs, the
helpers only they used (STEPS_WORDS, has_steps, steps, step_grids,
ratio_by_255_to_f32, normal_half_bits; minimal edits in another
lane's files).
Anisotropic (lower/sampler/anisotropic.rs):
- The device's Log2 and Exp2 replace Metal's piecewise log2, chord exp2
and truncations; the level and spacing are not rounded to 256ths,
4096ths or a 6-bit mantissa.
- Each tap is one explicit-level sample: under a linear mip filter the
fractional level, which the device's own linear mip filter blends.
The two-samples-a-tap form existed because an RTX 3090's blend of a
fractional level is not Metal's (1.03 codes off without anisotropy);
under rule 1 that blend is the device's. A nearest mip filter's level
stays whole (the 3090's anisotropic sampler blends the next level at
a fractional level whatever its mipmap mode).
- Kept: Metal's length, tap count thresholds, floor(256/n) weights,
kappa fit and direction.
Notes: PrecisionNote::BicubicFilterArithmetic is reused, broadened to
the extended-range linear, 3D and level blends (select.rs records it);
AnisotropicFilter's doc names the device's logarithm and blend. No new
variant, no ARTIFACT_FORMAT_VERSION bump. FAST-PATHS: the two
"not built yet / none known" bicubic rows are now one device-gap row
(the device's sum is the form); the known-gaps bullet loses the sRGB
grid snap. API.md's catalogue entries rewritten.
SEMANTICS_VERSION 1922 -> 1923.
Tests: the plane routine's interpreter differential against an f32
Catmull-Rom reference in the routine's order (fails on the old table
and integer sum), the line routine's FMix, the routines' word bounds;
engine_bicubic against the polynomial within 2^-18 (+ half ulp);
extended-range engine tests compare within the filter's bound
(`filtered_close`); xr_bicubic's `near` adds Metal's table's
deviation from the polynomial (WEIGHTS_BOUND 2.1e-3); anisotropic and
bias-reach tests count one sample a tap and two Exp2 per emulation.
Lanes and the conformance suite:
- runtime_lane::extended_range_samples compares linear samples within
`xr_bicubic::filtered_close` (moved to devtools from the engine test,
which re-exports it); two_plane_samples holds the digest of nearest
cases only (a linear one's values are compared by the conformance
suite's xr-two-plane-samples cases).
- runtime_lane::anisotropic_filter's bounds re-measured on the M3 Max
with samplerAnisotropy withheld: linear 10.375 codes max (mean 0.21),
nearest mean 0.82 and 6.7% of channels a code or more off, clamp to
edge 6.531 max. Other devices not measured.
- conformance: the XR two-plane-samples and extended-range/padded
extended-swizzles cases declare bicubic-filter-arithmetic; 32
known-gaps rows (Apple M3 Max) for the linear sites the device's FMix
moves.
- runtime-sources.sha256 re-pinned: metal/bicubic.rs lost its test-only
table and docs; no run's behaviour depends on it.
Verified (this M3 Max, macOS 27.0.1): metal2vulkan + devtools suites,
3302/3303 passed (golden_hashes_match_the_table fails: 1001 cells moved,
not blessed). Module words of a bicubic sample (ANV Iris Xe profile):
xr_bicubic xrb_edge 12990 -> 2093, a2_bicubic_weights 15731 -> 3858,
bcx_rules 30727 -> 11388; anisotropic emulation (vk12-floor)
2705 -> 1884.
Also in this packet: the padded 10-bit formats' linear samples join the known gaps (d326b293c0), and the conformance coverage document is regenerated for the filter rows. Anisotropic emulation (devices without samplerAnisotropy only) now takes the device's Log2/Exp2 and level blend, and Metal's spacing roundings (r' to 256ths, g*S to 4096ths, S to a 6-bit mantissa) are gone with them: on the M3 with samplerAnisotropy withheld, linear reads up to 10.4 codes from Metal (mean <= 0.21), bounded in runtime_lane/anisotropic_filter.rs.
One work packet, landed as 2 commits on archive/development-linear-2026-10-29: abc366a2fa, then 8f506cb2fd (the re-pin).