Convert extended-range, padded and bfloat texels by the device's arithmetic

A read is float(c - 384) times the f32 nearest 1/510 (a padded code's float(c)
times 1/1023), a write RoundEven(clamp(v)*510)+384 (padded *1023), an sRGB
twin's colour the MSL transfer by the device's Pow on the magnitude, a half
result the device's narrowing, a bfloat code its bit shift with NaNs as
computed. Metal's correctly rounded quotients, exact-product rounding, ties-away
half rounding and its extended/padded sRGB tables leave the shader path:
extended_range/table.rs, R10X6_SRGB_DECODE_STEPS, round_exact_product(_lanes)
and the plan's table fields are deleted. Each such module records
DevicePackConversion; FAST-PATHS' air.pack row and API.md's catalogue state the
bounds (one f32 ulp, one code, half a 2^-13 sRGB step, R10X6_SRGB 1.64 steps).
The host-side clear_texel and the bicubic code still read extended_srgb.rs's
tables, so on an sRGB twin a clear and a shader write can differ by one code.

Verified: 331 touched lib tests; clippy plain and m2v_gpu; rustdoc; conformance
ledger tests; M3 replay of 89 extended-range cases (exit 0, 276 ledger rows,
+254/-57 against development); validation heap_extended on the M3 (6/6); the
new tests fail with FDiv decode. Golden: 346 cells in 20 heap/argument-buffer
subjects move (blessed on development). Translation words of an sRGB twin's read
4433 -> 588, write 5540 -> 632.

One work packet, landed as 2 commits on archive/development-linear-2026-10-29: 8acec5a4a2, then 96d8394995 (the re-pin).
This commit is contained in:
Anees Iqbal committed 2026-10-29 15:43:54 +02:00
1 parent 76d89d87a8
commit 7d1323ebcc
37 files changed
+1292 -1641

No files matched your search

+254 -57
View File
@@ -1165,67 +1165,264 @@ texture-fills-80 llvmpipe (LLVM 21.1.8, 128 bits) divergent case/format/80 the d
texture-fills-81 llvmpipe (LLVM 21.1.8, 128 bits) divergent case/format/81 the digest is fbb8049269874f64 on Metal and 02bddc42cbf2321e here Metal's plain colour fill (`fillTexture:...color:` with no pixel format; the case's c0, c4, c5 and c7) packs the colour by its fill's own rules, a tie rounded half up and a half to the nearest. The runtime's plain fill of a format the device renders to is the device's own clear, of the texture's own image where the fill covers whole subresources and else of a tile copied into the region (crates/metal2vulkan-runtime/src/blit_fill.rs, `device_fill`), so the stored code is the device's conversion. The site is digest-only, so which texels moved was measured beside it on this venue (the same fills through runtime_lane::color_fills' helper, 2026-10-28): of the four colours only c5's (2, -1, 0.5, 0.3) differs, and in one field, the linear alpha byte 0x4c where Metal stores 0x4d (0.3 is 76.5 codes, a tie the device rounds to even); its sRGB channels are Metal's; c0, c4 and c7 are Metal's bytes. `device-color-conversion` records it at every such fill, and its bound, a code per field, covers it; runtime_lane::color_fills::plain_color_fills_are_the_device_s_clear holds this venue's plain fills of BGRA8Unorm_sRGB to that bound per texel. Open: nothing; packing Metal's bits on the CPU where the device clears natively is the emulation the native-arithmetic contract rules out.
texture-fills-110 llvmpipe (LLVM 21.1.8, 128 bits) divergent case/format/110 the digest is 2df2cb38c53448fb on Metal and 01f4dc26af215019 here Metal's plain colour fill (`fillTexture:...color:` with no pixel format; the case's c0, c4, c5 and c7) packs the colour by its fill's own rules, a tie rounded half up and a half to the nearest. The runtime's plain fill of a format the device renders to is the device's own clear, of the texture's own image where the fill covers whole subresources and else of a tile copied into the region (crates/metal2vulkan-runtime/src/blit_fill.rs, `device_fill`), so the stored code is the device's conversion. The site is digest-only, so which texels moved was measured beside it on this venue (the same fills through runtime_lane::color_fills' helper, 2026-10-28): of the four colours only c5's (2, -1, 0.5, 0.3) differs, and in one field, the alpha 0x4ccc where Metal stores 0x4ccd (0.3 is 19660.5 codes, a tie the device rounds to even); c0, c4 and c7 are Metal's bytes. `device-color-conversion` records it at every such fill, and its bound, a code per field, covers it; runtime_lane::color_fills::plain_color_fills_are_the_device_s_clear holds this venue's plain fills of RGBA16Unorm to that bound per texel. Open: nothing; packing Metal's bits on the CPU where the device clears natively is the emulation the native-arithmetic contract rules out.
texture-fills-115 llvmpipe (LLVM 21.1.8, 128 bits) divergent case/format/115 the digest is 27f9e93fc6475f47 on Metal and 1bf4a5661310cdd4 here Metal's plain colour fill (`fillTexture:...color:` with no pixel format; the case's c0, c4, c5 and c7) packs the colour by its fill's own rules, a tie rounded half up and a half to the nearest. The runtime's plain fill of a format the device renders to is the device's own clear, of the texture's own image where the fill covers whole subresources and else of a tile copied into the region (crates/metal2vulkan-runtime/src/blit_fill.rs, `device_fill`), so the stored code is the device's conversion. The site is digest-only, so which texels moved was measured beside it on this venue (the same fills through runtime_lane::color_fills' helper, 2026-10-28): of the four colours only c5's (2, -1, 0.5, 0.3) differs, and in one field, the alpha half 0x34cc where Metal stores 0x34cd, the nearest half to 0.3 (the device truncates the float toward zero); c0, c4 and c7 are Metal's bytes. `device-color-conversion` records it at every such fill, and its bound, a code per field, covers it; runtime_lane::color_fills::plain_color_fills_are_the_device_s_clear holds this venue's plain fills of RGBA16Float to that bound per texel. Open: nothing; packing Metal's bits on the CPU where the device clears natively is the emulation the native-arithmetic contract rules out.
xr-blend-bgr10xr-add Apple M3 Max divergent case/texels 758 elements differ (U32), the largest difference 1049600 A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-bgr10xr-premul Apple M3 Max divergent case/texels 1011 elements differ (U32), the largest difference 1049600 A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-bgr10xr-srgb-add Apple M3 Max divergent case/texels 411 elements differ (U32), the largest difference 1049600 A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-bgr10xr-srgb-premul Apple M3 Max divergent case/texels 635 elements differ (U32), the largest difference 2097152 A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-bgra10xr-add Apple M3 Max divergent case/texels 900 elements differ (U16), the largest difference 64 A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-bgra10xr-premul Apple M3 Max divergent case/texels 1481 elements differ (U16), the largest difference 64 A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-bgra10xr-srgb-add Apple M3 Max divergent case/texels 614 elements differ (U16), the largest difference 64 A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-bgra10xr-srgb-premul Apple M3 Max divergent case/texels 1063 elements differ (U16), the largest difference 128 A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-planes-add Apple M3 Max divergent case/reads 953 elements differ (F32), the largest difference 0.003921568393707275 A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's, and the alpha plane's read-back (`xr2p_read_float`'s `float4`) follows the codes it reads. Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-planes-add Apple M3 Max divergent case/texels 761 elements differ (U32), the largest difference 1049600 A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-planes-premul Apple M3 Max divergent case/reads 1167 elements differ (F32), the largest difference 0.003921598196029663 A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's, and the alpha plane's read-back (`xr2p_read_float`'s `float4`) follows the codes it reads. Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-planes-premul Apple M3 Max divergent case/texels 936 elements differ (U32), the largest difference 1049601 A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-planes-srgb-add Apple M3 Max divergent case/reads 608 elements differ (F32), the largest difference 0.0059814453125 A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's, and the alpha plane's read-back (`xr2p_read_float`'s `float4`) follows the codes it reads. Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-planes-srgb-add Apple M3 Max divergent case/texels 429 elements differ (U32), the largest difference 1049600 A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-planes-srgb-premul Apple M3 Max divergent case/reads 877 elements differ (F32), the largest difference 0.0059814453125 A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's, and the alpha plane's read-back (`xr2p_read_float`'s `float4`) follows the codes it reads. Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-planes-srgb-premul Apple M3 Max divergent case/texels 624 elements differ (U32), the largest difference 2097152 A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
extended-swizzles-bgr10xr Apple M3 Max divergent case/0ag1/sl 50 elements differ (U32), the largest difference 263071 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr Apple M3 Max divergent case/ar10/sl 47 elements differ (U32), the largest difference 131585 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr Apple M3 Max divergent case/bgra/sl 149 elements differ (U32), the largest difference 263071 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr Apple M3 Max divergent case/gggg/sl 200 elements differ (U32), the largest difference 263071 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr Apple M3 Max divergent case/rgba/sl 149 elements differ (U32), the largest difference 263071 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/0ag1/sl 88 elements differ (U32), the largest difference 34816 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/ar10/sl 87 elements differ (U32), the largest difference 2359296 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/bgra/sl 262 elements differ (U32), the largest difference 2359296 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/gggg/sl 352 elements differ (U32), the largest difference 34816 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/rgba/sl 262 elements differ (U32), the largest difference 2359296 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr Apple M3 Max divergent case/0ag1/sl 102 elements differ (U32), the largest difference 16448 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr Apple M3 Max divergent case/ar10/sl 110 elements differ (U32), the largest difference 32895 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr Apple M3 Max divergent case/bgra/sl 202 elements differ (U32), the largest difference 32895 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr Apple M3 Max divergent case/gggg/sl 192 elements differ (U32), the largest difference 8225 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr Apple M3 Max divergent case/rgba/sl 202 elements differ (U32), the largest difference 32895 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/0ag1/sl 148 elements differ (U32), the largest difference 526344 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/ar10/sl 148 elements differ (U32), the largest difference 526344 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/bgra/sl 320 elements differ (U32), the largest difference 526344 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/gggg/sl 344 elements differ (U32), the largest difference 65536 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/rgba/sl 320 elements differ (U32), the largest difference 526344 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
xr-two-plane-samples-p2-lc-f Apple M3 Max divergent case/output/constexpr-sampler the digest is 304c290289b1c88f61c9092f05095ae4fc3250e0683c6ef849b6df7ba4072a9e on Metal and a5f006630cb1b56f0c647c7e39845caf917ece2fbafc5db59305fdad79e9a7d4 here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2-lc-f Apple M3 Max divergent case/output/runtime-sampler the digest is 304c290289b1c88f61c9092f05095ae4fc3250e0683c6ef849b6df7ba4072a9e on Metal and a5f006630cb1b56f0c647c7e39845caf917ece2fbafc5db59305fdad79e9a7d4 here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2-lc-h Apple M3 Max divergent case/output/constexpr-sampler the digest is 056c57a2917517418b57ec861f9c8de8ebb998d0e1a79aa78ba51f2ed865b221 on Metal and ebbd13031c075b2d6d8b074e966bf8f150331fdd1cac80516e22c9ccb03c340f here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2-lc-h Apple M3 Max divergent case/output/runtime-sampler the digest is 056c57a2917517418b57ec861f9c8de8ebb998d0e1a79aa78ba51f2ed865b221 on Metal and ebbd13031c075b2d6d8b074e966bf8f150331fdd1cac80516e22c9ccb03c340f here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2-lr-f Apple M3 Max divergent case/output/runtime-sampler the digest is 7f28042f92e7ba719bf0eae74a0b0dd88bccc3360d9f409762459f54e0eabf84 on Metal and 3ae7df3a89234be54cc56fe1e04a75d9b6aba66db04584ffb9c65b21f06743ef here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2-lr-h Apple M3 Max divergent case/output/runtime-sampler the digest is 27b3a8342de65f38ffcd578a91f47c3d18d9d4bbf0f30dad35b97f5a985fa9c1 on Metal and b57583f2d99b3282b39651e386733f2cdd5b04c461d9c87284083ff2671de1aa here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2s-lc-f Apple M3 Max divergent case/output/constexpr-sampler the digest is 18e7c93583b98c9c11825886e6f0d39d8a05097e67ba2f520464eeb4bdd43350 on Metal and aad9310dd112ae3a9e33c726989556d6bd689b129ea30dc2c728c093f120065a here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2s-lc-f Apple M3 Max divergent case/output/runtime-sampler the digest is 18e7c93583b98c9c11825886e6f0d39d8a05097e67ba2f520464eeb4bdd43350 on Metal and aad9310dd112ae3a9e33c726989556d6bd689b129ea30dc2c728c093f120065a here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2s-lc-h Apple M3 Max divergent case/output/constexpr-sampler the digest is 5dcc9940c0db2c033ef4dc9a7c9e869bcbbe5525ca5037fdaa28b7d148b01a23 on Metal and ae207ac9382a5c86dd53306180942a95eb37fcb3100b8b003b82b7d2bc3a2231 here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2s-lc-h Apple M3 Max divergent case/output/runtime-sampler the digest is 5dcc9940c0db2c033ef4dc9a7c9e869bcbbe5525ca5037fdaa28b7d148b01a23 on Metal and ae207ac9382a5c86dd53306180942a95eb37fcb3100b8b003b82b7d2bc3a2231 here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2s-lr-f Apple M3 Max divergent case/output/runtime-sampler the digest is 6ff35014e270335757efb75b99ab4aa7968abe78497eec1b690161781facbdd9 on Metal and 620e8bbcaec10099cf4a00d829998e9ffbd5efed4396ee6618109f0753e1cc68 here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2s-lr-h Apple M3 Max divergent case/output/runtime-sampler the digest is 0df22c36e81b77136e19de14419c0e414bdd635f07fb54329a6d7213180ffaaa on Metal and d09b8ae6a36649bccd0152ac5273df02fc518e5e0ef729478de7e9672934f663 here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
extended-swizzles-r10unormx6 Apple M3 Max divergent case/ar10/sl 78 elements differ (U32), the largest difference 8200 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-r10unormx6 Apple M3 Max divergent case/bgra/sl 78 elements differ (U32), the largest difference 8200 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-r10unormx6 Apple M3 Max divergent case/rgba/sl 78 elements differ (U32), the largest difference 8200 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-r10unormx6-srgb Apple M3 Max divergent case/ar10/sl 83 elements differ (U32), the largest difference 10240 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-r10unormx6-srgb Apple M3 Max divergent case/bgra/sl 83 elements differ (U32), the largest difference 10240 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-r10unormx6-srgb Apple M3 Max divergent case/rgba/sl 83 elements differ (U32), the largest difference 10240 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-rg10unormx12 Apple M3 Max divergent case/0ag1/sl 79 elements differ (U32), the largest difference 8201 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-rg10unormx12 Apple M3 Max divergent case/ar10/sl 77 elements differ (U32), the largest difference 8201 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-rg10unormx12 Apple M3 Max divergent case/bgra/sl 156 elements differ (U32), the largest difference 8201 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-rg10unormx12 Apple M3 Max divergent case/gggg/sl 316 elements differ (U32), the largest difference 8201 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-rg10unormx12 Apple M3 Max divergent case/rgba/sl 156 elements differ (U32), the largest difference 8201 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-rg10unormx12-srgb Apple M3 Max divergent case/0ag1/sl 70 elements differ (U32), the largest difference 2051 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-rg10unormx12-srgb Apple M3 Max divergent case/ar10/sl 75 elements differ (U32), the largest difference 4101 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-rg10unormx12-srgb Apple M3 Max divergent case/bgra/sl 145 elements differ (U32), the largest difference 4101 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-rg10unormx12-srgb Apple M3 Max divergent case/gggg/sl 280 elements differ (U32), the largest difference 2051 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-rg10unormx12-srgb Apple M3 Max divergent case/rgba/sl 145 elements differ (U32), the largest difference 4101 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
xr-planes-bgr10xr-bgra10xr-srgb Apple M3 Max divergent case/output/color 62 elements differ (U32), the largest difference 1048577 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-planes-bgr10xr-bgra10xr-srgb Apple M3 Max divergent case/output/joined 15 elements differ (U16), the largest difference 64 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-planes-bgr10xr-srgb-bgra10xr Apple M3 Max divergent case/output/color 15 elements differ (U32), the largest difference 1048576 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-planes-bgr10xr-srgb-bgra10xr Apple M3 Max divergent case/output/joined 63 elements differ (U16), the largest difference 64 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10 Apple M3 Max divergent case/output/consumer-shape/float-lanes the digest is eac8dabf8163dacdcf619a65681c3c980548e97c39d8ac35304b44208b8a73f3 on Metal and d20c112fbba2e104497a9d498c3b8d3cf939aa6c1ebcf02bbf7eb5198249fd0f here An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10 Apple M3 Max divergent case/output/float-written/float-lanes/digest the digest is 3ead12fa542258ee768c9cf388f96acca8cf94a761fbe6a82013f3146c13e33a on Metal and 0dbd400b7fbf31c371f2de15f2a3ca8177c316ec08e893fba29adea805b04020 here An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10 Apple M3 Max divergent case/output/float-written/float-lanes/first-threads 608 elements differ (F32), the largest difference 0.00000005960464477539063 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10 Apple M3 Max divergent case/output/float-written/float-lanes/last-threads 832 elements differ (F32), the largest difference 0.00000011920928955078125 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10 Apple M3 Max divergent case/output/half-written/float-lanes/digest the digest is a35846dbd312d807c50310d22849a4a5ff789cd274a27ff926c59e562f2c00fa on Metal and df2654ad32b98507f69384eeb1b9ce6200adcb6d45ab979a106026e98b169d34 here An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10 Apple M3 Max divergent case/output/half-written/float-lanes/first-threads 256 elements differ (F32), the largest difference 0.00000011920928955078125 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10 Apple M3 Max divergent case/output/half-written/float-lanes/last-threads 256 elements differ (F32), the largest difference 0.00000011920928955078125 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10-srgb Apple M3 Max divergent case/output/consumer-shape/float-lanes the digest is 6760e2782c211b2b70bee680a6e9b59bd9c110e81955cf30d5697bfb38b37630 on Metal and 83f89eb4647cedad6d1d7616765fabee03da4ded34dcb5063e288f91acb14568 here An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10-srgb Apple M3 Max divergent case/output/consumer-shape/half-lanes the digest is 9ab95cab828e6aa443e91e0ed960269c33732dcf3e9364dd3944d0467fcb0780 on Metal and c8fa883ae7041c15f0e06c387ff94030c83480c390d5ef5d0dccb914068ef8c0 here An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10-srgb Apple M3 Max divergent case/output/float-written/float-lanes/digest the digest is df70ed07347b993b43fdae512e9e9cc3e145a8fe2771e89772489a60eee88a19 on Metal and 2943ac6b1f74065346f7d37e3bbbd0d69e2bc4149893ca8a19410208904f3706 here An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10-srgb Apple M3 Max divergent case/output/float-written/float-lanes/first-threads 766 elements differ (F32), the largest difference 0.00043548550456762314 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10-srgb Apple M3 Max divergent case/output/float-written/float-lanes/last-threads 991 elements differ (F32), the largest difference 0.00043548550456762314 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10-srgb Apple M3 Max divergent case/output/float-written/half-lanes/digest the digest is ea11a73fe55459ded35d32d872daf417b683fc9e3fdceb3416c74b61747e420f on Metal and 3704aaa86f7182a695dea226f6b8e2ba78666860468e3faeee5e1a0815124c2e here An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10-srgb Apple M3 Max divergent case/output/float-written/half-lanes/first-threads 254 elements differ (F16), the largest difference 0.00043487548828125 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10-srgb Apple M3 Max divergent case/output/float-written/half-lanes/last-threads 255 elements differ (F16), the largest difference 0.00043487548828125 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10-srgb Apple M3 Max divergent case/output/half-written/float-lanes/digest the digest is bbf1d6107835195d3daef224de56d24aa6b8b0221d3be8e36ca7de88dd09c0a3 on Metal and 879ecf9df41a6c3692446d00fe29da7baf5a7e0208c0ade39c4aa166f7ba2be9 here An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10-srgb Apple M3 Max divergent case/output/half-written/float-lanes/first-threads 256 elements differ (F32), the largest difference 0.00003886222839355469 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10-srgb Apple M3 Max divergent case/output/half-written/float-lanes/last-threads 256 elements differ (F32), the largest difference 0.00003886222839355469 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-planes-rgb10a8-2p-xr10-srgb Apple M3 Max divergent case/output/half-written/half-lanes/digest the digest is 84b306e7871b19413062634947bfbdb8a0149c2aacf74f26ca3b9b6faccedc3d on Metal and 640efda1d542cf0e223c64e9091c1971eb5ea118efc413874fb70945a1611d25 here An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-plane-samples-p2-nc-f Apple M3 Max divergent case/output/runtime-sampler the digest is 86f9c37283b0079b6097e6e9ecb9671e5268ede621eb5a33dbbefd38d500b930 on Metal and 0fe5ea8c151a150fb3ce1db781ee651e2bceefe7e781c0e8d1a100d3d213dbbc here An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-plane-samples-p2-nr-f Apple M3 Max divergent case/output/runtime-sampler the digest is bf509ad9a15dc8d1efb75623e4fe5ac2f00e279a5d62d2dd46a7a2e57f95de81 on Metal and c6b7f5d25092f862890488e476285fd37b7d359276560cb82669347e3126d3f0 here An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-plane-samples-p2s-nc-f Apple M3 Max divergent case/output/runtime-sampler the digest is 89bb6b1fb2deadbfcd8080a0da18d82c3e7e4bb3f47210839c0015c90d6e5172 on Metal and 6f9b501aed149705df35b3cc00fd192ceb157b6d9ba36363908c1c5e9ac93323 here An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-plane-samples-p2s-nc-h Apple M3 Max divergent case/output/runtime-sampler the digest is 9c9abfd12e72b156e1e8b8fbbb00eeb8c8f0bd289c817d0e99781a1afe21faef on Metal and 2597150f6b36044037733b6b530469b33a43552c04c4c3c7752a242066886db3 here An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-plane-samples-p2s-nr-f Apple M3 Max divergent case/output/runtime-sampler the digest is c264de965958fd80be78dacc7178cd0f20cd5ddd74de5106f2536fc53706468b on Metal and 3ca52e3d739e33df4ec88914f11ab057826d95db9970eb8e470067150f038b88 here An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-plane-samples-p2s-nr-h Apple M3 Max divergent case/output/runtime-sampler the digest is 4a767f4203aa7c3ee7de16002e378d8b4de29ff808e4b1f4d0957b5a10b4d76e on Metal and 7a9620895c02b4d8d16615c40c541b0483bcdd11ef0816c4d80e1fea8508ee1e here An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
rgb10a2-srgb-reads Apple M3 Max divergent case/output/codes the digest is 2b86b83c616e2eef0d1fd93ca64c973deb89ff573d4f641943a34ba3d7301c40 on Metal and f5f26343fb71090d98f315e1a35c9c21ac303edbf8584ea7357443ab821dc040 here `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, and encodes by the transfer and `RoundEven` of the product with 1023, where Metal reads `R10Unorm_X6_sRGB`'s table step over 8192 and writes through that table's thresholds, so a decoded value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound and a code within one; its alpha `a` reads `a` times the `f32` nearest `1 / 3`. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
rgb10a2-srgb-writes Apple M3 Max divergent case/output/words the digest is ad21500c0af4eec7703f98a534acbc37e87207b682615f61cd9ff3608c71e6a4 on Metal and e9eeb11ad21475acb384c3dc589a953d5a96f2901af61fd309d256ddadadda31 here `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, and encodes by the transfer and `RoundEven` of the product with 1023, where Metal reads `R10Unorm_X6_sRGB`'s table step over 8192 and writes through that table's thresholds, so a decoded value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound and a code within one; its alpha `a` reads `a` times the `f32` nearest `1 / 3`. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
rgb10a2-srgb-samples-nearest-f Apple M3 Max divergent case/output/samples the digest is 21b316a2b5129e819b29fa7875d03e1a918d5d5650c2b7b5a82e7618064b51e8 on Metal and c6b54c57e758cc11aec539ebce7a87b8e56b06add09d96b845975fcd4714282c here `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, and encodes by the transfer and `RoundEven` of the product with 1023, where Metal reads `R10Unorm_X6_sRGB`'s table step over 8192 and writes through that table's thresholds, so a decoded value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound and a code within one; its alpha `a` reads `a` times the `f32` nearest `1 / 3`. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
rgb10a2-srgb-samples-nearest-f Apple M3 Max divergent case/notices we announced the degrade notice metal2vulkan-degrade-bicubic-filter-arithmetic, which the case declares nowhere `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, and encodes by the transfer and `RoundEven` of the product with 1023, where Metal reads `R10Unorm_X6_sRGB`'s table step over 8192 and writes through that table's thresholds, so a decoded value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound and a code within one; its alpha `a` reads `a` times the `f32` nearest `1 / 3`. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
rgb10a2-srgb-samples-nearest-h Apple M3 Max divergent case/output/samples the digest is da773346fdd2620e186f817ee42ef1b632d0374e86fe14de5efa1fd64e1dfa11 on Metal and 28100702aaafc498c9b0fa2dac3de2fdfb82119933b382ae1fe5508b3569e686 here `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, and encodes by the transfer and `RoundEven` of the product with 1023, where Metal reads `R10Unorm_X6_sRGB`'s table step over 8192 and writes through that table's thresholds, so a decoded value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound and a code within one; its alpha `a` reads `a` times the `f32` nearest `1 / 3`. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
rgb10a2-srgb-samples-nearest-h Apple M3 Max divergent case/notices we announced the degrade notice metal2vulkan-degrade-bicubic-filter-arithmetic, which the case declares nowhere `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, and encodes by the transfer and `RoundEven` of the product with 1023, where Metal reads `R10Unorm_X6_sRGB`'s table step over 8192 and writes through that table's thresholds, so a decoded value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound and a code within one; its alpha `a` reads `a` times the `f32` nearest `1 / 3`. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
rgb10a2-srgb-stores-f Apple M3 Max divergent case/output/words the digest is ddde20afb956913d4d6b0a3bc77ca7bbc8a88a1cdbf5ab764bfa9267251a7348 on Metal and 8c124dfbd2f50668c1e6c8ef1c87df5a7e1dcfaa8287af44df34f220ef51edf1 here `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, and encodes by the transfer and `RoundEven` of the product with 1023, where Metal reads `R10Unorm_X6_sRGB`'s table step over 8192 and writes through that table's thresholds, so a decoded value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound and a code within one; its alpha `a` reads `a` times the `f32` nearest `1 / 3`. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
rgb10a2-srgb-stores-h Apple M3 Max divergent case/output/words the digest is 335d7190fc2bcf3649e8a899cd9c2d88672ea931fa1ceeb030b4233ed98529ab on Metal and aa616d7803d5f9f365a64bb1883402333964b85e83751c4844e509e5cbcbb21a here `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, and encodes by the transfer and `RoundEven` of the product with 1023, where Metal reads `R10Unorm_X6_sRGB`'s table step over 8192 and writes through that table's thresholds, so a decoded value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound and a code within one; its alpha `a` reads `a` times the `f32` nearest `1 / 3`. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-draw-bgra10xr-srgb-half Apple M3 Max divergent case/texels 158 elements differ (U16), the largest difference 64 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-draw-bgra10xr-srgb-float Apple M3 Max divergent case/texels 158 elements differ (U16), the largest difference 64 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-draw-bgr10xr-srgb-half Apple M3 Max divergent case/texels 156 elements differ (U32), the largest difference 1048576 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-draw-bgr10xr-srgb-float Apple M3 Max divergent case/texels 156 elements differ (U32), the largest difference 1048576 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-draw-planes-half Apple M3 Max divergent case/reads 18380 elements differ (F32), the largest difference 0.00000011920928955078125 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-draw-planes-float Apple M3 Max divergent case/reads 18380 elements differ (F32), the largest difference 0.00000011920928955078125 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-draw-planes-srgb-half Apple M3 Max divergent case/reads 27843 elements differ (F32), the largest difference 0.005655169486999512 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-draw-planes-srgb-float Apple M3 Max divergent case/reads 27843 elements differ (F32), the largest difference 0.005655169486999512 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-clears-bgra10xr Apple M3 Max divergent case/reads 922 elements differ (F32), the largest difference 0.00000011920928955078125 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-clears-bgra10xr-srgb Apple M3 Max divergent case/reads 1606 elements differ (F32), the largest difference 0.000060677528381347656 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-clears-bgr10xr Apple M3 Max divergent case/reads 750 elements differ (F32), the largest difference 0.00000011920928955078125 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-clears-bgr10xr-srgb Apple M3 Max divergent case/reads 1434 elements differ (F32), the largest difference 0.000060677528381347656 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-clears-planes Apple M3 Max divergent case/reads 882 elements differ (F32), the largest difference 0.00000011920928955078125 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-clears-planes-srgb Apple M3 Max divergent case/reads 1566 elements differ (F32), the largest difference 0.000060677528381347656 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-blend-bgra10xr-srgb-one-zero Apple M3 Max divergent case/texels 158 elements differ (U16), the largest difference 64 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-blend-bgr10xr-srgb-one-zero Apple M3 Max divergent case/texels 155 elements differ (U32), the largest difference 1048576 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-blend-planes-one-zero Apple M3 Max divergent case/reads 18409 elements differ (F32), the largest difference 0.00000011920928955078125 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-blend-planes-srgb-one-zero Apple M3 Max divergent case/reads 27872 elements differ (F32), the largest difference 0.003622114658355713 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-blend-planes-srgb-one-zero Apple M3 Max divergent case/texels 155 elements differ (U32), the largest difference 1048576 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/0ag1/g1 108 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/0ag1/g2 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/0ag1/rf 27 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/0ag1/sn 81 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/ar10/g0 108 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/ar10/g1 204 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/ar10/rf 26 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/ar10/sn 78 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/bgra/g0 228 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/bgra/g1 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/bgra/g2 204 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/bgra/g3 108 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/bgra/rf 63 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/bgra/sn 189 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/gggg/g0 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/gggg/g1 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/gggg/g2 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/gggg/g3 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/gggg/rf 72 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/gggg/sn 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/rgba/g0 204 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/rgba/g1 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/rgba/g2 228 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/rgba/g3 108 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/rgba/rf 63 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/rgba/sn 189 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr Apple M3 Max divergent case/0ag1/sl 139 elements differ (U32), the largest difference 16448 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr Apple M3 Max divergent case/ar10/sl 146 elements differ (U32), the largest difference 32892 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr Apple M3 Max divergent case/bgra/sl 294 elements differ (U32), the largest difference 32892 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr Apple M3 Max divergent case/gggg/sl 300 elements differ (U32), the largest difference 8226 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr Apple M3 Max divergent case/rgba/sl 294 elements differ (U32), the largest difference 32892 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/0ag1/g1 132 elements differ (U32), the largest difference 1 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/0ag1/g2 384 elements differ (U32), the largest difference 91315 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/0ag1/rf 43 elements differ (U32), the largest difference 91315 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/0ag1/sn 129 elements differ (U32), the largest difference 91315 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/ar10/g0 132 elements differ (U32), the largest difference 1 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/ar10/g1 384 elements differ (U32), the largest difference 112496 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/ar10/rf 43 elements differ (U32), the largest difference 112496 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/ar10/sn 129 elements differ (U32), the largest difference 112496 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/bgra/g0 372 elements differ (U32), the largest difference 42804 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/bgra/g1 384 elements differ (U32), the largest difference 91315 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/bgra/g2 384 elements differ (U32), the largest difference 112496 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/bgra/g3 132 elements differ (U32), the largest difference 1 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/bgra/rf 106 elements differ (U32), the largest difference 112496 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/bgra/sn 318 elements differ (U32), the largest difference 112496 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/gggg/g0 384 elements differ (U32), the largest difference 91315 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/gggg/g1 384 elements differ (U32), the largest difference 91315 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/gggg/g2 384 elements differ (U32), the largest difference 91315 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/gggg/g3 384 elements differ (U32), the largest difference 91315 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/gggg/rf 128 elements differ (U32), the largest difference 91315 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/gggg/sn 384 elements differ (U32), the largest difference 91315 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/rgba/g0 384 elements differ (U32), the largest difference 112496 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/rgba/g1 384 elements differ (U32), the largest difference 91315 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/rgba/g2 372 elements differ (U32), the largest difference 42804 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/rgba/g3 132 elements differ (U32), the largest difference 1 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/rgba/rf 106 elements differ (U32), the largest difference 112496 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/rgba/sn 318 elements differ (U32), the largest difference 112496 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/0ag1/sl 197 elements differ (U32), the largest difference 526343 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/ar10/sl 197 elements differ (U32), the largest difference 526343 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/bgra/sl 440 elements differ (U32), the largest difference 526343 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/gggg/sl 488 elements differ (U32), the largest difference 101568 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgra10xr-srgb Apple M3 Max divergent case/rgba/sl 440 elements differ (U32), the largest difference 526343 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr Apple M3 Max divergent case/0ag1/g2 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/0ag1/rf 18 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/0ag1/sn 54 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/ar10/g1 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/ar10/rf 18 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/ar10/sn 54 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/bgra/g0 204 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/bgra/g1 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/bgra/g2 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/bgra/rf 53 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/bgra/sn 159 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/gggg/g0 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/gggg/g1 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/gggg/g2 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/gggg/g3 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/gggg/rf 72 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/gggg/sn 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/rgba/g0 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/rgba/g1 216 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/rgba/g2 204 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/rgba/rf 53 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/rgba/sn 159 elements differ (U32), the largest difference 1 An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`), narrows a `half` read by the device's conversion, and encodes `RoundEven` of the clamped value's `f32` product with 510 plus 384, where Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero and encodes the exact product, so a value is one `f32` ulp apart at some codes and what is computed from it moves with it. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr Apple M3 Max divergent case/0ag1/sl 76 elements differ (U32), the largest difference 263215 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr Apple M3 Max divergent case/ar10/sl 76 elements differ (U32), the largest difference 131537 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr Apple M3 Max divergent case/bgra/sl 228 elements differ (U32), the largest difference 263215 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr Apple M3 Max divergent case/gggg/sl 304 elements differ (U32), the largest difference 263215 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr Apple M3 Max divergent case/rgba/sl 228 elements differ (U32), the largest difference 263215 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/0ag1/g2 384 elements differ (U32), the largest difference 1133553 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/0ag1/rf 32 elements differ (U32), the largest difference 1133553 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/0ag1/sn 96 elements differ (U32), the largest difference 1133553 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/ar10/g1 384 elements differ (U32), the largest difference 963599 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/ar10/rf 32 elements differ (U32), the largest difference 963599 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/ar10/sn 96 elements differ (U32), the largest difference 963599 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/bgra/g0 384 elements differ (U32), the largest difference 117176 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/bgra/g1 384 elements differ (U32), the largest difference 1133553 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/bgra/g2 384 elements differ (U32), the largest difference 963599 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/bgra/rf 96 elements differ (U32), the largest difference 1133553 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/bgra/sn 288 elements differ (U32), the largest difference 1133553 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/gggg/g0 384 elements differ (U32), the largest difference 1133553 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/gggg/g1 384 elements differ (U32), the largest difference 1133553 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/gggg/g2 384 elements differ (U32), the largest difference 1133553 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/gggg/g3 384 elements differ (U32), the largest difference 1133553 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/gggg/rf 128 elements differ (U32), the largest difference 1133553 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/gggg/sn 384 elements differ (U32), the largest difference 1133553 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/rgba/g0 384 elements differ (U32), the largest difference 963599 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/rgba/g1 384 elements differ (U32), the largest difference 1133553 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/rgba/g2 384 elements differ (U32), the largest difference 117176 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/rgba/rf 96 elements differ (U32), the largest difference 1133553 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/rgba/sn 288 elements differ (U32), the largest difference 1133553 An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes it by the MSL transfer through the device's `Pow` on the magnitude of the linear value, where Metal reads and writes through its own tables (decode steps of `2^-13` and measured encode thresholds), so a decoded value is within half a `2^-13` step of Metal's beyond the `Pow`'s bound and a written code within one of Metal's; its other lanes are the linear forms' product, one `f32` ulp from Metal's quotient at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/0ag1/sl 122 elements differ (U32), the largest difference 1133553 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/ar10/sl 122 elements differ (U32), the largest difference 4428096 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/bgra/sl 366 elements differ (U32), the largest difference 4428096 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/gggg/sl 488 elements differ (U32), the largest difference 1133553 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-bgr10xr-srgb Apple M3 Max divergent case/rgba/sl 366 elements differ (U32), the largest difference 4428096 An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid (a step of `1/8160`, `1/8192` an sRGB color lane, `1/4080` alpha) and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words; the first mismatch is about 3e-5 apart in value). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: a measurement of the largest difference as a value rather than as bits, which this site does not print.
extended-swizzles-r10unormx6 Apple M3 Max divergent case/ar10/g1 24 elements differ (U32), the largest difference 1 A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6 Apple M3 Max divergent case/ar10/rf 2 elements differ (U32), the largest difference 1 A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6 Apple M3 Max divergent case/ar10/sn 6 elements differ (U32), the largest difference 1 A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6 Apple M3 Max divergent case/bgra/g2 24 elements differ (U32), the largest difference 1 A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6 Apple M3 Max divergent case/bgra/rf 2 elements differ (U32), the largest difference 1 A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6 Apple M3 Max divergent case/bgra/sn 6 elements differ (U32), the largest difference 1 A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6 Apple M3 Max divergent case/rgba/g0 24 elements differ (U32), the largest difference 1 A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6 Apple M3 Max divergent case/rgba/rf 2 elements differ (U32), the largest difference 1 A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6 Apple M3 Max divergent case/rgba/sn 6 elements differ (U32), the largest difference 1 A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6 Apple M3 Max divergent case/ar10/sl 80 elements differ (U32), the largest difference 8200 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-r10unormx6 Apple M3 Max divergent case/bgra/sl 80 elements differ (U32), the largest difference 8200 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-r10unormx6 Apple M3 Max divergent case/rgba/sl 80 elements differ (U32), the largest difference 8200 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-r10unormx6-srgb Apple M3 Max divergent case/ar10/g1 384 elements differ (U32), the largest difference 949922620 `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, where Metal reads its table's step over 8192 (code 1 reads 0), so a value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6-srgb Apple M3 Max divergent case/ar10/rf 32 elements differ (U32), the largest difference 949922620 `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, where Metal reads its table's step over 8192 (code 1 reads 0), so a value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6-srgb Apple M3 Max divergent case/ar10/sn 96 elements differ (U32), the largest difference 949922620 `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, where Metal reads its table's step over 8192 (code 1 reads 0), so a value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6-srgb Apple M3 Max divergent case/bgra/g2 384 elements differ (U32), the largest difference 949922620 `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, where Metal reads its table's step over 8192 (code 1 reads 0), so a value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6-srgb Apple M3 Max divergent case/bgra/rf 32 elements differ (U32), the largest difference 949922620 `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, where Metal reads its table's step over 8192 (code 1 reads 0), so a value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6-srgb Apple M3 Max divergent case/bgra/sn 96 elements differ (U32), the largest difference 949922620 `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, where Metal reads its table's step over 8192 (code 1 reads 0), so a value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6-srgb Apple M3 Max divergent case/rgba/g0 384 elements differ (U32), the largest difference 949922620 `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, where Metal reads its table's step over 8192 (code 1 reads 0), so a value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6-srgb Apple M3 Max divergent case/rgba/rf 32 elements differ (U32), the largest difference 949922620 `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, where Metal reads its table's step over 8192 (code 1 reads 0), so a value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6-srgb Apple M3 Max divergent case/rgba/sn 96 elements differ (U32), the largest difference 949922620 `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, where Metal reads its table's step over 8192 (code 1 reads 0), so a value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-r10unormx6-srgb Apple M3 Max divergent case/ar10/sl 122 elements differ (U32), the largest difference 949922620 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-r10unormx6-srgb Apple M3 Max divergent case/bgra/sl 122 elements differ (U32), the largest difference 949922620 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-r10unormx6-srgb Apple M3 Max divergent case/rgba/sl 122 elements differ (U32), the largest difference 949922620 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-rg10unormx12 Apple M3 Max divergent case/ar10/g1 12 elements differ (U32), the largest difference 1 A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rg10unormx12 Apple M3 Max divergent case/ar10/rf 1 element differs (U32): Metal 1021852175 (0x3ce83a0f), ours 1021852174 (0x3ce83a0e) A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rg10unormx12 Apple M3 Max divergent case/ar10/sn 3 elements differ (U32), the largest difference 1 A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rg10unormx12 Apple M3 Max divergent case/bgra/g2 12 elements differ (U32), the largest difference 1 A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rg10unormx12 Apple M3 Max divergent case/bgra/rf 1 element differs (U32): Metal 1021852175 (0x3ce83a0f), ours 1021852174 (0x3ce83a0e) A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rg10unormx12 Apple M3 Max divergent case/bgra/sn 3 elements differ (U32), the largest difference 1 A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rg10unormx12 Apple M3 Max divergent case/rgba/g0 12 elements differ (U32), the largest difference 1 A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rg10unormx12 Apple M3 Max divergent case/rgba/rf 1 element differs (U32): Metal 1021852175 (0x3ce83a0f), ours 1021852174 (0x3ce83a0e) A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rg10unormx12 Apple M3 Max divergent case/rgba/sn 3 elements differ (U32), the largest difference 1 A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal answers the correctly rounded quotient `c / 1023`, so a value is one `f32` ulp apart at some codes. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rg10unormx12 Apple M3 Max divergent case/ar10/sl 78 elements differ (U32), the largest difference 8201 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-rg10unormx12 Apple M3 Max divergent case/bgra/sl 157 elements differ (U32), the largest difference 8201 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-rg10unormx12 Apple M3 Max divergent case/rgba/sl 157 elements differ (U32), the largest difference 8201 A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so a lane's `float` differs from Metal's in its low bits (the site compares `float` bits as words). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it. Open: nothing beyond the note's documentation.
extended-swizzles-rgba16bfloat Apple M3 Max divergent case/ar10/g1 12 elements differ (U32), the largest difference 2150563840 A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, and narrows a `half` result by the device's conversion, where Metal answers the quiet NaN `0x7fc00000` and rounds a sample's `half` toward zero. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rgba16bfloat Apple M3 Max divergent case/ar10/rf 1 element differs (U32): Metal 2143289344 (0x7fc00000), ours 4293853184 (0xffef0000) A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, and narrows a `half` result by the device's conversion, where Metal answers the quiet NaN `0x7fc00000` and rounds a sample's `half` toward zero. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rgba16bfloat Apple M3 Max divergent case/ar10/sl 3 elements differ (U32), the largest difference 2150563840 A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, and narrows a `half` result by the device's conversion, where Metal answers the quiet NaN `0x7fc00000` and rounds a sample's `half` toward zero. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rgba16bfloat Apple M3 Max divergent case/ar10/sn 3 elements differ (U32), the largest difference 2150563840 A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, and narrows a `half` result by the device's conversion, where Metal answers the quiet NaN `0x7fc00000` and rounds a sample's `half` toward zero. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rgba16bfloat Apple M3 Max divergent case/bgra/g0 12 elements differ (U32), the largest difference 3801088 A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, and narrows a `half` result by the device's conversion, where Metal answers the quiet NaN `0x7fc00000` and rounds a sample's `half` toward zero. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rgba16bfloat Apple M3 Max divergent case/bgra/g2 12 elements differ (U32), the largest difference 2150563840 A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, and narrows a `half` result by the device's conversion, where Metal answers the quiet NaN `0x7fc00000` and rounds a sample's `half` toward zero. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rgba16bfloat Apple M3 Max divergent case/bgra/rf 2 elements differ (U32), the largest difference 2150563840 A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, and narrows a `half` result by the device's conversion, where Metal answers the quiet NaN `0x7fc00000` and rounds a sample's `half` toward zero. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rgba16bfloat Apple M3 Max divergent case/bgra/sl 6 elements differ (U32), the largest difference 2150563840 A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, and narrows a `half` result by the device's conversion, where Metal answers the quiet NaN `0x7fc00000` and rounds a sample's `half` toward zero. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rgba16bfloat Apple M3 Max divergent case/bgra/sn 6 elements differ (U32), the largest difference 2150563840 A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, and narrows a `half` result by the device's conversion, where Metal answers the quiet NaN `0x7fc00000` and rounds a sample's `half` toward zero. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rgba16bfloat Apple M3 Max divergent case/rgba/g0 12 elements differ (U32), the largest difference 2150563840 A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, and narrows a `half` result by the device's conversion, where Metal answers the quiet NaN `0x7fc00000` and rounds a sample's `half` toward zero. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rgba16bfloat Apple M3 Max divergent case/rgba/g2 12 elements differ (U32), the largest difference 3801088 A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, and narrows a `half` result by the device's conversion, where Metal answers the quiet NaN `0x7fc00000` and rounds a sample's `half` toward zero. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rgba16bfloat Apple M3 Max divergent case/rgba/rf 2 elements differ (U32), the largest difference 2150563840 A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, and narrows a `half` result by the device's conversion, where Metal answers the quiet NaN `0x7fc00000` and rounds a sample's `half` toward zero. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rgba16bfloat Apple M3 Max divergent case/rgba/sl 6 elements differ (U32), the largest difference 2150563840 A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, and narrows a `half` result by the device's conversion, where Metal answers the quiet NaN `0x7fc00000` and rounds a sample's `half` toward zero. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
extended-swizzles-rgba16bfloat Apple M3 Max divergent case/rgba/sn 6 elements differ (U32), the largest difference 2150563840 A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, and narrows a `half` result by the device's conversion, where Metal answers the quiet NaN `0x7fc00000` and rounds a sample's `half` toward zero. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-two-plane-samples-p2-lc-f Apple M3 Max divergent case/output/constexpr-sampler the digest is 304c290289b1c88f61c9092f05095ae4fc3250e0683c6ef849b6df7ba4072a9e on Metal and 6b2ce4d285f86c7b8a01c3c95b6fd3aa6919c19555c472da85766a7f8f1a8e4a here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2-lc-f Apple M3 Max divergent case/output/runtime-sampler the digest is 304c290289b1c88f61c9092f05095ae4fc3250e0683c6ef849b6df7ba4072a9e on Metal and 6b2ce4d285f86c7b8a01c3c95b6fd3aa6919c19555c472da85766a7f8f1a8e4a here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2-lc-h Apple M3 Max divergent case/output/constexpr-sampler the digest is 056c57a2917517418b57ec861f9c8de8ebb998d0e1a79aa78ba51f2ed865b221 on Metal and 1b4173098fbf06d15c70443e18d2f85eeda57f9a263828f157280f693f2749a7 here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2-lc-h Apple M3 Max divergent case/output/runtime-sampler the digest is 056c57a2917517418b57ec861f9c8de8ebb998d0e1a79aa78ba51f2ed865b221 on Metal and 1b4173098fbf06d15c70443e18d2f85eeda57f9a263828f157280f693f2749a7 here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2-lr-f Apple M3 Max divergent case/output/runtime-sampler the digest is 7f28042f92e7ba719bf0eae74a0b0dd88bccc3360d9f409762459f54e0eabf84 on Metal and 4890cb80fb4ca1e59635d19fc3da4602da93462a1438c1611a89ad0e2912bbed here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2-lr-h Apple M3 Max divergent case/output/runtime-sampler the digest is 27b3a8342de65f38ffcd578a91f47c3d18d9d4bbf0f30dad35b97f5a985fa9c1 on Metal and d95c51a3570017119e76bfe4e0858d321c01482a5771a89154f6cabab2fea768 here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2s-lc-f Apple M3 Max divergent case/output/constexpr-sampler the digest is 18e7c93583b98c9c11825886e6f0d39d8a05097e67ba2f520464eeb4bdd43350 on Metal and 8322027b981ef0a517eded43f3d143be0f213bb55499cf2b04c52e0f3ec7e047 here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2s-lc-f Apple M3 Max divergent case/output/runtime-sampler the digest is 18e7c93583b98c9c11825886e6f0d39d8a05097e67ba2f520464eeb4bdd43350 on Metal and 8322027b981ef0a517eded43f3d143be0f213bb55499cf2b04c52e0f3ec7e047 here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2s-lc-h Apple M3 Max divergent case/output/constexpr-sampler the digest is 5dcc9940c0db2c033ef4dc9a7c9e869bcbbe5525ca5037fdaa28b7d148b01a23 on Metal and 52c3b73b4e984dad5603624585959b7c6867c34392fffc9497e5c064ee5fe4ad here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2s-lc-h Apple M3 Max divergent case/output/runtime-sampler the digest is 5dcc9940c0db2c033ef4dc9a7c9e869bcbbe5525ca5037fdaa28b7d148b01a23 on Metal and 52c3b73b4e984dad5603624585959b7c6867c34392fffc9497e5c064ee5fe4ad here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2s-lr-f Apple M3 Max divergent case/output/runtime-sampler the digest is 6ff35014e270335757efb75b99ab4aa7968abe78497eec1b690161781facbdd9 on Metal and 3b5770ddbcde7093b26f001917778d7b6550a8daa58e90a054f3b9343cae92ef here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-two-plane-samples-p2s-lr-h Apple M3 Max divergent case/output/runtime-sampler the digest is 0df22c36e81b77136e19de14419c0e414bdd635f07fb54329a6d7213180ffaaa on Metal and 26591784c5e524976a0af3d12377326a82a5302afef71067c6b73ebef7d0b44f here A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sampler/extended.rs, `filtered`), where Metal sums the taps exactly on the format's grid and rounds half up, so the case's 4,096 results differ from Metal's in their low bits and the digest moves (a `half` result is the device's narrowing of the `float` sum). Under the native-arithmetic contract (rule 1) the device's arithmetic is the answer: `bicubic-filter-arithmetic` records it, its recorded bound a few grid steps, and validation derives no tolerance from it (the engine's `xr_samples` table holds each lane within it). Open: nothing beyond the note's documentation.
xr-blend-bgra10xr-add Apple M3 Max divergent case/texels 1448 elements differ (U16), the largest difference 64 A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-bgra10xr-premul Apple M3 Max divergent case/texels 1480 elements differ (U16), the largest difference 64 A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-bgr10xr-add Apple M3 Max divergent case/texels 1295 elements differ (U32), the largest difference 1049600 A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-bgr10xr-premul Apple M3 Max divergent case/texels 1010 elements differ (U32), the largest difference 1049600 A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
rgb10a2-srgb-samples-linear-f Apple M3 Max divergent case/notices we announced the degrade notice metal2vulkan-degrade-bicubic-filter-arithmetic, which the case declares nowhere `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, and encodes by the transfer and `RoundEven` of the product with 1023, where Metal reads `R10Unorm_X6_sRGB`'s table step over 8192 and writes through that table's thresholds, so a decoded value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound and a code within one; its alpha `a` reads `a` times the `f32` nearest `1 / 3`. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
rgb10a2-srgb-samples-linear-f Apple M3 Max divergent case/output/samples the digest is c2d96e3ab048750718d6eacb34a93a9d5596f83e0785889c6c0414a55266231c on Metal and de714c67f7c411b5cf821768f48ba0c576782f6efde6d30ba10f05b7a57d76a0 here `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, and encodes by the transfer and `RoundEven` of the product with 1023, where Metal reads `R10Unorm_X6_sRGB`'s table step over 8192 and writes through that table's thresholds, so a decoded value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound and a code within one; its alpha `a` reads `a` times the `f32` nearest `1 / 3`. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
rgb10a2-srgb-samples-linear-h Apple M3 Max divergent case/notices we announced the degrade notice metal2vulkan-degrade-bicubic-filter-arithmetic, which the case declares nowhere `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, and encodes by the transfer and `RoundEven` of the product with 1023, where Metal reads `R10Unorm_X6_sRGB`'s table step over 8192 and writes through that table's thresholds, so a decoded value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound and a code within one; its alpha `a` reads `a` times the `f32` nearest `1 / 3`. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
rgb10a2-srgb-samples-linear-h Apple M3 Max divergent case/output/samples the digest is e845db10fa9aaaae21423ab492ac576a62f9d0ecb85b5bb1c3a47bde8ccd9152 on Metal and 1af7a724ddcb11b90246993207e81e72d906f64b84569ce9a47f6051ab3d3f94 here `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Pow`, and encodes by the transfer and `RoundEven` of the product with 1023, where Metal reads `R10Unorm_X6_sRGB`'s table step over 8192 and writes through that table's thresholds, so a decoded value is within 1.64 `2^-13` steps of Metal's beyond the `Pow`'s bound and a code within one; its alpha `a` reads `a` times the `f32` nearest `1 / 3`. Under the native-arithmetic contract the device's conversions are the answer: `device-pack-conversion` records them, its recorded bound covering the difference, and validation derives no tolerance from it. Open: nothing.
xr-blend-bgra10xr-srgb-add Apple M3 Max divergent case/texels 949 elements differ (U16), the largest difference 128 A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-bgra10xr-srgb-premul Apple M3 Max divergent case/texels 1267 elements differ (U16), the largest difference 192 A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-bgr10xr-srgb-add Apple M3 Max divergent case/texels 681 elements differ (U32), the largest difference 3145728 A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-bgr10xr-srgb-premul Apple M3 Max divergent case/texels 831 elements differ (U32), the largest difference 4194304 A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-planes-add Apple M3 Max divergent case/reads 19996 elements differ (F32), the largest difference 0.003921627998352051 A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's, and the alpha plane's read-back (`xr2p_read_float`'s `float4`) follows the codes it reads. Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-planes-add Apple M3 Max divergent case/texels 1237 elements differ (U32), the largest difference 1049600 A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-planes-premul Apple M3 Max divergent case/reads 21124 elements differ (F32), the largest difference 0.003921627998352051 A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's, and the alpha plane's read-back (`xr2p_read_float`'s `float4`) follows the codes it reads. Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-planes-premul Apple M3 Max divergent case/texels 935 elements differ (U32), the largest difference 1049601 A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-planes-srgb-add Apple M3 Max divergent case/reads 26924 elements differ (F32), the largest difference 0.006021618843078613 A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's, and the alpha plane's read-back (`xr2p_read_float`'s `float4`) follows the codes it reads. Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-planes-srgb-add Apple M3 Max divergent case/texels 693 elements differ (U32), the largest difference 3145728 A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-planes-srgb-premul Apple M3 Max divergent case/reads 29451 elements differ (F32), the largest difference 0.0059773921966552734 A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's, and the alpha plane's read-back (`xr2p_read_float`'s `float4`) follows the codes it reads. Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
xr-blend-planes-srgb-premul Apple M3 Max divergent case/texels 843 elements differ (U32), the largest difference 2097152 A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, inside the pixel interlock, in the device's arithmetic (`extended_range::blend::native`: `S·Fs op D·Fd` in `float`, in the blend equation's order, the source clamped to the form's range), where Metal's compiler folds the blend into the function and rounds each step to `half`, so a stored channel lands a code from Metal's (a 16-bit element's difference of 64 is one 10-bit code, 128 two; a packed 32-bit word's difference reads as a code in each of two channels, 2097152 as two codes of its top channel). Under the native-arithmetic contract the device's arithmetic is the answer: `extended-range-blend-source` (in `replay::NATIVE_NOTES`) records it, its bound not measured, and validation derives no tolerance from it. Open: the note's documentation, which states no bound; this family puts it at two codes.
Can't render this file because it is too large.
-1
View File
@@ -147,7 +147,6 @@ fn main() {
"metal2vulkan/src/lower/fragment/stencil.rs",
"metal2vulkan/src/lower/arith/exact_division.rs",
"metal2vulkan/src/lower/arith/extended_range/blend_color.rs",
"metal2vulkan/src/lower/arith/extended_range/table.rs",
"metal2vulkan/src/lower/arith/pack.rs",
"metal2vulkan/src/lower/arith/srgb.rs",
"metal2vulkan/src/lower/mesh/work.rs",
@@ -1 +1 @@
41f569a24d072e661ed1dabe9a35f656e5f6ccd2b4be111957bb3899b7fc86d8
11255d563d98debc700627364fed0bbda740a349b0ce3c4fbaef7605515259b7
@@ -25,8 +25,9 @@
//! of a format the device holds as its UNORM twin decodes the codes by the device's transfer (a slot
//! of a format the device samples decodes on the device too, the same words); every other
//! difference fails. The extended-range
//! `_sRGB` twins, whose decode needs the module's tables, are not read so yet: their heap dispatch
//! is printed on a `HEAP-READ-UNCOVERED` line, refused or not, and not counted. A texture the
//! `_sRGB` twins, which a heap does not hold (`ExtendedRange::HEAP_READ`), are not read so yet:
//! their heap dispatch is printed on a `HEAP-READ-UNCOVERED` line, refused or not, and not
//! counted. A texture the
//! runtime does not make (the padded formats', whose plain creation is refused) is printed on a
//! `HEAP-READ-REFUSED` line and counted apart.
//!
+4 -10
View File
@@ -1033,11 +1033,6 @@ fn extended_fragment(
}
let mut b = ModuleBuilder::new();
let t = Types::new(&mut b)?;
let table = match form {
ExtendedRange::Rgb10A2Srgb => xr::declare_padded(&mut b, form)?,
_ if form.srgb() => Some(xr::declare(&mut b)?),
_ => None,
};
let uvec4 = b.ty(Type::Vector {
elem: t.u32_,
len: 4,
@@ -1050,7 +1045,7 @@ fn extended_fragment(
for texel in read_samples(&mut f, t, read, samples)? {
raws.push(extended_texel(&mut f, t, form, texel, source)?);
}
let value = resolve_extended(&mut f, t, form, table, &raws)?;
let value = resolve_extended(&mut f, t, form, &raws)?;
let output = f.module().global_value(output)?;
f.store(output, value, MemAccess::default())?;
f.ret(None)?;
@@ -1149,12 +1144,11 @@ fn averaged_codes(
}
/// The raw texel the resolve of `form` writes from each sample's raw texel `raws` (the module
/// docs), `table` the form's sRGB table where it has one.
/// docs).
fn resolve_extended(
f: &mut FunctionBuilder<'_>,
t: Types,
form: ExtendedRange,
table: Option<GlobalId>,
raws: &[Value],
) -> BResult<Value> {
let n = raws.len() as u32;
@@ -1186,7 +1180,7 @@ fn resolve_extended(
let average: ArmFn<'_, ()> = Box::new(|f, _| {
let mut sum: Option<Value> = None;
for &raw in raws {
let v = xr::decode(f, form, raw, table, false)?;
let v = xr::decode(f, form, raw, false)?;
sum = Some(match sum {
None => v,
Some(s) => f.binary_no_contraction(BinOp::FAdd, s, v)?,
@@ -1198,7 +1192,7 @@ fn resolve_extended(
let scale = f.composite_construct(t.vec4, &[scale; 4])?;
let mean = f.binary_no_contraction(BinOp::FMul, sum, scale)?;
let alpha_code = averaged_codes(f, t, &codes, bias)?;
let colors = xr::write_codes(f, form, mean, table)?;
let colors = xr::write_codes(f, form, mean)?;
// Within the samples' codes, where Metal's encode of an average of values that encode to
// them lies: a decoded code's encode can fall below it where codes share a decode step
// (`RGB10A2Unorm_sRGB`'s darkest).
@@ -1,7 +1,7 @@
//! The extended-range resolve modules (the module docs' extended-range forms): the forms Metal
//! multisamples, valid on every committed profile and needing nothing of a device, and on the CPU
//! interpreter a linear form's colors and every alpha by their rules, an `_sRGB` color within its
//! samples' codes, and a pixel of alike samples its code.
//! interpreter a linear form's colors and alpha by their rules, and a pixel of alike samples its
//! code (the `_sRGB` forms' transfer is the device's `Pow`, which the interpreter does not model).
use super::*;
use crate::spirv::interp::{run, Buffer, Config, Order, Resources};
@@ -115,11 +115,6 @@ const RESOLVED_OUT: ResourceSlot = ResourceSlot {
fn kernel(form: ExtendedRange, samples: u32) -> TypedModule {
let mut b = ModuleBuilder::new();
let t = Types::new(&mut b).expect("types");
let table = match form {
ExtendedRange::Rgb10A2Srgb => xr::declare_padded(&mut b, form).expect("table"),
_ if form.srgb() => Some(xr::declare(&mut b).expect("table")),
_ => None,
};
let words = super::super::visibility_resolve::words_buffer;
let input = words(&mut b, SAMPLES_IN, t.u32_).expect("in");
let output = words(&mut b, RESOLVED_OUT, t.u32_).expect("out");
@@ -160,7 +155,7 @@ fn kernel(form: ExtendedRange, samples: u32) -> TypedModule {
}
raws.push(f.composite_construct(uvec4, &lanes)?);
}
let out = resolve_extended(f, t, form, table, &raws)?;
let out = resolve_extended(f, t, form, &raws)?;
let four = uint(f, t, 4)?;
let out_base = f.binary(BinOp::IMul, i, four)?;
for lane in 0..4 {
@@ -276,14 +271,18 @@ fn resolved(form: ExtendedRange, samples: usize, pixels: &[Vec<[u32; 4]>]) -> Ve
.collect()
}
/// A linear form's color is the samples' codes' average rounded half up (Metal's rule); every
/// form's alpha its near-equivalent (`BGRA10_XR`'s a tie down, `RGB10A2Unorm_sRGB`'s up); an
/// `_sRGB` color lies within its samples' codes; and a pixel of alike samples is their code, with
/// the unused bits as Metal writes them.
/// A linear form's color is the samples' codes' average rounded half up (Metal's rule); its
/// alpha its near-equivalent (`BGRA10_XR`'s a tie down); and a pixel of alike samples is their
/// code, with the unused bits as Metal writes them. The `_sRGB` forms' (and
/// `RGB10A2Unorm_sRGB`'s) decode and encode take the transfer by the device's `Pow`, which the
/// interpreter does not model: their colors, held within the samples' codes, are the device's.
#[test]
fn the_resolves_follow_their_rules() {
let mut r = SplitMix(0x5eed_0e7e);
for form in FORMS {
let linear = FORMS
.into_iter()
.filter(|f| !f.srgb() && *f != ExtendedRange::Rgb10A2Srgb);
for form in linear {
for samples in [2usize, 4, 8] {
let mut pixels: Vec<Vec<[u32; 4]>> = Vec::new();
for i in 0..384 {
@@ -113,11 +113,6 @@ fn build(form: ExtendedRange, declared: crate::spv::ImageFormat) -> BResult<Type
let shadow_ty = image(&mut b, f32_, crate::spv::ImageFormat::Rgba16f)?;
let codes = b.resource(CODES, StorageClass::UniformConstant, codes_ty)?;
let shadow = b.resource(SHADOW, StorageClass::UniformConstant, shadow_ty)?;
// An `_sRGB` form's color channels decode through Metal's table.
let table = match form.srgb() {
true => Some(extended_range::declare(&mut b)?),
false => None,
};
let invocation = b.builtin(crate::spv::BuiltIn::GlobalInvocationId, IoDir::Input, uvec3)?;
let void = b.ty(Type::Void)?;
let mut f = b.function(void)?;
@@ -140,7 +135,7 @@ fn build(form: ExtendedRange, declared: crate::spv::ImageFormat) -> BResult<Type
let pixel = f.composite_construct(uvec2, &[x, y])?;
let plain = ImageOperands::default();
let raw = f.read(codes, pixel, &plain, TexelMemory::default())?;
let value = extended_range::tile_value(f, form, raw, table)?;
let value = extended_range::tile_value(f, form, raw)?;
f.write(shadow, pixel, value, &plain, TexelMemory::default())?;
Ok(ArmEnd::FallThrough(Vec::new()))
});
@@ -78,7 +78,9 @@ fn each_texel_of_the_shadow_takes_its_codes_tile_value() {
height.div_ceil(ExtendedShadowModule::LOCAL_SIZE),
1,
];
for form in EVERY_FORM {
// The `_sRGB` forms' decode takes the transfer by the device's `Pow`, which the interpreter
// does not model: their tile values are the device's.
for form in EVERY_FORM.into_iter().filter(|f| !f.srgb()) {
let m = extended_shadow_typed_module(form)
.expect("a measured form")
.expect("built");
+2 -2
View File
@@ -60,7 +60,7 @@ mod tests;
/// unchanged version, and its bless records the version. Independent of the crate's version and of
/// [`ARTIFACT_FORMAT_VERSION`]. The commit that bumps it says what changed; this comment keeps no
/// history.
pub const SEMANTICS_VERSION: u32 = 1926;
pub const SEMANTICS_VERSION: u32 = 1927;
/// The byte-layout version of encoded artifacts (`CompiledFunction::to_bytes` and the
/// [`PipelineArtifact`] encodings). Every encoded artifact carries it, and a decode under another
@@ -93,7 +93,7 @@ pub const ARTIFACT_FORMAT_VERSION: u32 = 479;
/// changes no behaviour, and then updates that hash alone with the commit saying why, or changes
/// behaviour and also bumps this version. The commit that bumps it says what changed; this comment
/// keeps no history.
pub const RUNTIME_VERSION: u32 = 1700;
pub const RUNTIME_VERSION: u32 = 1701;
/// The digest of the sources this build of the crate was compiled from: SHA-256, as lowercase hex,
/// of the manifest, the build script, and exactly the files the crate roots' module tree compiles
@@ -119,9 +119,8 @@ fn unorm_bits(bits: u8) -> BResult<u32> {
/// Every step is decorated `NoContraction`, so no device fuses or reassociates the split, and
/// none relies on the rounding mode: an exhaustive check of every `f32` in `[0, 1]` for every
/// `k` matched the exact product rounded to nearest even under rounding to nearest and toward zero,
/// with and without denormals flushed. About fourteen instructions, where
/// [`round_exact_product_lanes`](crate::lower::arith::math::round_exact_product_lanes) takes about
/// forty and a conversion back.
/// with and without denormals flushed. About fourteen instructions, where an exact product formed
/// in integers takes about forty and a conversion back.
fn round_mersenne_product(
fb: &mut FunctionBuilder<'_>,
s: Form,
@@ -1,62 +1,52 @@
//! Apple's extended-range texels (`metal::format::ExtendedRange`): Metal's value of each raw code a
//! slot reads, and the code of each value it writes, exact on every device.
//! Apple's extended-range texels (`metal::format::ExtendedRange`): the value of each raw code a
//! slot reads, and the code of each value it writes, by the device's arithmetic.
//!
//! A channel's 10-bit code `c` holds `(c - 384) / 510`: a read answers it correctly rounded
//! ([`texel_round::ratio_to_f32`](super::texel_round::ratio_to_f32) of `|c - 384|` over 1020,
//! doubled), alpha clamped to `[0, 1]` first, and a `half` result rounds that value with ties away
//! from zero ([`decode`]); a write rounds the exact product of the value with 510 to nearest even
//! ([`math::round_exact_product_lanes`](super::math::round_exact_product_lanes), the magnitude
//! below 1.5 first) and clamps the code (alpha to `[384, 894]`), a NaN 0. An `_sRGB` format's color
//! channel goes through Metal's own tables, symmetric about code 384 ([`declare`]): a read answers
//! `s / 8192` for the step `s` of `|c - 384|`, signed; a write rounds the magnitude (below 2 first)
//! to `2^-13`, nearest even (an exact product and `RoundEven`), and the offset is the largest whose
//! first index is at most that ([`search`]), at most 384 below the zero code. Both tables were read
//! from an Apple M3 Max and an Apple M4 (byte-identical): every code read, and every threshold
//! between two adjacent codes found by bisection over the `f32`s, every half, and a dense grid
//! written. The MSL transfer `((x + 0.055) / 1.055)^2.4` rounded to `2^-13` gives every decode
//! step; it misses 32 of the 639 encode thresholds, which Metal places by its own arithmetic.
//! A channel's 10-bit code `c` holds `(c - 384) / 510`: a read answers `float(c - 384)` times the
//! `f32` nearest `1 / 510` (alpha's code clamped to `[384, 894]` first, a two-plane texel's alpha
//! byte `b` times the `f32` nearest `1 / 255`); a write takes the value, a NaN as 0, clamped to the
//! codes' range (alpha to `[0, 1]`), times 510, `RoundEven`, plus 384 ([`encode`]), as
//! `arith::pack` encodes `rgb10a2`. A padded format's code `c` reads `float(c)` times the `f32`
//! nearest `1 / 1023` (`RGB10A2Unorm_sRGB`'s alpha `1 / 3`) and writes `RoundEven(clamp(v, 0, 1) ·
//! 1023)`. An `_sRGB` color channel goes through the MSL transfer by the device's `Pow`
//! (`arith::pack`'s): a read decodes the magnitude of the linear value of its code, signed, and a
//! write encodes the magnitude of the value, signed, before the code's rounding;
//! `RG10Unorm_X12_sRGB` reads its codes linearly and writes the 8-bit sRGB code of its linear code
//! `m` over 4092 (`RoundEven(255 · srgb(m / 4092))`), as Metal does. A `half` result is the
//! device's narrowing of the `float` value (`narrow::round_texel`).
//!
//! Metal answers the correctly rounded quotient, rounds its `half` with ties away from zero,
//! encodes by the exact product, and converts the `_sRGB` forms through its own tables, which
//! the transfer meets: within half a `2^-13` step of each extended-range decode step, a code of
//! each encode (32 of the 16,385 values on the `2^-13` grid up to 2 a code apart), within 1.64
//! steps of `R10Unorm_X6_sRGB`'s decode steps and a code of its encode (381 of 8,193), and a code
//! of `RG10Unorm_X12_sRGB`'s write (36 of the 1,024 linear codes). Every function that converts
//! such a texel records `PrecisionNote::DevicePackConversion` (`ArithPlan::converts`).
//!
//! A bfloat form's texel is each code shifted up 16 bits as a `float`, a NaN as it is; a write
//! keeps a value's top 16 bits, a NaN kept a NaN by its quiet bit.
use crate::lower::arith::legal::{FloatFmt, Form, Held};
use crate::lower::arith::math::round_exact_product_lanes;
use crate::lower::arith::narrow;
use crate::lower::arith::ops::{fsplat, splat};
use crate::lower::arith::texel_round::{f32_to_half, ratio_to_f32, HalfRounding};
use crate::lower::arith::pack::{srgb_decode, srgb_encode};
use crate::metal::format::ExtendedRange;
use crate::spirv::builder::FunctionBuilder;
use crate::spirv::error::BResult;
use crate::spirv::ids::{GlobalId, Value};
use crate::spirv::ir::{BinOp, ConstBits, Constant, ConvOp, GlslOp, Type};
use crate::spirv::ids::Value;
use crate::spirv::ir::{BinOp, ConstBits, Constant, ConvOp, GlslOp, Type, UnOp};
pub mod blend;
pub(crate) mod blend_color;
pub use blend::Blend;
pub(crate) mod table;
pub use table::{declare, declare_padded, search};
use table::{word, TABLE_LEN};
/// The census name the table is charged to ([`TABLE_WORDS`]), once per module that declares it
/// ([`ArithPlan::extended_range_srgb`](super::ArithPlan::extended_range_srgb)).
pub const CENSUS_NAME: &str = "texture.extended_range_srgb";
/// An upper estimate of the SPIR-V words of one texel's [`decode`]: the codes, the conversion
/// and product, an `_sRGB` form's transfer (its steps and constants) and sign, and the `half`
/// narrowing.
pub const DECODE_WORDS: u32 = 40 * 6 + 9 * 6 + 5 * 8 + 64 + 16;
/// An upper estimate of the SPIR-V words of the table ([`declare`]): its distinct constants,
/// the composite, and the variable, charged once per module.
pub const TABLE_WORDS: u32 = 641 * 4 + TABLE_LEN + 3 + 8;
/// The census name a padded `_sRGB` form's table is charged to ([`PADDED_TABLE_WORDS`]), once
/// per module and form that declares it
/// ([`ArithPlan::padded_srgb`](super::ArithPlan::padded_srgb)).
pub const PADDED_CENSUS_NAME: &str = "texture.padded_srgb";
/// An upper estimate of the SPIR-V words of a padded `_sRGB` form's table ([`declare_padded`]):
/// at most one distinct constant per code, the composite, and the variable.
pub const PADDED_TABLE_WORDS: u32 = TABLE_LEN * 4 + TABLE_LEN + 3 + 8;
/// An upper estimate of the SPIR-V words of one texel's [`decode`]: the codes, the quotients'
/// exact sequence on four lanes, the signs, and three table reads.
pub const DECODE_WORDS: u32 = 140 * 6;
/// An upper estimate of the SPIR-V words of one texel's [`encode`]: the clean value, the exact
/// products on four lanes, the codes, three searches of ten steps, and the packing.
pub const ENCODE_WORDS: u32 = 220 * 6;
/// An upper estimate of the SPIR-V words of one texel's [`encode`]: the clean value, an `_sRGB`
/// form's transfer and sign, the clamp, product, rounding and conversion, and the packing.
pub const ENCODE_WORDS: u32 = 48 * 6 + 9 * 6 + 5 * 8;
/// Four `u32` lanes.
fn words() -> Form {
@@ -74,6 +64,16 @@ fn floats() -> Form {
words().with(Held::Float(FloatFmt::F32))
}
/// Four `half` lanes, held as `f32`.
fn halves() -> Form {
words().with(Held::Float(FloatFmt::Half))
}
/// Four `bfloat` lanes, held as `f32`.
fn bfloats() -> Form {
words().with(Held::Float(FloatFmt::BFloat))
}
/// The four codes of raw texel `raw` (the raw format's `uvec4` as a read gives it) in Metal's
/// channel order, red first; `BGR10_XR`'s alpha is the code of 1, and `BGRA10_XR`'s is clamped
/// to `[384, 894]`, the codes of `[0, 1]`. A two-plane texel's alpha is its alpha byte (the
@@ -118,7 +118,7 @@ pub(crate) fn codes(
fb.glsl(GlslOp::UClamp, &[c, lo, hi])
}
// A padded format's words hold each code in their top 10 bits; blue is 0 and alpha the
// code of 1 (`value_of_codes` divides every lane by 1023).
// code of 1 (`value_of_codes` scales every lane by `1 / 1023`).
ExtendedRange::R10X6
| ExtendedRange::Rg10X12
| ExtendedRange::R10X6Srgb
@@ -155,15 +155,6 @@ fn padded_lanes(form: ExtendedRange) -> &'static [u32] {
}
}
/// A padded `_sRGB` form's conversion without its table ([`declare_padded`]), which its
/// selection declares (`ArithPlan::converts`).
fn missing_table() -> crate::spirv::error::BuildError {
crate::spirv::error::BuildError::Operand {
op: crate::spv::Op::AccessChain,
rule: crate::spirv::error::OperandRule::NotPointer,
}
}
/// A `uvec4` constant of the four lanes `v`.
fn per_lane(fb: &mut FunctionBuilder<'_>, v: [u32; 4]) -> BResult<Value> {
let ut = crate::lower::arith::ops::ty(fb, words())?;
@@ -185,41 +176,30 @@ fn per_lane(fb: &mut FunctionBuilder<'_>, v: [u32; 4]) -> BResult<Value> {
fb.module().const_value(c)
}
/// Metal's value of raw texel `raw` of a slot bound in `form` (the raw format's `uvec4`), a
/// `vec4` of `f32`, red first. `table` is the module's ([`declare`]) for an `_sRGB` form, whose
/// color channels then read through it, and `None` for a linear one. For a `half` result
/// (`half`) each lane is rounded to `half` with ties away from zero, held as the `f32` of that
/// value: Metal rounds every tie so (an `_sRGB` color step `s / 8192` of an odd multiple of half
/// a `half` ulp: each of the 13,458 ties of `BGRA10_XR_sRGB`'s and 25,502 of `BGR10_XR_sRGB`'s
/// reads), and a linear lane's `(c - 384) / 510` is never a tie.
/// The value of raw texel `raw` of a slot bound in `form` (the raw format's `uvec4`), a `vec4` of
/// `f32`, red first (the module docs). For a `half` result (`half`) each lane is the device's
/// narrowing of that value to `half`, held as the `f32` of it.
pub fn decode(
fb: &mut FunctionBuilder<'_>,
form: ExtendedRange,
raw: Value,
table: Option<GlobalId>,
half: bool,
) -> BResult<Value> {
if form.bfloat() {
return bfloat_value(fb, form, raw, half);
}
let c = codes(fb, form, raw)?;
value_of_codes(fb, form, c, table, half)
value_of_codes(fb, form, c, half)
}
/// Metal's tile value of raw texel `raw` of a color attachment of `form` (a framebuffer fetch's
/// read; byte-identical, a `float` and a `half` read alike): a `vec4` of
/// `f32`, red first, each lane a `half` value. The tile holds no color code above 1022: a linear
/// form's code and `BGRA10_XR_sRGB`'s are clamped to 1022 and decoded ([`decode`]),
/// `BGR10_XR_sRGB`'s and the two-plane twin's decoded and then clamped to the linear values of
/// codes 0 and 1022, `[-384 / 510, 638 / 510]`; each lane is rounded to `half` with ties away from
/// zero (only an `_sRGB` step can tie). Alpha is [`decode`]'s.
pub fn tile_value(
fb: &mut FunctionBuilder<'_>,
form: ExtendedRange,
raw: Value,
table: Option<GlobalId>,
) -> BResult<Value> {
let f = floats();
/// The tile value of raw texel `raw` of a color attachment of `form` (a framebuffer fetch's
/// read, a `float` and a `half` read alike): a `vec4` of `f32`, red first, each lane a `half`
/// value. Metal's tile holds no color code above 1022: a linear form's code and
/// `BGRA10_XR_sRGB`'s are clamped to 1022 and decoded ([`decode`]), `BGR10_XR_sRGB`'s and the
/// two-plane twin's decoded and then clamped to the linear values of codes 0 and 1022,
/// `[-384 / 510, 638 / 510]`; each lane is the device's narrowing of that value to `half`.
/// Alpha is [`decode`]'s.
pub fn tile_value(fb: &mut FunctionBuilder<'_>, form: ExtendedRange, raw: Value) -> BResult<Value> {
let c = codes(fb, form, raw)?;
let by_code = !form.srgb() || matches!(form, ExtendedRange::Bgra10 { .. });
let c = match by_code {
@@ -229,7 +209,7 @@ pub fn tile_value(
}
false => c,
};
let v = value_of_codes(fb, form, c, table, false)?;
let v = value_of_codes(fb, form, c, false)?;
let v = match by_code {
true => v,
false => {
@@ -240,7 +220,7 @@ pub fn tile_value(
fb.glsl(GlslOp::FClamp, &[v, lo, hi])?
}
};
f32_to_half(fb, f, v, HalfRounding::NearestAway)
narrow::round(fb, halves(), v)
}
/// Metal's read of the tile memory of an attachment of `form` that holds `held` (a `vec4` of
@@ -276,123 +256,107 @@ fn source_range(form: ExtendedRange) -> (f32, f32) {
}
}
/// The `ivec4` type.
fn ivec4(fb: &mut FunctionBuilder<'_>) -> BResult<crate::spirv::ids::TypeId> {
let i32_ = fb.module().ty(Type::Int {
width: 32,
signed: true,
})?;
fb.module().ty(Type::Vector { elem: i32_, len: 4 })
}
/// The lanes of `x` where `colour` holds and of `t` elsewhere (a shuffle of the two).
fn colour_lanes(
fb: &mut FunctionBuilder<'_>,
x: Value,
t: Value,
colour: [bool; 4],
) -> BResult<Value> {
let pick: Vec<u32> = (0u32..)
.zip(colour)
.map(|(i, c)| if c { i } else { 4 + i })
.collect();
fb.vector_shuffle(x, t, &pick)
}
/// The lanes, red first, an `_sRGB` form's transfer converts: its color channels.
/// `RG10Unorm_X12_sRGB`'s reads are linear and its writes take their own transfer
/// ([`padded_codes`]).
fn srgb_lanes(form: ExtendedRange) -> [bool; 4] {
match form {
ExtendedRange::Bgr10 { srgb: true }
| ExtendedRange::Bgra10 { srgb: true }
| ExtendedRange::Planes { srgb: true }
| ExtendedRange::Rgb10A2Srgb => [true, true, true, false],
ExtendedRange::R10X6Srgb => [true, false, false, false],
_ => [false; 4],
}
}
/// [`decode`]'s value of the codes `c` ([`codes`]) of `form`.
fn value_of_codes(
fb: &mut FunctionBuilder<'_>,
form: ExtendedRange,
c: Value,
table: Option<GlobalId>,
half: bool,
) -> BResult<Value> {
let (u, f) = (words(), floats());
// A padded format's lane reads `c / 1023` correctly rounded, its `half` to nearest even
// (every code; `c / 1023` is never a `half` tie), `RG10Unorm_X12_sRGB`'s too.
// `R10Unorm_X6_sRGB`'s red reads its code's decode step `s / 8192` (every code), its `half`
// with ties away from zero (every code); so do `RGB10A2Unorm_sRGB`'s red, green and blue,
// and its alpha `a / 3` correctly rounded, never a `half` tie (an Apple M3 Max, every code).
if form.padded() {
let d = match form {
ExtendedRange::Rgb10A2Srgb => per_lane(fb, [1023, 1023, 1023, 3])?,
_ => splat(fb, u, 1023)?,
};
let v = ratio_to_f32(fb, u, c, d)?;
let (v, rounding) = match form {
ExtendedRange::R10X6Srgb | ExtendedRange::Rgb10A2Srgb => {
let table = table.ok_or_else(missing_table)?;
let colors = srgb_channels(form);
let ft = crate::lower::arith::ops::ty(fb, f)?;
let mut lanes = Vec::with_capacity(4);
for lane in 0..4u32 {
lanes.push(match lane < colors {
true => {
let code = fb.composite_extract(c, &[lane])?;
table_step(fb, table, code)?
}
false => fb.composite_extract(v, &[lane])?,
});
}
let v = fb.composite_construct(ft, &lanes)?;
(v, HalfRounding::NearestAway)
}
_ => (v, HalfRounding::NearestEven),
};
return match half {
true => f32_to_half(fb, f, v, rounding),
false => Ok(v),
};
}
// A two-plane texel's alpha byte `b` reads `b / 255`: its zero code is 0, and its quotient
// is over 255, not doubled.
let planes = matches!(form, ExtendedRange::Planes { .. });
let zero_code = match planes {
true => per_lane(fb, [384, 384, 384, 0])?,
false => splat(fb, u, 384)?,
};
let neg = fb.binary(BinOp::ULessThan, c, zero_code)?;
let up = fb.binary(BinOp::ISub, c, zero_code)?;
let down = fb.binary(BinOp::ISub, zero_code, c)?;
let n = fb.select(neg, down, up)?;
// |c - 384| / 510, correctly rounded: the quotient over 1020 (its operands within the
// routine's `k <= d`), doubled exactly.
let (d, two) = match planes {
true => (
per_lane(fb, [1020, 1020, 1020, 255])?,
per_lane_f(fb, [2.0, 2.0, 2.0, 1.0])?,
),
false => (splat(fb, u, 1020)?, fsplat(fb, f, 2.0)?),
};
let q = ratio_to_f32(fb, u, n, d)?;
let mut v = fb.binary(BinOp::FMul, q, two)?;
if let Some(table) = table {
let ft = crate::lower::arith::ops::ty(fb, f)?;
let mut lanes = Vec::with_capacity(4);
for lane in 0..3u32 {
let i = fb.composite_extract(n, &[lane])?;
lanes.push(table_step(fb, table, i)?);
let f = floats();
let ft = crate::lower::arith::ops::ty(fb, f)?;
let (n, scale) = match form.padded() {
// A padded format's lane: its code; `RGB10A2Unorm_sRGB`'s alpha over 3.
true => {
let n = fb.convert(ConvOp::ConvertUToF, c, ft)?;
let a = match form {
ExtendedRange::Rgb10A2Srgb => 3.0,
_ => 1023.0,
};
(n, [1023.0, 1023.0, 1023.0, a])
}
lanes.push(fb.composite_extract(v, &[3])?);
v = fb.composite_construct(ft, &lanes)?;
}
let minus = fb.unary(crate::spirv::ir::UnOp::FNegate, v)?;
let v = fb.select(neg, minus, v)?;
// A code less the zero code, signed; a two-plane texel's alpha byte over 255.
false => {
let planes = matches!(form, ExtendedRange::Planes { .. });
let (zero, a) = match planes {
true => (per_lane(fb, [384, 384, 384, 0])?, 255.0),
false => (per_lane(fb, [384; 4])?, 510.0),
};
let d = fb.binary(BinOp::ISub, c, zero)?;
let it = ivec4(fb)?;
let d = fb.convert(ConvOp::Bitcast, d, it)?;
(
fb.convert(ConvOp::ConvertSToF, d, ft)?,
[510.0, 510.0, 510.0, a],
)
}
};
let r = per_lane_f(fb, scale.map(|d: f32| 1.0 / d))?;
let v = fb.binary(BinOp::FMul, n, r)?;
let colour = srgb_lanes(form);
let v = match colour.contains(&true) {
// The transfer of the magnitude, signed.
true => {
let m = fb.glsl(GlslOp::FAbs, &[v])?;
let t = srgb_decode(fb, f, m)?;
let minus = fb.unary(UnOp::FNegate, t)?;
let zero = fsplat(fb, f, 0.0)?;
let neg = fb.binary(BinOp::FOrdLessThan, v, zero)?;
let t = fb.select(neg, minus, t)?;
colour_lanes(fb, t, v, colour)?
}
false => v,
};
match half {
true => f32_to_half(fb, f, v, HalfRounding::NearestAway),
true => narrow::round_texel(fb, halves(), v),
false => Ok(v),
}
}
/// The value `s / 8192` of the decode step `s` in the low half of word `i` (a `u32` scalar) of
/// `table`, exact.
fn table_step(fb: &mut FunctionBuilder<'_>, table: GlobalId, i: Value) -> BResult<Value> {
let f1 = fb.module().ty(Type::Float { width: 32 })?;
let mask = fb.u32_const(0xFFFF)?;
let mask = fb.module().const_value(mask)?;
let scale = fb.module().constant(Constant::Scalar {
ty: f1,
bits: ConstBits(u64::from((1.0f32 / 8192.0).to_bits())),
})?;
let scale = fb.module().const_value(scale)?;
let w = word(fb, table, i)?;
let s = fb.binary(BinOp::BitwiseAnd, w, mask)?;
let s = fb.convert(ConvOp::ConvertUToF, s, f1)?;
fb.binary(BinOp::FMul, s, scale)
}
/// The raw texel (the raw format's `uvec4`) a write of `v` (a `vec4` of `f32`, red first) to a
/// slot bound in `form` stores, as Metal writes it. `table` is the module's ([`declare`]) for an
/// `_sRGB` form, whose color channels then encode through it, and `None` for a linear one.
pub fn encode(
fb: &mut FunctionBuilder<'_>,
form: ExtendedRange,
v: Value,
table: Option<GlobalId>,
) -> BResult<Value> {
// A padded format's code is the exact product of the value clamped to [0, 1] with 1023,
// rounded to nearest (every value of a grid and around every midpoint), in
// its word's top 10 bits, the low 6 bits zero.
/// slot bound in `form` stores (the module docs).
pub fn encode(fb: &mut FunctionBuilder<'_>, form: ExtendedRange, v: Value) -> BResult<Value> {
// A padded format's code in its word's top 10 bits, the low 6 bits zero.
if form.padded() {
let u = words();
let k = padded_codes(fb, form, v, table)?;
let k = padded_codes(fb, form, v)?;
if form == ExtendedRange::Rgb10A2Srgb {
return pack(fb, form, k);
}
@@ -404,51 +368,85 @@ pub fn encode(
if form.bfloat() {
return bfloat_texel(fb, form, v);
}
let code = linear_codes(fb, form, v, table)?;
let code = linear_codes(fb, form, v)?;
pack(fb, form, code)
}
/// The codes a write of `v` (a `vec4` of `f32`, red first) to a slot of a padded form stores
/// ([`encode`]): the exact product of the value, clamped to `[0, 1]` (a NaN 0), with 1023 (alpha's
/// with 3), rounded to nearest, an `_sRGB` form's color codes through its `table`.
fn padded_codes(
/// `v` (a `vec4` of `f32`) with a NaN lane 0.
fn clean(fb: &mut FunctionBuilder<'_>, v: Value) -> BResult<Value> {
let zero = fsplat(fb, floats(), 0.0)?;
let nan = fb.unary(UnOp::IsNan, v)?;
fb.select(nan, zero, v)
}
/// `v` (a `vec4` of `f32` within the codes' range) times `scale` per lane, `RoundEven`, plus
/// `bias` per lane, as `u32` codes.
fn rounded_codes(
fb: &mut FunctionBuilder<'_>,
form: ExtendedRange,
v: Value,
table: Option<GlobalId>,
scale: [f32; 4],
bias: [f32; 4],
) -> BResult<Value> {
let scale = per_lane_f(fb, scale)?;
let x = fb.binary(BinOp::FMul, v, scale)?;
let x = fb.glsl(GlslOp::RoundEven, &[x])?;
let x = match bias.iter().any(|&b| b != 0.0) {
true => {
let bias = per_lane_f(fb, bias)?;
fb.binary(BinOp::FAdd, x, bias)?
}
false => x,
};
let ut = crate::lower::arith::ops::ty(fb, words())?;
fb.convert(ConvOp::ConvertFToU, x, ut)
}
/// The codes a write of `v` (a `vec4` of `f32`, red first) to a slot of a padded form stores
/// ([`encode`]): the value, a NaN 0, clamped to `[0, 1]`, an `_sRGB` color channel through the
/// transfer, times 1023 (`RGB10A2Unorm_sRGB`'s alpha 3), `RoundEven`. `RG10Unorm_X12_sRGB`'s
/// red and green are the 8-bit sRGB codes of their linear codes `m` over 4092,
/// `RoundEven(255 · srgb(m / 4092))`, as Metal writes them.
fn padded_codes(fb: &mut FunctionBuilder<'_>, form: ExtendedRange, v: Value) -> BResult<Value> {
let f = floats();
let v = clean(fb, v)?;
let zero = fsplat(fb, f, 0.0)?;
let nan = fb.unary(crate::spirv::ir::UnOp::IsNan, v)?;
let v = fb.select(nan, zero, v)?;
let one = fsplat(fb, f, 1.0)?;
let v = fb.glsl(GlslOp::FClamp, &[v, zero, one])?;
let scales: &[u32] = match form {
ExtendedRange::Rgb10A2Srgb => &[1023, 1023, 1023, 3],
_ => &[1023],
};
let k = round_exact_product_lanes(fb, f, v, scales, false)?;
match form {
ExtendedRange::R10X6Srgb | ExtendedRange::Rg10X12Srgb | ExtendedRange::Rgb10A2Srgb => {
let table = table.ok_or_else(missing_table)?;
padded_srgb_codes(fb, form, table, v, k)
let colour = srgb_lanes(form);
let v = match colour.contains(&true) {
true => {
let t = srgb_encode(fb, f, v)?;
colour_lanes(fb, t, v, colour)?
}
_ => Ok(k),
false => v,
};
let alpha = match form {
ExtendedRange::Rgb10A2Srgb => 3.0,
_ => 1023.0,
};
let k = rounded_codes(fb, v, [1023.0, 1023.0, 1023.0, alpha], [0.0; 4])?;
if form != ExtendedRange::Rg10X12Srgb {
return Ok(k);
}
let ft = crate::lower::arith::ops::ty(fb, f)?;
let m = fb.convert(ConvOp::ConvertUToF, k, ft)?;
let r = fsplat(fb, f, f64::from(1.0f32 / 4092.0))?;
let m = fb.binary(BinOp::FMul, m, r)?;
let t = srgb_encode(fb, f, m)?;
rounded_codes(fb, t, [255.0; 4], [0.0; 4])
}
/// The codes (red first) a write of `v` (a `vec4` of `f32`, red first) to a slot of `form` stores,
/// as [`encode`] packs them: a linear or `_sRGB` form's color codes and alpha's, or a padded
/// form's. `table` is the form's ([`declare`], [`declare_padded`]) where it has one.
/// form's.
pub(crate) fn write_codes(
fb: &mut FunctionBuilder<'_>,
form: ExtendedRange,
v: Value,
table: Option<GlobalId>,
) -> BResult<Value> {
match form.padded() {
true => padded_codes(fb, form, v, table),
false => linear_codes(fb, form, v, table),
true => padded_codes(fb, form, v),
false => linear_codes(fb, form, v),
}
}
@@ -462,13 +460,10 @@ fn bfloat_lanes(form: ExtendedRange) -> &'static [u32] {
}
}
/// Metal's value of raw texel `raw` of a bfloat form ([`decode`]; `metal::format::ExtendedRange`'s
/// `R16Bfloat`): each channel's code shifted up 16 bits as a `float`, any NaN code (its magnitude
/// past `0x7f80`) the quiet NaN `0x7fc00000`; a channel the form lacks 0 and alpha 1; a `half`
/// result of a read or a gather each lane rounded to nearest even (an Apple M4: every code of each
/// bfloat format, `float` and `half` reads, `read_write`, nearest and linear samples alike;
/// gathers); a sample's `half` result rounds toward zero instead ([`bfloat_sample_half`]). Integer
/// operations on the bits alone, so no float mode changes the answer.
/// The value of raw texel `raw` of a bfloat form ([`decode`]; `metal::format::ExtendedRange`'s
/// `R16Bfloat`): each channel's code shifted up 16 bits as a `float`, a NaN code's NaN as it is
/// (Metal answers `0x7fc00000`); a channel the form lacks 0 and alpha 1; a `half` result the
/// device's narrowing of each lane.
fn bfloat_value(
fb: &mut FunctionBuilder<'_>,
form: ExtendedRange,
@@ -477,39 +472,28 @@ fn bfloat_value(
) -> BResult<Value> {
let (u, f) = (words(), floats());
let ft = crate::lower::arith::ops::ty(fb, f)?;
let low = splat(fb, u, 0x7FFF)?;
let mag = fb.binary(BinOp::BitwiseAnd, raw, low)?;
let inf = splat(fb, u, 0x7F80)?;
let nan = fb.binary(BinOp::UGreaterThan, mag, inf)?;
let sixteen = splat(fb, u, 16)?;
let bits = fb.binary(BinOp::ShiftLeftLogical, raw, sixteen)?;
let quiet = splat(fb, u, 0x7FC0_0000)?;
let bits = fb.select(nan, quiet, bits)?;
let fill = per_lane(fb, [0, 0, 0, 1.0f32.to_bits()])?;
let bits = fb.vector_shuffle(bits, fill, bfloat_lanes(form))?;
let v = fb.convert(ConvOp::Bitcast, bits, ft)?;
match half {
true => f32_to_half(fb, f, v, HalfRounding::NearestEven),
true => narrow::round_texel(fb, halves(), v),
false => Ok(v),
}
}
/// `v`, a bfloat sample's `vec4` of `float` values ([`decode`] without `half`, or the border
/// texel), as the sample's `half` result: each lane rounded toward zero, a finite value past
/// `65504` saturating there, an infinity and a NaN kept (an Apple M4 under macOS
/// 27.0.1: 18,432 positions of an 8 x 4 texture of each bfloat format holding NaN, infinite,
/// overflowing and `half`-denormal codes, nearest and linear filters under every address mode,
/// each `half` result the `float` result's toward zero, where a read's and a gather's round to
/// nearest even). Integer operations on the bits alone.
/// texel), as the sample's `half` result: the device's narrowing of each lane, where Metal's
/// rounds toward zero and saturates a finite value past `65504` there.
pub(crate) fn bfloat_sample_half(fb: &mut FunctionBuilder<'_>, v: Value) -> BResult<Value> {
f32_to_half(fb, floats(), v, HalfRounding::TowardZeroSaturating)
narrow::round_texel(fb, halves(), v)
}
/// The raw texel a kernel's write of `v` (a `vec4` of `f32`; a `half` value held widened)
/// stores to a bfloat form ([`encode`]): each lane's top 16 bits (toward zero), a NaN the quiet
/// NaN `0x7fc0`, the components past the form's zero (an Apple M4: per bfloat code
/// the `float`s of its bits and three neighbours of each tie, and every `half` code, into each
/// bfloat format). Integer operations on the bits alone.
/// stores to a bfloat form ([`encode`]): each lane's top 16 bits (toward zero, as Metal writes
/// them), a NaN's with its quiet bit set so that it stays a NaN (Metal writes `0x7fc0`), the
/// components past the form's zero.
fn bfloat_texel(fb: &mut FunctionBuilder<'_>, form: ExtendedRange, v: Value) -> BResult<Value> {
let u = words();
let ut = crate::lower::arith::ops::ty(fb, u)?;
@@ -518,21 +502,20 @@ fn bfloat_texel(fb: &mut FunctionBuilder<'_>, form: ExtendedRange, v: Value) ->
let mag = fb.binary(BinOp::BitwiseAnd, bits, abs)?;
let inf = splat(fb, u, 0x7F80_0000)?;
let nan = fb.binary(BinOp::UGreaterThan, mag, inf)?;
let quiet = splat(fb, u, 0x0040_0000)?;
let q = fb.binary(BinOp::BitwiseOr, bits, quiet)?;
let bits = fb.select(nan, q, bits)?;
let sixteen = splat(fb, u, 16)?;
let code = fb.binary(BinOp::ShiftRightLogical, bits, sixteen)?;
let quiet = splat(fb, u, 0x7FC0)?;
let code = fb.select(nan, quiet, code)?;
let zero = splat(fb, u, 0)?;
fb.vector_shuffle(code, zero, bfloat_lanes(form))
}
/// The raw texel a render pass stores to an attachment of the bfloat form `form` whose tile holds
/// `v` (a `vec4` of `half` values held as `f32`; `stage_io::extended_color::bfloat_output`): each
/// lane's bfloat code nearest, ties to even, a NaN `0x7fc0`, the components past the form's zero
/// (an Apple M4 under macOS 27.0.1: every `half` code output into each bfloat
/// format). Not a kernel write's code, which drops the low 16 bits ([`bfloat_texel`]). Integer
/// operations on the bits alone; no sum wraps (the largest magnitude below a NaN's is the
/// infinity's).
/// lane rounded to `bfloat` to nearest even (`narrow::round`, a NaN kept a NaN by its quiet bit
/// where Metal stores `0x7fc0`), its top 16 bits, the components past the form's zero. Not a
/// kernel write's code, which drops the low 16 bits ([`bfloat_texel`]).
pub(crate) fn bfloat_stored(
fb: &mut FunctionBuilder<'_>,
form: ExtendedRange,
@@ -540,21 +523,10 @@ pub(crate) fn bfloat_stored(
) -> BResult<Value> {
let u = words();
let ut = crate::lower::arith::ops::ty(fb, u)?;
let bits = fb.convert(ConvOp::Bitcast, v, ut)?;
let abs = splat(fb, u, 0x7FFF_FFFF)?;
let mag = fb.binary(BinOp::BitwiseAnd, bits, abs)?;
let inf = splat(fb, u, 0x7F80_0000)?;
let nan = fb.binary(BinOp::UGreaterThan, mag, inf)?;
let r = narrow::round(fb, bfloats(), v)?;
let bits = fb.convert(ConvOp::Bitcast, r, ut)?;
let sixteen = splat(fb, u, 16)?;
let one = splat(fb, u, 1)?;
let kept = fb.binary(BinOp::ShiftRightLogical, bits, sixteen)?;
let odd = fb.binary(BinOp::BitwiseAnd, kept, one)?;
let half_step = splat(fb, u, 0x7FFF)?;
let biased = fb.binary(BinOp::IAdd, bits, half_step)?;
let biased = fb.binary(BinOp::IAdd, biased, odd)?;
let code = fb.binary(BinOp::ShiftRightLogical, biased, sixteen)?;
let quiet = splat(fb, u, 0x7FC0)?;
let code = fb.select(nan, quiet, code)?;
let code = fb.binary(BinOp::ShiftRightLogical, bits, sixteen)?;
let zero = splat(fb, u, 0)?;
fb.vector_shuffle(code, zero, bfloat_lanes(form))
}
@@ -570,10 +542,9 @@ pub fn encode_keeping(
fb: &mut FunctionBuilder<'_>,
form: ExtendedRange,
v: Value,
table: Option<GlobalId>,
(old, kept): (Value, [bool; 4]),
) -> BResult<Value> {
let new = linear_codes(fb, form, v, table)?;
let new = linear_codes(fb, form, v)?;
let old = codes(fb, form, old)?;
let lanes: Vec<u32> = kept
.iter()
@@ -588,85 +559,39 @@ pub fn encode_keeping(
}
/// The codes a write of `v` (a `vec4` of `f32`, red first) to a slot of a linear or `_sRGB` form
/// stores ([`encode`]): each color code, and alpha's (a two-plane form's alpha byte).
fn linear_codes(
fb: &mut FunctionBuilder<'_>,
form: ExtendedRange,
v: Value,
table: Option<GlobalId>,
) -> BResult<Value> {
let (u, f) = (words(), floats());
let ut = crate::lower::arith::ops::ty(fb, u)?;
let zero = fsplat(fb, f, 0.0)?;
let nan = fb.unary(crate::spirv::ir::UnOp::IsNan, v)?;
let v = fb.select(nan, zero, v)?;
// Alpha's value clamped to [0, 1], whose codes are [384, 894].
let lo = per_lane_f(fb, [-2.0, -2.0, -2.0, 0.0])?;
let hi = per_lane_f(fb, [2.0, 2.0, 2.0, 1.0])?;
let v = fb.glsl(GlslOp::FClamp, &[v, lo, hi])?;
let neg = fb.binary(BinOp::FOrdLessThan, v, zero)?;
let a = fb.glsl(GlslOp::FAbs, &[v])?;
let cap = fsplat(fb, f, 1.5)?;
let m = fb.glsl(GlslOp::FMin, &[a, cap])?;
// A two-plane texel's alpha byte is the exact product with 255, rounded to nearest even.
let planes = matches!(form, ExtendedRange::Planes { .. });
let scales: &[u32] = match planes {
true => &[510, 510, 510, 255],
false => &[510],
};
let k = round_exact_product_lanes(fb, f, m, scales, false)?;
let zero_code = splat(fb, u, 384)?;
let up = fb.binary(BinOp::IAdd, zero_code, k)?;
let down = fb.binary(BinOp::ISub, zero_code, k)?;
// A negative code wraps past 2^31: clamp the down codes as signed.
let i32_ = fb.module().ty(Type::Int {
width: 32,
signed: true,
})?;
let it = fb.module().ty(Type::Vector { elem: i32_, len: 4 })?;
let down = fb.convert(ConvOp::Bitcast, down, it)?;
let iz = fb.module().constant(Constant::Null { ty: it })?;
let iz = fb.module().const_value(iz)?;
let down = fb.glsl(GlslOp::SMax, &[down, iz])?;
let down = fb.convert(ConvOp::Bitcast, down, ut)?;
let top = splat(fb, u, 1023)?;
let up = fb.glsl(GlslOp::UMin, &[up, top])?;
let mut code = fb.select(neg, down, up)?;
// A two-plane texel's alpha lane holds its byte.
if planes {
code = fb.vector_shuffle(code, k, &[0, 1, 2, 7])?;
}
if let Some(table) = table {
let f1 = fb.module().ty(Type::Float { width: 32 })?;
let u1 = fb.module().ty(Type::Int {
width: 32,
signed: false,
})?;
let grid = fb.module().constant(Constant::Scalar {
ty: f1,
bits: ConstBits(u64::from(8192.0f32.to_bits())),
})?;
let grid = fb.module().const_value(grid)?;
let k384 = fb.u32_const(384)?;
let k384 = fb.module().const_value(k384)?;
let mut lanes = Vec::with_capacity(4);
for lane in 0..3u32 {
// |x| below 2 times 2^13 is exact; RoundEven is exact.
let x = fb.composite_extract(a, &[lane])?;
let x = fb.binary(BinOp::FMul, x, grid)?;
let x = fb.glsl(GlslOp::RoundEven, &[x])?;
let i = fb.convert(ConvOp::ConvertFToU, x, u1)?;
let n = search(fb, table, i)?;
let n_down = fb.glsl(GlslOp::UMin, &[n, k384])?;
let up = fb.binary(BinOp::IAdd, k384, n)?;
let down = fb.binary(BinOp::ISub, k384, n_down)?;
let is_neg = fb.composite_extract(neg, &[lane])?;
lanes.push(fb.select(is_neg, down, up)?);
/// stores ([`encode`]): the value, a NaN 0, an `_sRGB` color channel's magnitude through the
/// transfer, signed, clamped to the linear values of codes 0 and 1023 (alpha to `[0, 1]`), times
/// 510, `RoundEven`, plus 384; a two-plane form's alpha byte `RoundEven(255 a)`.
fn linear_codes(fb: &mut FunctionBuilder<'_>, form: ExtendedRange, v: Value) -> BResult<Value> {
let f = floats();
let v = clean(fb, v)?;
let colour = srgb_lanes(form);
let v = match colour.contains(&true) {
true => {
let m = fb.glsl(GlslOp::FAbs, &[v])?;
let t = srgb_encode(fb, f, m)?;
let minus = fb.unary(UnOp::FNegate, t)?;
let zero = fsplat(fb, f, 0.0)?;
let neg = fb.binary(BinOp::FOrdLessThan, v, zero)?;
let t = fb.select(neg, minus, t)?;
colour_lanes(fb, t, v, colour)?
}
lanes.push(fb.composite_extract(code, &[3])?);
code = fb.composite_construct(ut, &lanes)?;
false => v,
};
let lo = (-384.0f64 / 510.0) as f32;
let hi = (639.0f64 / 510.0) as f32;
let lo = per_lane_f(fb, [lo, lo, lo, 0.0])?;
let hi = per_lane_f(fb, [hi, hi, hi, 1.0])?;
let v = fb.glsl(GlslOp::FClamp, &[v, lo, hi])?;
match matches!(form, ExtendedRange::Planes { .. }) {
true => rounded_codes(
fb,
v,
[510.0, 510.0, 510.0, 255.0],
[384.0, 384.0, 384.0, 0.0],
),
false => rounded_codes(fb, v, [510.0; 4], [384.0; 4]),
}
Ok(code)
}
/// The raw texel (the raw format's `uvec4`) of the codes `code` (red first; a two-plane form's
@@ -735,62 +660,6 @@ pub(crate) fn pack(
}
}
/// The codes a write of `v` (clamped to `[0, 1]`, a NaN 0) to a padded `_sRGB` form stores
/// through its `table` ([`declare_padded`]), `k` the linear codes `RG10Unorm_X12` would store
/// (an Apple M4 and an Apple M3 Max, byte-identical: values next to every threshold, every `half`,
/// and a grid). `R10Unorm_X6_sRGB`'s red is the largest code whose first encode index is at most
/// `RoundEven(v · 8192)` (exact: `v` below 1 times `2^13`), as an extended-range `_sRGB` channel's
/// offset is ([`search`]); `RG10Unorm_X12_sRGB`'s red and green are the table's code of each linear
/// code. `RGB10A2Unorm_sRGB`'s red, green and blue are `R10Unorm_X6_sRGB`'s red's (an Apple M3
/// Max, 16,385 values). The other lanes stay `k`'s.
fn padded_srgb_codes(
fb: &mut FunctionBuilder<'_>,
form: ExtendedRange,
table: GlobalId,
v: Value,
k: Value,
) -> BResult<Value> {
let ut = crate::lower::arith::ops::ty(fb, words())?;
let u1 = fb.module().ty(Type::Int {
width: 32,
signed: false,
})?;
let f1 = fb.module().ty(Type::Float { width: 32 })?;
let channels = srgb_channels(form);
let mut lanes = Vec::with_capacity(4);
for lane in 0..4u32 {
let code = match (lane < channels, form) {
(false, _) => fb.composite_extract(k, &[lane])?,
(true, ExtendedRange::R10X6Srgb | ExtendedRange::Rgb10A2Srgb) => {
let grid = fb.module().constant(Constant::Scalar {
ty: f1,
bits: ConstBits(u64::from(8192.0f32.to_bits())),
})?;
let grid = fb.module().const_value(grid)?;
let x = fb.composite_extract(v, &[lane])?;
let x = fb.binary(BinOp::FMul, x, grid)?;
let x = fb.glsl(GlslOp::RoundEven, &[x])?;
let i = fb.convert(ConvOp::ConvertFToU, x, u1)?;
search(fb, table, i)?
}
(true, _) => {
let i = fb.composite_extract(k, &[lane])?;
word(fb, table, i)?
}
};
lanes.push(code);
}
fb.composite_construct(ut, &lanes)
}
/// The lanes, from red, a padded `_sRGB` form's table converts: its color channels.
fn srgb_channels(form: ExtendedRange) -> u32 {
match form {
ExtendedRange::Rgb10A2Srgb => 3,
_ => form.raw_components(),
}
}
/// A `vec4` constant of the four `f32` lanes `v`.
fn per_lane_f(fb: &mut FunctionBuilder<'_>, v: [f32; 4]) -> BResult<Value> {
let ft = crate::lower::arith::ops::ty(fb, floats())?;
@@ -1,115 +0,0 @@
//! The module code that declares and searches the tables of the extended-range `_sRGB` formats
//! (`super`'s docs), Metal's own decode steps and encode thresholds, which are the format's data
//! (`metal::format::extended_srgb`), and those of the padded `_sRGB` formats
//! (`metal::format::padded_srgb`).
use crate::metal::format::extended_srgb::{SRGB_DECODE_STEPS, SRGB_ENCODE_FIRST};
use crate::metal::format::padded_srgb::{
R10X6_SRGB_DECODE_STEPS, R10X6_SRGB_ENCODE_FIRST, RG10X12_SRGB_WRITE_CODES,
};
use crate::metal::format::ExtendedRange;
use crate::spirv::builder::{FunctionBuilder, ModuleBuilder};
use crate::spirv::error::BResult;
use crate::spirv::ids::{GlobalId, Value};
use crate::spirv::ir::{BinOp, ConstBits, Constant, MemAccess, StorageClass, Type};
/// The table's length: the offsets, padded to the search's power of two with entries whose
/// first index no encode index reaches.
pub(crate) const TABLE_LEN: u32 = 1024;
/// Declare the module's table of the `_sRGB` formats: a `Private` `u32[1024]` holding each
/// offset's decode step in its low half and its first encode index in its high half, and
/// `0xFFFF` above both past offset 639.
pub fn declare(mb: &mut ModuleBuilder) -> BResult<GlobalId> {
let words = (0..TABLE_LEN as usize).map(|n| {
match (SRGB_DECODE_STEPS.get(n), SRGB_ENCODE_FIRST.get(n)) {
(Some(step), Some(first)) => u64::from(*step) | (u64::from(*first) << 16),
_ => 0xFFFF_0000,
}
});
declare_words(mb, words)
}
/// Declare the module's table of the padded `_sRGB` form `form`, a `Private` `u32[1024]`
/// indexed by code (`metal::format::padded_srgb`): `R10Unorm_X6_sRGB`'s holds each code's
/// decode step in its low half and its first encode index in its high half, as [`declare`]'s
/// does an offset's, so [`search`] encodes through it (`RGB10A2Unorm_sRGB`'s color channels
/// take the same); `RG10Unorm_X12_sRGB`'s holds the code a
/// write of each linear code stores. `None` for every other form, which has no such table.
pub fn declare_padded(mb: &mut ModuleBuilder, form: ExtendedRange) -> BResult<Option<GlobalId>> {
let words: Vec<u64> = match form {
ExtendedRange::R10X6Srgb | ExtendedRange::Rgb10A2Srgb => R10X6_SRGB_DECODE_STEPS
.iter()
.zip(&R10X6_SRGB_ENCODE_FIRST)
.map(|(&step, &first)| u64::from(step) | (u64::from(first) << 16))
.collect(),
ExtendedRange::Rg10X12Srgb => RG10X12_SRGB_WRITE_CODES
.iter()
.map(|&c| u64::from(c))
.collect(),
_ => return Ok(None),
};
declare_words(mb, words).map(Some)
}
/// A `Private` `u32[TABLE_LEN]` initialized to `words`, in order.
fn declare_words(
mb: &mut ModuleBuilder,
words: impl IntoIterator<Item = u64>,
) -> BResult<GlobalId> {
let u32_ = mb.ty(Type::Int {
width: 32,
signed: false,
})?;
let len = mb.constant(Constant::Scalar {
ty: u32_,
bits: ConstBits(u64::from(TABLE_LEN)),
})?;
let arr = mb.ty(Type::Array {
elem: u32_,
len,
stride: None,
})?;
let mut parts = Vec::with_capacity(TABLE_LEN as usize);
for word in words {
parts.push(mb.constant(Constant::Scalar {
ty: u32_,
bits: ConstBits(word),
})?);
}
let init = mb.constant(Constant::Composite {
ty: arr,
parts: parts.into(),
})?;
mb.plain_global(StorageClass::Private, arr, Some(init))
}
/// Word `i` (a `u32` scalar below [`TABLE_LEN`]) of `table`.
pub(crate) fn word(fb: &mut FunctionBuilder<'_>, table: GlobalId, i: Value) -> BResult<Value> {
let base = fb.module().global_value(table)?;
let p = fb.access_chain(base, &[i])?;
fb.load(p, MemAccess::default())
}
/// The offset of encode index `i` (a `u32` scalar at most 16384): the largest offset whose first
/// index is at most `i`, ten dependent loads, branch-free. Over `R10Unorm_X6_sRGB`'s table
/// ([`declare_padded`]), the largest code whose first encode index is at most `i`.
pub fn search(fb: &mut FunctionBuilder<'_>, table: GlobalId, i: Value) -> BResult<Value> {
let k = |fb: &mut FunctionBuilder<'_>, v: u32| -> BResult<Value> {
let c = fb.u32_const(v)?;
fb.module().const_value(c)
};
let k16 = k(fb, 16)?;
let mut n = k(fb, 0)?;
let mut step = TABLE_LEN / 2;
while step > 0 {
let s = k(fb, step)?;
let j = fb.binary(BinOp::IAdd, n, s)?;
let w = word(fb, table, j)?;
let first = fb.binary(BinOp::ShiftRightLogical, w, k16)?;
let at_least = fb.binary(BinOp::UGreaterThanEqual, i, first)?;
n = fb.select(at_least, j, n)?;
step /= 2;
}
Ok(n)
}
@@ -1,17 +1,15 @@
//! Metal's extended-range conversions run through the interpreter: every code read, and the
//! writes around every rounding boundary, against the exact rule.
//! The extended-range conversions run through the interpreter: every code read, and the writes
//! around every rounding boundary, against the device's arithmetic; the `_sRGB` forms' transfer
//! (the device's `Pow`, which the interpreter does not model) checked in the module and against
//! Metal's tables.
use super::blend::{extended_ranges, native, NativeBlend};
use super::{
declare, declare_padded, decode, encode, tile_read, tile_value, SOURCE_RANGE, SRGB_SOURCE_RANGE,
};
use super::{decode, encode, tile_read, tile_value, SOURCE_RANGE, SRGB_SOURCE_RANGE};
use crate::error::Error;
use crate::lower::arith::{FloatFmt, Form, Held};
use crate::lower::stage_io::extended_color::bfloat_output;
use crate::metal::format::extended_srgb::{SRGB_DECODE_STEPS, SRGB_ENCODE_FIRST};
use crate::metal::format::padded_srgb::{
R10X6_SRGB_DECODE_STEPS, R10X6_SRGB_ENCODE_FIRST, RG10X12_SRGB_WRITE_CODES,
};
use crate::metal::format::padded_srgb::{R10X6_SRGB_ENCODE_FIRST, RG10X12_SRGB_WRITE_CODES};
use crate::metal::format::ExtendedRange;
use crate::metal::{BlendFactor, BlendOperation, ColorWriteMask, TextureWriteRoundingMode};
use crate::pipeline::lower_inputs::{BlendEquation, ExtendedRangeColor};
@@ -25,14 +23,7 @@ use crate::spirv::ir::{
Type, TypedModule,
};
const FORMS: [ExtendedRange; 4] = [
ExtendedRange::Bgr10 { srgb: false },
ExtendedRange::Bgr10 { srgb: true },
ExtendedRange::Bgra10 { srgb: false },
ExtendedRange::Bgra10 { srgb: true },
];
/// [`FORMS`] and the two-plane forms.
/// The linear and `_sRGB` forms of `BGR10_XR`, `BGRA10_XR` and the two-plane format.
pub(crate) const EVERY_FORM: [ExtendedRange; 6] = [
ExtendedRange::Bgr10 { srgb: false },
ExtendedRange::Bgr10 { srgb: true },
@@ -130,10 +121,6 @@ fn kernel(form: ExtendedRange, op: Op) -> BResult<TypedModule> {
let vec4 = b.ty(Type::Vector { elem: f32_, len: 4 })?;
let input = storage_buffer(&mut b, 0, u32_)?;
let output = storage_buffer(&mut b, 1, u32_)?;
let table = match form.srgb() {
true => Some(declare(&mut b)?),
false => declare_padded(&mut b, form)?,
};
let id = b.builtin(crate::spv::BuiltIn::GlobalInvocationId, IoDir::Input, uvec3)?;
let void = b.ty(Type::Void)?;
let mut f = b.function(void)?;
@@ -149,18 +136,18 @@ fn kernel(form: ExtendedRange, op: Op) -> BResult<TypedModule> {
let out = match op {
Op::Encode => {
let v = f.convert(ConvOp::Bitcast, x, vec4)?;
encode(&mut f, form, v, table)?
encode(&mut f, form, v)?
}
Op::Decode => {
let v = decode(&mut f, form, x, table, false)?;
let v = decode(&mut f, form, x, false)?;
f.convert(ConvOp::Bitcast, v, uvec4)?
}
Op::DecodeHalf => {
let v = decode(&mut f, form, x, table, true)?;
let v = decode(&mut f, form, x, true)?;
f.convert(ConvOp::Bitcast, v, uvec4)?
}
Op::Tile => {
let v = tile_value(&mut f, form, x, table)?;
let v = tile_value(&mut f, form, x)?;
f.convert(ConvOp::Bitcast, v, uvec4)?
}
Op::TileRead => {
@@ -188,7 +175,7 @@ fn kernel(form: ExtendedRange, op: Op) -> BResult<TypedModule> {
let c = f.composite_construct(uvec4, &lanes[8..12])?;
let s1 = f.composite_construct(uvec4, &lanes[12..16])?;
let s1 = f.convert(ConvOp::Bitcast, s1, vec4)?;
let d = tile_value(&mut f, form, x, table)?;
let d = tile_value(&mut f, form, x)?;
let ranges = Some(extended_ranges(form));
let v = native(&mut f, &b, ranges, (s, Some(s1), d), Some(c))?;
f.convert(ConvOp::Bitcast, v, uvec4)?
@@ -249,43 +236,15 @@ fn run<const N: usize>(form: ExtendedRange, op: Op, lanes: &[[u32; N]]) -> Vec<[
.collect()
}
/// `n / 510` correctly rounded to `f32` (`|n| <= 639`): the `f64` quotient's neighbours compared
/// exactly (each `f32` times 510 is exact in `f64`).
fn ratio(n: i32) -> f32 {
let q = f64::from(n) / 510.0;
let y = q as f32;
let candidates = [
y,
f32::from_bits(y.to_bits().wrapping_sub(1)),
f32::from_bits(y.to_bits() + 1),
];
let err = |c: f32| (f64::from(c) * 510.0 - f64::from(n)).abs();
let best = candidates
.into_iter()
.filter(|c| c.is_finite())
.min_by(|a, b| err(*a).partial_cmp(&err(*b)).expect("finite"))
.expect("a candidate");
if n == 0 {
0.0
} else {
best
}
/// The `f32` nearest `1 / d`.
fn reciprocal(d: f32) -> f32 {
1.0 / d
}
/// Metal's value of code `c` of a color channel.
fn color_value(c: u32, srgb: bool) -> f32 {
let n = c as i32 - 384;
match srgb {
false => ratio(n),
true => {
let s = f32::from(SRGB_DECODE_STEPS[n.unsigned_abs() as usize]) / 8192.0;
if n < 0 {
-s
} else {
s
}
}
}
/// The device's value of code `c` of a linear color channel: `float(c - 384)` times the `f32`
/// nearest `1 / 510`, rounded once.
fn color_value(c: u32) -> f32 {
(c as i32 - 384) as f32 * reciprocal(510.0)
}
/// The raw texel of red, green, blue, and alpha codes `rgba` in `form` (a two-plane form's alpha
@@ -318,65 +277,86 @@ pub(crate) fn raw(form: ExtendedRange, rgba: [u32; 4], junk: u32) -> [u32; 4] {
}
}
/// Every code of every channel reads Metal's value, bit for bit, whatever the bits Metal does not
/// read hold: `(c - 384) / 510` correctly rounded, an `_sRGB` color channel its table's step over
/// 8192, alpha clamped to `[0, 1]` (1 where the format has none).
/// The device's value of the alpha code `c` of `form` (a two-plane texel's byte).
fn alpha_value(form: ExtendedRange, c: u32) -> f32 {
match form {
ExtendedRange::Bgr10 { .. } => 1.0,
ExtendedRange::Planes { .. } => (c & 0xFF) as f32 * reciprocal(255.0),
_ => color_value(c.clamp(384, 894)),
}
}
/// The three linear forms.
const LINEAR: [ExtendedRange; 3] = [
ExtendedRange::Bgra10 { srgb: false },
ExtendedRange::Bgr10 { srgb: false },
ExtendedRange::Planes { srgb: false },
];
/// The code a write of alpha value `v` stores in a two-plane texel's alpha byte: the `f32`
/// product with 255, `RoundEven`.
fn alpha_byte(v: f32) -> u32 {
let v = if v.is_nan() { 0.0 } else { v.clamp(0.0, 1.0) };
round_even(f64::from(v * 255.0)) as u32
}
/// Every code of every channel of a linear form reads the device's product, `float(c - 384)`
/// times the `f32` nearest `1 / 510` (a two-plane texel's alpha byte times that of `1 / 255`),
/// alpha clamped to `[0, 1]` (1 where the format has none), whatever the bits Metal does not
/// read hold; a `half` read is that value narrowed to nearest even. The product misses Metal's
/// correctly rounded quotient at some codes, so the old quotient fails here.
#[test]
fn every_code_reads_metals_value() {
for form in FORMS {
let srgb = form.srgb();
let lanes: Vec<[u32; 4]> = (0..1024u32)
.map(|c| raw(form, [c, 1023 - c, (c * 7) % 1024, c], c * 13))
.collect();
let got = run(form, Op::Decode, &lanes);
for (c, g) in (0..1024u32).zip(&got) {
fn every_code_reads_the_devices_product() {
let mut apart = 0;
for form in LINEAR {
let codes = |c: u32| [c, 1023 - c, (c * 7) % 1024, c];
let lanes: Vec<[u32; 4]> = (0..1024u32).map(|c| raw(form, codes(c), c * 13)).collect();
let floats = run(form, Op::Decode, &lanes);
let halves = run(form, Op::DecodeHalf, &lanes);
for ((c, f), h) in (0..1024u32).zip(&floats).zip(&halves) {
let k = codes(c);
let want = [
color_value(c, srgb),
color_value(1023 - c, srgb),
color_value((c * 7) % 1024, srgb),
match form {
ExtendedRange::Bgr10 { .. } => 1.0,
_ => ratio(c.clamp(384, 894) as i32 - 384),
},
color_value(k[0]),
color_value(k[1]),
color_value(k[2]),
alpha_value(form, k[3]),
];
assert_eq!(*g, want.map(f32::to_bits), "{form:?} code {c}");
assert_eq!(*f, want.map(f32::to_bits), "{form:?} code {c}");
assert_eq!(
*h,
want.map(|v| to_half(f64::from(v), false).to_bits()),
"{form:?} half, code {c}"
);
let quotient = ((c as i32 - 384) as f64 / 510.0) as f32;
apart += usize::from(quotient != want[0]);
}
}
assert!(apart > 0, "the product never misses the quotient");
}
/// `x` rounded to the nearest integer, ties to even (`x` exact in `f64`).
fn round_even(x: f64) -> f64 {
let r = x.round();
if (x - x.trunc()).abs() == 0.5 && r % 2.0 != 0.0 {
r - x.signum()
} else {
r
}
x.round_ties_even()
}
/// The code Metal writes for color value `v` (alpha where `alpha`).
fn code(v: f32, srgb: bool, alpha: bool) -> u32 {
/// The code the device writes for linear color value `v` (alpha where `alpha`): the value, a NaN
/// 0, clamped to the linear values of codes 0 and 1023 (alpha to `[0, 1]`), times 510 in `f32`,
/// `RoundEven`, plus 384.
fn code(v: f32, alpha: bool) -> u32 {
let v = if v.is_nan() { 0.0 } else { v };
let v = if alpha { v.clamp(0.0, 1.0) } else { v };
let neg = v < 0.0;
if srgb && !alpha {
let q = round_even(f64::from(v.abs().min(2.0)) * 8192.0) as u32;
let n = (0..640)
.rev()
.find(|&n| u32::from(SRGB_ENCODE_FIRST[n]) <= q)
.expect("offset 0") as u32;
return if neg { 384 - n.min(384) } else { 384 + n };
}
let k = round_even(f64::from(v.abs().min(1.5)) * 510.0) as i32;
(384 + if neg { -k } else { k }).clamp(0, 1023) as u32
let (lo, hi) = match alpha {
true => (0.0, 1.0),
false => ((-384.0f64 / 510.0) as f32, (639.0f64 / 510.0) as f32),
};
let k = round_even(f64::from(v.clamp(lo, hi) * 510.0));
(k + 384.0) as u32
}
/// A write stores Metal's code around every boundary: each code's value and its neighbours, the
/// `f32`s either side of each midpoint (each an exact tie is not, the exact product rounding to
/// nearest even), each `_sRGB` index's half-point and its neighbours, and the specials; bits Metal
/// does not read are written as it writes them.
/// A write of a linear form stores the device's rounded product: each code's value and its
/// neighbours, the `f32`s either side of each midpoint, and the specials (a NaN the zero code,
/// the infinities and values past the range the end codes); bits Metal does not read are written
/// as it writes them.
#[test]
fn writes_round_at_metals_boundaries() {
fn writes_store_the_devices_rounded_product() {
let specials = [
0.0f32,
-0.0,
@@ -394,43 +374,29 @@ fn writes_round_at_metals_boundaries() {
-2.0,
1e-40,
];
for form in FORMS {
let srgb = form.srgb();
let mut xs: Vec<f32> = specials.to_vec();
for c in 0..1023u32 {
let (a, b) = (color_value(c, srgb), color_value(c + 1, srgb));
let mid = ((f64::from(a) + f64::from(b)) / 2.0) as f32;
xs.extend([
a,
mid,
f32::from_bits(mid.to_bits() + 1),
f32::from_bits(mid.to_bits().wrapping_sub(1)),
]);
}
if srgb {
for first in SRGB_ENCODE_FIRST.iter().skip(1) {
let h = (f32::from(*first) - 0.5) / 8192.0;
for x in [h, -h] {
xs.extend([
x,
f32::from_bits(x.to_bits() + 1),
f32::from_bits(x.to_bits() - 1),
]);
}
}
}
let mut xs: Vec<f32> = specials.to_vec();
for c in 0..1023u32 {
let (a, b) = (color_value(c), color_value(c + 1));
let mid = ((f64::from(a) + f64::from(b)) / 2.0) as f32;
xs.extend([
a,
mid,
f32::from_bits(mid.to_bits() + 1),
f32::from_bits(mid.to_bits().wrapping_sub(1)),
]);
}
for form in LINEAR {
let lanes: Vec<[u32; 4]> = xs
.iter()
.map(|x| [x.to_bits(), (-x).to_bits(), x.to_bits(), x.to_bits()])
.collect();
let got = run(form, Op::Encode, &lanes);
for (x, g) in xs.iter().zip(&got) {
let rgba = [
code(*x, srgb, false),
code(-x, srgb, false),
code(*x, srgb, false),
code(*x, srgb, true),
];
let alpha = match form {
ExtendedRange::Planes { .. } => alpha_byte(*x),
_ => code(*x, true),
};
let rgba = [code(*x, false), code(-x, false), code(*x, false), alpha];
let want = match form {
ExtendedRange::Bgr10 { .. } => {
[rgba[2] | rgba[1] << 10 | rgba[0] << 20 | 3 << 30, 0, 0, 0]
@@ -442,49 +408,111 @@ fn writes_round_at_metals_boundaries() {
}
}
/// Metal's own answers on an Apple M3 Max and an M4: writes at its measured ties and
/// thresholds, and reads of its measured values.
/// Every word of the module serialized from `m`.
fn module_words(m: TypedModule) -> Vec<u32> {
crate::spirv::serialize::serialize(m)
.expect("serialize")
.words
}
/// Whether `words` hold a `GLSL.std.450` `Pow` and an initialized `Private` variable (a table).
fn pow_and_table(words: &[u32]) -> (bool, bool) {
let (mut pow, mut table) = (false, false);
let mut at = 5;
while at < words.len() {
let (count, op) = ((words[at] >> 16) as usize, words[at] & 0xFFFF);
// `OpExtInst` 12 (instruction number 26, `Pow`); `OpVariable` 59 with an initializer in
// `Private` (6).
pow |= op == 12 && words.get(at + 4) == Some(&26);
table |= op == 59 && count == 5 && words.get(at + 3) == Some(&6);
at += count.max(1);
}
(pow, table)
}
/// An `_sRGB` form's read, tile value and write take the MSL transfer by the device's `Pow` and
/// declare no table (Metal's tables are gone from the module), as do the padded `_sRGB` forms'.
#[test]
fn metals_measured_answers_hold() {
// Linear: -0.75, 0.25 and 1.25 are exact ties, written as codes 2, 512 and 1022; code 0
// reads -384/510 (0xbf40c0c1), code 512 0.25098 (0x3e808081).
let linear = ExtendedRange::Bgra10 { srgb: false };
let w = run(
linear,
Op::Encode,
&[[
(-0.75f32).to_bits(),
0.25f32.to_bits(),
1.25f32.to_bits(),
0,
]],
);
assert_eq!(w[0], [1022 << 6, 512 << 6, 2 << 6, 384 << 6]);
let r = run(linear, Op::Decode, &[raw(linear, [0, 512, 1023, 1023], 0)]);
assert_eq!(r[0], [0xbf40_c0c1, 0x3e80_8081, 0x3fa0_6060, 0x3f80_0000]);
// sRGB: code 0 reads -0.527099609375 (0xbf06f000), code 1023 1.6749267578125 (0x3fd66400);
// 0.56634521484375 is the least float writing code 781, -0.13214111328125 the least writing
// code 181 (bisection thresholds).
let srgb = ExtendedRange::Bgr10 { srgb: true };
let r = run(srgb, Op::Decode, &[raw(srgb, [0, 1023, 384, 0], 0)]);
assert_eq!(r[0][..3], [0xbf06_f000, 0x3fd6_6400, 0]);
let below = |x: f32| f32::from_bits(x.to_bits() - 1);
let w = run(
srgb,
Op::Encode,
&[[
0.566_345_2f32.to_bits(),
below(0.566_345_2).to_bits(),
(-0.132_141_11f32).to_bits(),
0,
]],
);
let codes = [
(w[0][0] >> 20) & 0x3FF,
(w[0][0] >> 10) & 0x3FF,
w[0][0] & 0x3FF,
fn srgb_forms_take_the_transfer_by_the_devices_pow() {
let forms = [
ExtendedRange::Bgr10 { srgb: true },
ExtendedRange::Bgra10 { srgb: true },
ExtendedRange::Planes { srgb: true },
ExtendedRange::R10X6Srgb,
ExtendedRange::Rg10X12Srgb,
ExtendedRange::Rgb10A2Srgb,
];
assert_eq!(codes, [781, 780, 181]);
for form in forms {
let mut ops = vec![Op::Encode];
// `RG10Unorm_X12_sRGB` reads its codes linearly.
if form != ExtendedRange::Rg10X12Srgb {
ops.extend([Op::Decode, Op::DecodeHalf]);
}
if form.srgb() {
ops.push(Op::Tile);
}
for op in ops {
let words = module_words(kernel(form, op).expect("kernel"));
assert_eq!(pow_and_table(&words), (true, false), "{form:?}");
}
}
let words = module_words(kernel(ExtendedRange::Rg10X12Srgb, Op::Decode).expect("kernel"));
assert_eq!(pow_and_table(&words), (false, false));
}
/// The MSL transfer in `f64` (`f32` lanes of the device differ by its `Pow`'s error): the encode
/// of `x` in `[0, 1]`, and the decode.
fn srgb_encode(x: f64) -> f64 {
match x < 0.003_130_8 {
true => 12.92 * x,
false => 1.055 * x.powf(1.0 / 2.4) - 0.055,
}
}
/// See [`srgb_encode`].
fn srgb_decode(c: f64) -> f64 {
match c <= 0.040_45 {
true => c / 12.92,
false => ((c + 0.055) / 1.055).powf(2.4),
}
}
/// The transfer meets Metal's measured tables within `DevicePackConversion`'s bound, as the
/// module docs state: half a `2^-13` step of every extended-range decode step, a code of every
/// encode on the `2^-13` grid (32 of them apart), a code of `R10Unorm_X6_sRGB`'s encode, and a code
/// of `RG10Unorm_X12_sRGB`'s write of every linear code (36 apart).
#[test]
fn the_transfer_meets_metals_tables_within_the_note() {
for (n, &s) in SRGB_DECODE_STEPS.iter().enumerate() {
let v = srgb_decode(f64::from(n as f32 * reciprocal(510.0)));
assert!((v * 8192.0 - f64::from(s)).abs() <= 0.5, "offset {n}");
}
let first = |table: &[u16], i: u32| table.partition_point(|&f| u32::from(f) <= i) as i64 - 1;
let mut apart = 0;
for i in 0..=2 * 8192u32 {
let x = f64::from(i) / 8192.0;
let ours = (srgb_encode(x) * 510.0).round_ties_even().min(639.0) as i64;
let metal = first(&SRGB_ENCODE_FIRST, i);
assert!((ours - metal).abs() <= 1, "{x}");
apart += usize::from(ours != metal);
}
assert_eq!(apart, 32);
for i in 0..=8192u32 {
let x = f64::from(i) / 8192.0;
let ours = (srgb_encode(x) * 1023.0).round_ties_even() as i64;
assert!(
(ours - first(&R10X6_SRGB_ENCODE_FIRST, i)).abs() <= 1,
"{x}"
);
}
let mut apart = 0;
for (m, &metal) in RG10X12_SRGB_WRITE_CODES.iter().enumerate() {
let t = f64::from(m as f32 * reciprocal(4092.0));
let ours = (srgb_encode(t) * 255.0).round_ties_even() as i64;
assert!((ours - i64::from(metal)).abs() <= 1, "linear code {m}");
apart += usize::from(ours != i64::from(metal));
}
assert_eq!(apart, 36);
}
/// `x` (exact in `f64`) rounded to `half`: to nearest, ties away from zero where `away`, else to
@@ -508,41 +536,31 @@ fn half(h: u16) -> f32 {
crate::float16::f16_bits_to_f32(h)
}
/// Metal's tile value of a texel of `form` whose codes are `rgba` (a two-plane form's alpha its
/// byte), as the module docs of `tile_value` state the rule.
/// The tile value of a texel of linear `form` whose codes are `rgba` (a two-plane form's alpha its
/// byte), as the module docs of `tile_value` state the rule: a code above 1022 as 1022, each lane
/// the device's value narrowed to `half`, nearest even. The `_sRGB` forms' are the device's
/// (the interpreter models no `Pow`).
pub(crate) fn tile_model(form: ExtendedRange, rgba: [u32; 4]) -> [f32; 4] {
let srgb = form.srgb();
let by_code = !srgb || matches!(form, ExtendedRange::Bgra10 { .. });
let (lo, hi) = ((-384.0f64 / 510.0) as f32, (638.0f64 / 510.0) as f32);
let color = |c: u32| match by_code {
true => color_value(c.min(1022), srgb),
false => color_value(c, srgb).clamp(lo, hi),
};
let alpha = match form {
ExtendedRange::Bgr10 { .. } => 1.0,
ExtendedRange::Bgra10 { .. } => ratio(rgba[3].clamp(384, 894) as i32 - 384),
ExtendedRange::Planes { .. } => (f64::from(rgba[3]) / 255.0) as f32,
ExtendedRange::R10X6
| ExtendedRange::Rg10X12
| ExtendedRange::R10X6Srgb
| ExtendedRange::Rg10X12Srgb
| ExtendedRange::Rgb10A2Srgb => {
panic!("{form:?}: a padded form's tile value is not measured")
}
ExtendedRange::R16Bfloat | ExtendedRange::Rg16Bfloat | ExtendedRange::Rgba16Bfloat => {
panic!("{form:?}: a bfloat form's tile value is not measured")
}
};
[color(rgba[0]), color(rgba[1]), color(rgba[2]), alpha].map(|v| to_half(f64::from(v), true))
assert!(
!form.srgb() && !form.padded() && !form.bfloat(),
"{form:?}: not a linear form"
);
let color = |c: u32| color_value(c.min(1022));
[
color(rgba[0]),
color(rgba[1]),
color(rgba[2]),
alpha_value(form, rgba[3]),
]
.map(|v| to_half(f64::from(v), false))
}
/// Every code of every channel of the six forms reads Metal's tile value, whatever the bits Metal
/// does not read hold: a linear or `BGRA10_XR_sRGB` code above 1022 as 1022, the other `_sRGB`
/// forms' values clamped to the linear values of codes 0 and 1022, and each lane rounded to `half`,
/// ties away from zero. The ends are the blend's source ranges.
/// Every code of every channel of the linear forms reads its tile value, whatever the bits Metal
/// does not read hold: a code above 1022 as 1022, each lane narrowed to `half`. The ends are the
/// blend's source range.
#[test]
fn every_code_reads_metals_tile_value() {
for form in EVERY_FORM {
fn every_code_reads_its_tile_value() {
for form in LINEAR {
let alpha = |c: u32| match form {
ExtendedRange::Planes { .. } => c % 256,
_ => c,
@@ -554,13 +572,8 @@ fn every_code_reads_metals_tile_value() {
let want = tile_model(form, codes(c));
assert_eq!(*g, want.map(f32::to_bits), "{form:?} code {c}");
}
// The other `_sRGB` forms' tiles end inside their source range.
let (lo, hi) = match form {
ExtendedRange::Bgra10 { srgb: true } => SRGB_SOURCE_RANGE,
_ if form.srgb() => continue,
_ => SOURCE_RANGE,
};
// Codes 0, 1022 and 1023: the source range's ends.
let (lo, hi) = SOURCE_RANGE;
assert_eq!(f32::from_bits(got[0][0]), lo, "{form:?}");
assert_eq!(f32::from_bits(got[0][1]), hi, "{form:?}");
assert_eq!(f32::from_bits(got[1][1]), hi, "{form:?}");
@@ -839,16 +852,22 @@ fn every_blend_is_built_but_a_placeholder() {
));
}
/// A padded 10-bit form reads every 16-bit word as the code in its top 10 bits over 1023, correctly
/// rounded (a `half` result to nearest even), blue 0 and alpha 1, whatever the low 6 bits hold
/// (every word); and writes the code of the exact product of the value clamped to `[0, 1]` (a
/// NaN 0) with 1023, rounded to nearest, in its word's top 10 bits, the low 6 bits zero (a grid,
/// and three `f32`s about every midpoint, each lane).
/// A padded 10-bit form reads every 16-bit word as `float(c)` of the code `c` in its top 10 bits
/// times the `f32` nearest `1 / 1023` (a `half` result that value narrowed to nearest even), blue
/// 0 and alpha 1, whatever the low 6 bits hold (every word; `RG10Unorm_X12_sRGB` reads its codes
/// so too); and writes `RoundEven(clamp(v, 0, 1) · 1023)` of the `f32` product (a NaN 0) in its
/// word's top 10 bits, the low 6 bits zero (a grid, and three `f32`s about every midpoint, each
/// lane). The product misses Metal's correctly rounded quotient at some codes.
#[test]
fn padded_forms_read_and_write_metals_codes() {
let value = |w: u32| ((w >> 6) as f64 / 1023.0) as f32;
for form in [ExtendedRange::R10X6, ExtendedRange::Rg10X12] {
let two = form == ExtendedRange::Rg10X12;
fn padded_forms_read_and_write_the_devices_codes() {
let value = |w: u32| (w >> 6) as f32 * reciprocal(1023.0);
let mut apart = 0;
for form in [
ExtendedRange::R10X6,
ExtendedRange::Rg10X12,
ExtendedRange::Rg10X12Srgb,
] {
let two = form != ExtendedRange::R10X6;
// Every code under four fillings of the low 6 bits, the other lanes' words other codes.
let lanes: Vec<[u32; 4]> = (0..4096u32)
.map(|i| {
@@ -856,50 +875,36 @@ fn padded_forms_read_and_write_metals_codes() {
[w, w.wrapping_mul(40503) & 0xFFFF, 0xFFFF, 0xFFFF]
})
.collect();
let got = run(form, Op::Decode, &lanes);
let floats = run(form, Op::Decode, &lanes);
let halves = run(form, Op::DecodeHalf, &lanes);
for ((l, g), h) in lanes.iter().zip(&got).zip(&halves) {
for ((l, f), h) in lanes.iter().zip(&floats).zip(&halves) {
let green = if two { value(l[1]) } else { 0.0 };
let want = [value(l[0]), green, 0.0, 1.0];
assert_eq!(*g, want.map(f32::to_bits), "{form:?} words {l:x?}");
let want = want.map(|v| to_half(f64::from(v), false));
assert_eq!(*h, want.map(f32::to_bits), "{form:?} half, words {l:x?}");
assert_eq!(*f, want.map(f32::to_bits), "{form:?} words {l:x?}");
let want = want.map(|v| to_half(f64::from(v), false).to_bits());
assert_eq!(*h, want, "{form:?} half, words {l:x?}");
apart += usize::from(value(l[0]) != (f64::from(l[0] >> 6) / 1023.0) as f32);
}
// Writes: about every midpoint, the codes, and the specials.
let mut values = vec![1.0f32];
for k in 0..1023u32 {
values.push((f64::from(k) / 1023.0) as f32);
let mid = ((f64::from(k) + 0.5) / 1023.0) as f32;
values.extend((0..5).map(|d| f32::from_bits(mid.to_bits() + d - 2)));
if form == ExtendedRange::Rg10X12Srgb {
continue;
}
values.extend([
f32::NAN,
-f32::NAN,
f32::INFINITY,
f32::NEG_INFINITY,
-0.0,
-1.0,
1.5,
2.0,
f32::from_bits(1),
-f32::from_bits(1),
]);
let code = |v: f32| -> u32 {
match v.is_nan() {
true => 0,
false => (f64::from(v.clamp(0.0, 1.0)) * 1023.0).round_ties_even() as u32,
}
let code = |v: f32| {
let v = if v.is_nan() { 0.0 } else { v.clamp(0.0, 1.0) };
round_even(f64::from(v * 1023.0)) as u32
};
let lanes: Vec<[u32; 4]> = (0..values.len())
.map(|i| {
let g = values[(i * 7919) % values.len()];
[
values[i].to_bits(),
g.to_bits(),
0.5f32.to_bits(),
1f32.to_bits(),
]
})
let mut values = vec![f32::NAN, -1.0, 2.0, f32::INFINITY, -0.0, 0.5];
for c in 0..1023u32 {
let mid = ((f64::from(c) + 0.5) / 1023.0) as f32;
values.extend([
mid,
f32::from_bits(mid.to_bits() + 1),
f32::from_bits(mid.to_bits() - 1),
]);
}
let lanes: Vec<[u32; 4]> = values
.iter()
.zip(values.iter().rev())
.map(|(r, g)| [r.to_bits(), g.to_bits(), 0, 0])
.collect();
let got = run(form, Op::Encode, &lanes);
for (l, g) in lanes.iter().zip(&got) {
@@ -908,246 +913,45 @@ fn padded_forms_read_and_write_metals_codes() {
assert_eq!(*g, [code(r) << 6, green, 0, 0], "{form:?} values {r}, {gr}");
}
}
}
/// The code Metal's write of `v` stores to a padded `_sRGB` form's channel (the form docs): a NaN
/// 0, the value clamped to `[0, 1]`; `R10Unorm_X6_sRGB`'s the largest code whose first encode index
/// is at most the value rounded to `2^-13` (nearest even), `RG10Unorm_X12_sRGB`'s the table's code
/// of `RG10Unorm_X12`'s.
fn padded_srgb_code(form: ExtendedRange, v: f32) -> u32 {
let v = match v.is_nan() {
true => 0.0,
false => f64::from(v.clamp(0.0, 1.0)),
};
match form {
ExtendedRange::R10X6Srgb => {
let i = (v * 8192.0).round_ties_even() as u16;
let codes = R10X6_SRGB_ENCODE_FIRST.partition_point(|&f| f <= i);
codes as u32 - 1
}
_ => u32::from(RG10X12_SRGB_WRITE_CODES[(v * 1023.0).round_ties_even() as usize]),
}
}
/// `R10Unorm_X6_sRGB` reads every 16-bit word as its code's decode step over 8192 (a `half` result
/// with ties away from zero), `RG10Unorm_X12_sRGB` as `RG10Unorm_X12` does (`c / 1023`, a `half` to
/// nearest even), blue 0 and alpha 1, whatever the low 6 bits hold; and each writes Metal's code
/// through its table ([`padded_srgb_code`]) in its word's top 10 bits, the low 6 bits zero: values
/// about every threshold of `R10Unorm_X6_sRGB`'s codes and every midpoint of the linear codes, the
/// codes' values, and the specials.
#[test]
fn padded_srgb_forms_read_and_write_metals_codes() {
let step = |w: u32| f32::from(R10X6_SRGB_DECODE_STEPS[(w >> 6) as usize]) / 8192.0;
let linear = |w: u32| ((w >> 6) as f64 / 1023.0) as f32;
// Values about every threshold and midpoint, the codes' values, and the specials.
let mut values = vec![1.0f32];
for k in 0..1024u32 {
values.push(step(k << 6));
values.push((f64::from(k) / 1023.0) as f32);
let mid = ((f64::from(k) + 0.5) / 1023.0) as f32;
values.extend((0..5).map(|d| f32::from_bits(mid.to_bits() + d - 2)));
let first = f64::from(R10X6_SRGB_ENCODE_FIRST[k as usize]);
if first > 0.0 {
let edge = ((first - 0.5) / 8192.0) as f32;
values.extend((0..5).map(|d| f32::from_bits(edge.to_bits() + d - 2)));
}
}
values.extend([
f32::NAN,
-f32::NAN,
f32::INFINITY,
f32::NEG_INFINITY,
-0.0,
-1.0,
1.5,
2.0,
f32::from_bits(1),
-f32::from_bits(1),
]);
for form in [ExtendedRange::R10X6Srgb, ExtendedRange::Rg10X12Srgb] {
let two = form == ExtendedRange::Rg10X12Srgb;
let (red, rounding_away) = match two {
false => (step as fn(u32) -> f32, true),
true => (linear as fn(u32) -> f32, false),
};
// Every code under four fillings of the low 6 bits, the other lanes' words other codes.
let lanes: Vec<[u32; 4]> = (0..4096u32)
.map(|i| {
let w = (i & 1023) << 6 | [0, 0x3F, 0x15, 0x2A][(i >> 10) as usize];
[w, w.wrapping_mul(40503) & 0xFFFF, 0xFFFF, 0xFFFF]
})
.collect();
let got = run(form, Op::Decode, &lanes);
let halves = run(form, Op::DecodeHalf, &lanes);
for ((l, g), h) in lanes.iter().zip(&got).zip(&halves) {
let green = if two { linear(l[1]) } else { 0.0 };
let want = [red(l[0]), green, 0.0, 1.0];
assert_eq!(*g, want.map(f32::to_bits), "{form:?} words {l:x?}");
let want = [
to_half(f64::from(want[0]), rounding_away),
to_half(f64::from(green), false),
0.0,
1.0,
];
assert_eq!(*h, want.map(f32::to_bits), "{form:?} half, words {l:x?}");
}
let lanes: Vec<[u32; 4]> = (0..values.len())
.map(|i| {
let g = values[(i * 7919) % values.len()];
[
values[i].to_bits(),
g.to_bits(),
0.5f32.to_bits(),
1f32.to_bits(),
]
})
.collect();
let got = run(form, Op::Encode, &lanes);
for (l, g) in lanes.iter().zip(&got) {
let (r, gr) = (f32::from_bits(l[0]), f32::from_bits(l[1]));
let green = if two {
padded_srgb_code(form, gr) << 6
} else {
0
};
let want = [padded_srgb_code(form, r) << 6, green, 0, 0];
assert_eq!(*g, want, "{form:?} values {r}, {gr}");
}
}
}
/// `a / 3` correctly rounded to `f32` (`a` below 4): the `f64` quotient's neighbours compared
/// exactly (each `f32` times 3 is exact in `f64`).
fn third(a: u32) -> f32 {
let q = f64::from(a) / 3.0;
let y = q as f32;
[
y,
f32::from_bits(y.to_bits().wrapping_sub(1)),
f32::from_bits(y.to_bits() + 1),
]
.into_iter()
.min_by(|x, z| {
let d = |v: &f32| (f64::from(*v) * 3.0 - f64::from(a)).abs();
d(x).total_cmp(&d(z))
})
.expect("a candidate")
}
/// `RGB10A2Unorm_sRGB` (an Apple M3 Max under macOS 27.0.1, our probe: every code of each
/// channel read, 16,385 values and the specials written in each) reads each color field's code as
/// `R10Unorm_X6_sRGB`'s red (its decode step over 8192, a `half` with ties away from zero) and
/// alpha's 2-bit code `a` as `a / 3`, and writes each color channel as `R10Unorm_X6_sRGB`'s red
/// and alpha as the exact product with 3 of the value clamped to `[0, 1]` (a NaN 0), rounded to
/// nearest, into one word: red from bit 0, green 10, blue 20, alpha 30. Its clear texels and load
/// codes follow the same rules.
#[test]
fn rgb10a2_srgb_reads_and_writes_metals_codes() {
let form = ExtendedRange::Rgb10A2Srgb;
let step = |c: u32| f32::from(R10X6_SRGB_DECODE_STEPS[c as usize]) / 8192.0;
// The probe's words: red c, green 1023 - c, blue 7c mod 1024, alpha c mod 4.
let lanes: Vec<[u32; 4]> = (0..1024u32)
.map(|c| {
[
c | (1023 - c) << 10 | (7 * c % 1024) << 20 | (c % 4) << 30,
0,
0,
0,
]
})
.collect();
let got = run(form, Op::Decode, &lanes);
let halves = run(form, Op::DecodeHalf, &lanes);
for ((l, g), h) in lanes.iter().zip(&got).zip(&halves) {
let w = l[0];
let want = [
step(w & 1023),
step(w >> 10 & 1023),
step(w >> 20 & 1023),
third(w >> 30),
];
assert_eq!(*g, want.map(f32::to_bits), "word {w:08x}");
let want = want.map(|v| to_half(f64::from(v), true));
assert_eq!(*h, want.map(f32::to_bits), "half, word {w:08x}");
}
let mut values: Vec<f32> = (0..=16384u32).map(|k| k as f32 / 16384.0).collect();
for &first in &R10X6_SRGB_ENCODE_FIRST {
let first = f64::from(first);
if first > 0.0 {
let edge = ((first - 0.5) / 8192.0) as f32;
values.extend((0..5).map(|d| f32::from_bits(edge.to_bits() + d - 2)));
}
}
for a in [1.0f64, 2.0] {
let mid = ((a - 0.5) / 3.0) as f32;
values.extend((0..5).map(|d| f32::from_bits(mid.to_bits() + d - 2)));
}
values.extend([
f32::NAN,
-f32::NAN,
f32::INFINITY,
f32::NEG_INFINITY,
-0.0,
-1.0,
1.5,
f32::from_bits(1),
]);
let alpha_code = |v: f32| match v.is_nan() {
true => 0,
false => (f64::from(v.clamp(0.0, 1.0)) * 3.0).round_ties_even() as u32,
};
let lanes: Vec<[u32; 4]> = (0..values.len())
.map(|i| {
let v = |k: usize| values[(i * k) % values.len()].to_bits();
[v(1), v(7919), v(104_729), v(31)]
})
.collect();
let got = run(form, Op::Encode, &lanes);
for (l, g) in lanes.iter().zip(&got) {
let v = l.map(f32::from_bits);
let code = |c: usize| padded_srgb_code(ExtendedRange::R10X6Srgb, v[c]);
let word = code(0) | code(1) << 10 | code(2) << 20 | alpha_code(v[3]) << 30;
assert_eq!(*g, [word, 0, 0, 0], "values {v:?}");
}
// The crate's clear texels agree with the rules (the runtime's clear writes `clear_texel`).
let half = |v: f64| crate::float16::f16_bits_to_f32(crate::float16::f32_to_f16_bits(v as f32));
for color in [
[0.25, 0.5, 0.75, 0.4],
[1.0, 0.0, 0.1, 1.0],
[-1.0, 2.0, f64::NAN, 0.2],
] {
let route = crate::metal::format::ClearRoute::ThroughHalf;
let code = |c: usize| padded_srgb_code(ExtendedRange::R10X6Srgb, half(color[c]));
let word = code(0) | code(1) << 10 | code(2) << 20 | alpha_code(half(color[3])) << 30;
assert_eq!(form.clear_texel(color, route), [word, 0, 0, 0], "{color:?}");
}
assert!(apart > 0, "the product never misses the quotient");
}
/// Metal's `float` of bfloat code `c`, as bits (`metal::format::ExtendedRange::R16Bfloat`): the
/// code shifted up 16, any NaN code the quiet NaN.
fn bfloat_read(c: u32) -> u32 {
match c & 0x7FFF > 0x7F80 {
true => 0x7FC0_0000,
false => c << 16,
}
c << 16
}
/// Metal's code of a kernel's write of the `f32` of bits `b` to a bfloat texture: its top 16 bits,
/// a NaN `0x7fc0`.
/// The code of a kernel's write of the `f32` of bits `b` to a bfloat texture: its top 16 bits, a
/// NaN's with its quiet bit set (Metal writes `0x7fc0`).
fn bfloat_write(b: u32) -> u32 {
match b & 0x7FFF_FFFF > 0x7F80_0000 {
true => 0x7FC0,
true => (b | 0x0040_0000) >> 16,
false => b >> 16,
}
}
/// Every code of each bfloat form in each channel reads Metal's `float` and its `half` (rounded to
/// nearest even, overflows to the infinities), the channels a form lacks 0 and alpha 1 whatever
/// their words hold; a write stores Metal's codes: per code its bits and its tie's neighbours,
/// every eighth `half` widened, and the specials, the components a form lacks zero (an Apple M4:
/// every code, read and written, in each bfloat format).
/// The interpreter's device narrowing of the `float` of bits `b` to `half` (`OpQuantizeToF16`:
/// nearest even, a result below the smallest normal `half` its signed zero), a NaN kept as it is
/// (`narrow::round_texel`).
fn device_half(b: u32) -> u32 {
let x = f32::from_bits(b);
if x.is_nan() {
return b;
}
let h = crate::float16::f32_to_f16_bits(x);
let h = if h & 0x7C00 == 0 { h & 0x8000 } else { h };
crate::float16::f16_bits_to_f32(h).to_bits()
}
/// Every code of each bfloat form in each channel reads its `float`, a NaN code's NaN unchanged
/// (`0x7f81` reads `0x7f810000`, where Metal reads `0x7fc00000`), and its `half` the device's
/// narrowing of it, the channels a form lacks 0 and alpha 1 whatever their words hold; a write
/// stores each value's top 16 bits, a NaN's quiet bit set (`0x7f800001` writes `0x7fc0`,
/// `0x7f810000` writes `0x7fc1`, where Metal writes `0x7fc0`): per code its bits and its tie's
/// neighbours, every eighth `half` widened, and the specials, the components a form lacks zero.
#[test]
fn bfloat_forms_read_and_write_metals_codes() {
fn bfloat_forms_read_and_write_their_bits() {
let forms = [
(ExtendedRange::R16Bfloat, 1usize, 4096u32),
(ExtendedRange::Rg16Bfloat, 2, 4096),
@@ -1178,11 +982,7 @@ fn bfloat_forms_read_and_write_metals_codes() {
(false, _) => 0,
});
assert_eq!(*f, want, "{form:?} words {l:x?}");
let half = |b: u32| {
let h = crate::float16::f32_to_f16_bits(f32::from_bits(b));
crate::float16::f16_bits_to_f32(h).to_bits()
};
assert_eq!(*h, want.map(half), "{form:?} half, words {l:x?}");
assert_eq!(*h, want.map(device_half), "{form:?} half, words {l:x?}");
}
// Writes: per code its bits and the neighbours of its tie, every eighth `half`, and the
// specials, `value k` in channel `k % 4` of invocation `k / 4`.
@@ -1199,6 +999,7 @@ fn bfloat_forms_read_and_write_metals_codes() {
f32::NAN.to_bits(),
(-f32::NAN).to_bits(),
0x7F80_0001,
0x7F81_0000,
0xFFFF_FFFF,
f32::INFINITY.to_bits(),
f32::NEG_INFINITY.to_bits(),
@@ -1248,9 +1049,10 @@ fn fnv(bytes: &[u8]) -> u64 {
/// A fragment function's `float` and `half` outputs to a bfloat attachment store Metal's codes:
/// a `float` rounded to `half` toward zero (65504 at most) or, at `NearestEven`, to nearest even,
/// then the bfloat code nearest, ties to even, a NaN `0x7fc0`; every `float` around each code's
/// tie and every `half` code against Metal's digests, the narrower forms keeping their lanes, and
/// named answers.
/// then the bfloat code nearest, ties to even; a NaN stays a NaN code (`narrow::round`'s quiet
/// bit), where Metal stores `0x7fc0`. Every `float` around each code's tie and every `half` code
/// against Metal's digests with each NaN code read as Metal's, the narrower forms keeping their
/// lanes, and named answers.
#[test]
fn bfloat_attachments_store_metals_codes() {
let digest = |got: &[[u32; 4]]| {
@@ -1258,7 +1060,11 @@ fn bfloat_attachments_store_metals_codes() {
let bytes: Vec<u8> = got
.iter()
.flatten()
.flat_map(|&c| (c as u16).to_le_bytes())
.map(|&c| match c & 0x7FFF > 0x7F80 {
true => 0x7FC0,
false => c,
})
.flat_map(|c| (c as u16).to_le_bytes())
.collect();
fnv(&bytes)
};
@@ -1316,7 +1122,10 @@ fn bfloat_attachments_store_metals_codes() {
);
for (&(b, default, nearest), g) in named.iter().zip(&got) {
let want = if nearest_even { nearest } else { default };
assert_eq!(g[0], want, "{b:#x}, nearest even {nearest_even}");
match want == 0x7FC0 {
true => assert!(g[0] & 0x7FFF > 0x7F80, "{b:#x}: {:#x}", g[0]),
false => assert_eq!(g[0], want, "{b:#x}, nearest even {nearest_even}"),
}
}
}
}
@@ -24,7 +24,6 @@
//! selection, and so is every function whose Vulkan precision is looser than Metal's.
use crate::air::intrinsics::PackFormat;
use crate::lower::arith::exact_division::per_lane;
use crate::lower::arith::legal::{FloatFmt, Form, Held};
use crate::lower::arith::libm::{self, Lib};
use crate::lower::arith::nan::{self, NanTest};
@@ -2527,103 +2526,6 @@ pub fn packed_bits(format: PackFormat) -> u8 {
}
}
/// [`round_exact_product_lanes`] with one scale `m` for every lane.
#[cfg(test)]
pub fn round_exact_product(
fb: &mut FunctionBuilder<'_>,
s: Form,
v: Value,
m: u32,
snorm: bool,
) -> BResult<Value> {
round_exact_product_lanes(fb, s, v, &[m], snorm)
}
/// `v` (`f32` lanes of form `s`, in `[0, 1]`, or `[-1, 1]` when `snorm`) times `m[i]` for lane
/// `i` (one scale for every lane when `m` has one; each below `2^16`), rounded to the nearest
/// integer, ties to even, **from the exact product**, as `u32` lanes (two's complement for a
/// negative `snorm` result). The sequence is lane-wise.
///
/// Rounding `fl(v * m)` differs where the multiply itself rounds onto a half-integer; Metal
/// rounds the exact product (measured for `rgb10a2` by the old engine's device case
/// `round-the-exact-product-into-ten-ten-ten-two`). The product is formed exactly in integers,
/// independent of the device's rounding mode and of whether it fuses: with `v = mant * 2^(e -
/// 150)` (`e` the biased exponent, `mant` the significand with its leading one), `v * m =
/// (mant * m) / 2^s` for `s = 150 - e >= 23`. `mant * m < 2^40` is the `UMulExtended` pair;
/// shifted right by 9 with a sticky bit it fits 31 bits, and `s >= 41` (which includes every
/// denormal and zero) gives a product below one half, so 0.
pub fn round_exact_product_lanes(
fb: &mut FunctionBuilder<'_>,
s: Form,
v: Value,
m: &[u32],
snorm: bool,
) -> BResult<Value> {
let u = narrow::u32_form(s);
let c = |fb: &mut FunctionBuilder<'_>, k: u64| splat(fb, u, k);
let a = if snorm {
glsl(fb, GlslOp::FAbs, &[v])?
} else {
v
};
let ut = ty(fb, u)?;
let bits = fb.convert(ConvOp::Bitcast, a, ut)?;
let k23 = c(fb, 23)?;
let e = bin(fb, BinOp::ShiftRightLogical, bits, k23)?;
let man = c(fb, 0x7F_FFFF)?;
let mant = bin(fb, BinOp::BitwiseAnd, bits, man)?;
let lead = c(fb, 0x80_0000)?;
let mant = bin(fb, BinOp::BitwiseOr, mant, lead)?;
let m: Vec<u64> = m.iter().map(|m| u64::from(*m)).collect();
let mk = per_lane(fb, u, &m)?;
let p = bin(fb, BinOp::UMulExtended, mant, mk)?;
let lo = fb.composite_extract(p, &[0])?;
let hi = fb.composite_extract(p, &[1])?;
// s = 150 - e; zero when s >= 41; t = min(s, 40) - 9 in [14, 31].
let k150 = c(fb, 150)?;
let sh = bin(fb, BinOp::ISub, k150, e)?;
let k41 = c(fb, 41)?;
let zero = bin(fb, BinOp::UGreaterThanEqual, sh, k41)?;
let k40 = c(fb, 40)?;
let sh = glsl(fb, GlslOp::UMin, &[sh, k40])?;
let k9 = c(fb, 9)?;
let t = bin(fb, BinOp::ISub, sh, k9)?;
// x = (mant * m) >> 9 with the dropped bits as a sticky lowest bit.
let low9 = c(fb, 0x1FF)?;
let dropped = bin(fb, BinOp::BitwiseAnd, lo, low9)?;
let z = c(fb, 0)?;
let one = c(fb, 1)?;
let lost = bin(fb, BinOp::INotEqual, dropped, z)?;
let sticky = fb.select(lost, one, z)?;
let x = bin(fb, BinOp::ShiftRightLogical, lo, k9)?;
let up = bin(fb, BinOp::ShiftLeftLogical, hi, k23)?;
let x = bin(fb, BinOp::BitwiseOr, x, up)?;
let x = bin(fb, BinOp::BitwiseOr, x, sticky)?;
// Round x / 2^t to nearest even.
let q = bin(fb, BinOp::ShiftRightLogical, x, t)?;
let unit = bin(fb, BinOp::ShiftLeftLogical, one, t)?;
let below = bin(fb, BinOp::ISub, unit, one)?;
let rem = bin(fb, BinOp::BitwiseAnd, x, below)?;
let t1 = bin(fb, BinOp::ISub, t, one)?;
let half = bin(fb, BinOp::ShiftLeftLogical, one, t1)?;
let gt = bin(fb, BinOp::UGreaterThan, rem, half)?;
let eq = bin(fb, BinOp::IEqual, rem, half)?;
let lsb = bin(fb, BinOp::BitwiseAnd, q, one)?;
let odd = bin(fb, BinOp::INotEqual, lsb, z)?;
let tie_up = bin(fb, BinOp::LogicalAnd, eq, odd)?;
let round_up = bin(fb, BinOp::LogicalOr, gt, tie_up)?;
let inc = fb.select(round_up, one, z)?;
let r = bin(fb, BinOp::IAdd, q, inc)?;
let r = fb.select(zero, z, r)?;
if !snorm {
return Ok(r);
}
let fz = fsplat(fb, s, 0.0)?;
let neg = bin(fb, BinOp::FOrdLessThan, v, fz)?;
let nr = bin(fb, BinOp::ISub, z, r)?;
fb.select(neg, nr, r)
}
/// `air.unpack` of a packed float format (the field layouts are the old engine's, device-measured
/// against Metal's `rg11b10f<float3>` and `rgb9e5<float3>` reads):
///
+14 -44
View File
@@ -109,7 +109,7 @@ use crate::lower::strategy::FamilyStrategy;
use crate::pipeline::artifact::{EntryMath, PrecisionNote};
use crate::spirv::builder::{FunctionBuilder, MaskForm, ModuleBuilder, ProductForm, QuantizeForm};
use crate::spirv::error::BResult;
use crate::spirv::ids::{DemoteTy, FuncId, GlobalId, TypeId, Value as SValue};
use crate::spirv::ids::{DemoteTy, FuncId, TypeId, Value as SValue};
use crate::spirv::ir::{Contraction, ExecMode, UnOp};
use std::borrow::Cow;
use std::collections::{BTreeMap, BTreeSet};
@@ -677,14 +677,10 @@ pub struct ArithPlan {
/// `OpBitFieldUExtract` on a driver whose compiler drops the mask after a signed clamp
/// (`DriverWorkaround::NarrowMaskAfterSignedClamp`), else the mask.
pub mask: MaskForm,
/// Whether a function reads or writes a texture slot bound in an `_sRGB` extended-range
/// format (`LoweringInputs::extended_range`), through Metal's tables, which [`declare`] then
/// declares once ([`extended_range::declare`]).
pub extended_range_srgb: bool,
/// The padded `_sRGB` forms whose texels a function reads or writes
/// ([`ArithPlan::converts`]), through Metal's tables: [`declare`] declares each form's once
/// ([`extended_range::declare_padded`]).
pub padded_srgb: BTreeSet<crate::metal::format::ExtendedRange>,
/// Whether a function converts the texels of a slot or attachment bound in an extended-range,
/// padded or bfloat form ([`ArithPlan::converts`]) by the device's arithmetic
/// ([`extended_range`]): [`finish`] then records `PrecisionNote::DevicePackConversion`.
pub extended_range: bool,
/// Whether a `half` fused multiply-add takes the device's 16-bit `Fma` ([`fma::Route::F16`]),
/// recorded at selection: the module then requires `VkProperty::MetalHalfFma`.
pub f16_fma: bool,
@@ -726,14 +722,9 @@ pub struct ArithPlan {
impl ArithPlan {
/// Record that a function reads or writes the texels of a slot or attachment bound in
/// `form`, which then convert through Metal's tables: an `_sRGB` extended-range form's
/// ([`ArithPlan::extended_range_srgb`]) or a padded `_sRGB` form's
/// ([`ArithPlan::padded_srgb`]).
pub fn converts(&mut self, form: crate::metal::format::ExtendedRange) {
self.extended_range_srgb |= form.srgb();
if form.padded_srgb() {
self.padded_srgb.insert(form);
}
/// `form`, which convert by the device's arithmetic ([`ArithPlan::extended_range`]).
pub fn converts(&mut self, _form: crate::metal::format::ExtendedRange) {
self.extended_range = true;
}
/// Record fused multiply-add `fma`, selected: the device's 16-bit `Fma`
@@ -747,17 +738,6 @@ impl ArithPlan {
/// The words of the module-scope routines the plan's strategies call, each with the census name
/// of the strategies that call it: counted once per module, not per use.
pub fn routine_words(plan: &ArithPlan) -> impl Iterator<Item = (&'static str, u64)> + '_ {
// The extended-range sRGB table, once, and each padded `_sRGB` form's.
let extended = plan.extended_range_srgb.then_some((
extended_range::CENSUS_NAME,
u64::from(extended_range::TABLE_WORDS),
));
let padded = plan.padded_srgb.iter().map(|_| {
(
extended_range::PADDED_CENSUS_NAME,
u64::from(extended_range::PADDED_TABLE_WORDS),
)
});
let fmod = plan
.fmod
.then_some((libm::FMOD_NAME, u64::from(libm::FMOD_WORDS)));
@@ -765,8 +745,6 @@ pub fn routine_words(plan: &ArithPlan) -> impl Iterator<Item = (&'static str, u6
.iter()
.map(|d| (wide::DIVIDE, u64::from(d.words())))
.chain(fmod)
.chain(extended)
.chain(padded)
}
/// The census name of `air.fast_fmod` on `float` ([`ArithStrategy::FastFmod`]).
@@ -790,6 +768,10 @@ pub fn finish(cx: &mut SelectCx<'_>) -> Result<(), Error> {
cx.families.arith.native_half = narrow::native_rounding(cx.families.arith.quantize).is_some();
// Under the float controls a `half`'s NaN is the device's conversion's.
cx.families.arith.native_half_nans = cx.families.arith.quantize == QuantizeForm::Controlled;
// An extended-range, padded or bfloat texel's conversion is the device's arithmetic.
if cx.families.arith.extended_range {
cx.precision.insert(PrecisionNote::DevicePackConversion);
}
cx.families.arith.mask = if cx
.profile
.fields()
@@ -839,17 +821,13 @@ pub fn finish(cx: &mut SelectCx<'_>) -> Result<(), Error> {
Ok(())
}
/// The arith family's module-scope objects: the shared wide division routines, precise `fmod`'s
/// routine, and the tables (the `GLSL.std.450` import is the serializer's, and constants are
/// The arith family's module-scope objects: the shared wide division routines and precise
/// `fmod`'s routine (the `GLSL.std.450` import is the serializer's, and constants are
/// interned where they are used).
#[derive(Clone, Debug, Default)]
pub struct Declared {
/// The function of each of the plan's [`ArithPlan::divides`].
pub divides: BTreeMap<wide::Divide, FuncId>,
/// The extended-range sRGB table, when [`ArithPlan::extended_range_srgb`].
pub extended_range_srgb: Option<GlobalId>,
/// The table of each of the plan's [`ArithPlan::padded_srgb`].
pub padded_srgb: BTreeMap<crate::metal::format::ExtendedRange, GlobalId>,
/// Precise `fmod`'s routine, when [`ArithPlan::fmod`].
pub fmod: Option<FuncId>,
}
@@ -872,14 +850,6 @@ pub fn declare(
if plan.families.arith.fmod {
decl.fmod = Some(libm::define_fmod(mb)?);
}
if plan.families.arith.extended_range_srgb {
decl.extended_range_srgb = Some(extended_range::declare(mb)?);
}
for &form in &plan.families.arith.padded_srgb {
if let Some(table) = extended_range::declare_padded(mb, form)? {
decl.padded_srgb.insert(form, table);
}
}
Ok(decl)
}
@@ -1881,66 +1881,6 @@ fn normalized_division_is_correctly_rounded() {
}
}
/// A normalized pack rounds the exact product `x * m`, not `fl(x * m)`: the values where the `f32`
/// multiply rounds onto a half-integer that the exact product is not (found by search next to every
/// `k + 1/2`), and ordinary values, for every channel scale.
#[test]
fn normalized_packs_round_the_exact_product() {
let x = float(32);
let word = int(32);
for (m, snorm) in [
(255u32, false),
(127, true),
(65535, false),
(32767, true),
(1023, false),
(3, false),
(31, false),
(63, false),
] {
let lo = if snorm { -1.0f32 } else { 0.0 };
let mut vals: Vec<f32> = vec![0.0, -0.0, 1.0, 0.5, 1e-30, 1.0e-6, 0.999_999_9, lo];
let mut split = 0;
'search: for k in 0..m {
let x0 = (f64::from(k) + 0.5) / f64::from(m);
let first = (x0 as f32).to_bits().saturating_sub(4);
for b in first..first + 9 {
let v = f32::from_bits(b);
let p = v * m as f32;
let exact = f64::from(v) * f64::from(m);
if p.fract() == 0.5 && f64::from(p) != exact {
vals.push(v);
if snorm {
vals.push(-v);
}
split += 1;
if split >= 24 {
break 'search;
}
}
}
}
assert!(split > 0 || m < 8, "scale {m}: no split found");
let cases: Vec<Case> = vals
.iter()
.map(|v| vec![vec![u64::from(v.to_bits())]])
.collect();
check(
&format!("exact product x {m}"),
&[x],
word,
&|fb, v| math::round_exact_product(fb, x, v[0], m, snorm),
&cases,
&|c| {
let v = f64::from(f32::from_bits(arg(c, 0) as u32));
let r = (v * f64::from(m)).round_ties_even() as i64;
Some(vec![r as u64 & 0xFFFF_FFFF])
},
false,
);
}
}
/// The value of a packed small-float field with a 5-bit exponent (bias 15) above `man` bits.
fn small_float(field: u64, man: u32) -> f64 {
let e = (field >> man) & 0x1F;
@@ -426,10 +426,7 @@ pub(super) fn value(
}
let texel = input_texel(cx, fb, c.color)?;
let texel = match c.extended {
Some(form) => {
let table = crate::lower::texture::extended_table(cx, form)?;
extended_range::tile_value(fb, form, texel, table)?
}
Some(form) => extended_range::tile_value(fb, form, texel)?,
// The image's red, Metal's alpha: `(0, 0, 0, r)`.
None if c.alpha_red => alpha_in_red(fb, texel)?,
None => texel,
@@ -1940,7 +1940,7 @@ pub(super) fn select_read(cx: &mut SelectCx<'_>, c: ColorInput) -> Result<(), Er
return Err(refused.at_attachment(Attachment::Color(c.color)).into());
}
class_of(c.form, sc.view.read_class(), c.color, false)?;
// An `_sRGB` extended-range texel decodes through Metal's table.
// An extended-range texel converts by the device's arithmetic.
if let Some(e) = sc.view.extended {
cx.families.arith.converts(e);
}
@@ -2030,7 +2030,7 @@ pub fn select_output(
};
class_of(form, sc.view.read_class(), color, true)?;
// An extended-range attachment's blend is of a `half4` output, or of a `float4` one where
// the blend takes it ([`plan`]), and an `_sRGB` one's encodes through Metal's table.
// the blend takes it ([`plan`]), and an `_sRGB` one's encodes by the device's `Pow`.
let output4 = (form.lanes == 4).then(|| form.float_fmt()).flatten();
if blend_of(&sc.view, output4).is_err() {
return Err(cx.invariant("an extended-range blend of an output outside its model"));
@@ -2540,10 +2540,7 @@ pub(super) fn value(
};
let texel = match (sc.view.extended, sc.view.uint_view) {
(Some(_), _) if sc.shadowed => texel,
(Some(form), _) => {
let table = crate::lower::texture::extended_table(cx, form)?;
extended_range::tile_value(fb, form, texel, table)?
}
(Some(form), _) => extended_range::tile_value(fb, form, texel)?,
(None, Some(_)) => {
let word = fb.composite_extract(texel, &[0])?;
srgb_decode(fb, sc.view.format, word)?
@@ -2620,14 +2617,13 @@ pub(super) fn emit_return(
texel
}
(Some(range), None) if !sc.shadowed => {
stage_io::extended_color::texel(cx, fb, range, form, part)?
stage_io::extended_color::texel(fb, range, form, part)?
}
// The output's `half`, which the tile holds and the codes encode.
(Some(range), None) => {
let v = stage_io::extended_color::held(fb, range, form, part)?;
held = Some(v);
let table = crate::lower::texture::extended_table(cx, range)?;
extended_range::encode(fb, range, v, table)?
extended_range::encode(fb, range, v)?
}
(None, _) if sc.view.uint_view.is_some() => {
srgb_texel(cx, fb, color, &sc, (form, part), second)?
@@ -3043,7 +3039,6 @@ fn blended(
return Err(cx.fail("an extended-range blend of another output"));
};
let s1 = blend_second(cx, &b, second)?;
let table = crate::lower::texture::extended_table(cx, range)?;
let mut codes = None;
let mut read_codes = |cx: &mut EmitCx<'_>, fb: &mut FunctionBuilder<'_>| -> BResult<SValue> {
if let Some(texel) = codes {
@@ -3061,14 +3056,14 @@ fn blended(
Some(held) => held,
None => {
let texel = read_codes(cx, fb)?;
extended_range::tile_value(fb, range, texel, table)?
extended_range::tile_value(fb, range, texel)?
}
};
let constant = blend_constant(cx, fb, &b)?;
let ranges = Some(extended_range::blend::extended_ranges(range));
let v = extended_range::blend::native(fb, &b, ranges, (part, s1, d), constant)?;
if !sc.view.merges() {
let texel = extended_range::encode(fb, range, v, table)?;
let texel = extended_range::encode(fb, range, v)?;
return Ok((texel, shadow.map(|_| v)));
}
let kept = [
@@ -3079,7 +3074,7 @@ fn blended(
]
.map(|c| sc.view.kept.contains(c));
let texel = read_codes(cx, fb)?;
let stored = extended_range::encode_keeping(fb, range, v, table, (texel, kept))?;
let stored = extended_range::encode_keeping(fb, range, v, (texel, kept))?;
let held = match shadow {
// The shadow keeps the channels the codes keep, as the tile held them.
Some(held) => {
@@ -224,17 +224,16 @@ pub(crate) fn texel(
second: Option<(Form, SValue)>,
) -> BResult<SValue> {
let Some(b) = &ib.blend else {
return crate::lower::stage_io::extended_color::texel(cx, fb, ib.form, form, part);
return crate::lower::stage_io::extended_color::texel(fb, ib.form, form, part);
};
let s1 = fetch::blend_second(cx, b, second)?;
let table = crate::lower::texture::extended_table(cx, ib.form)?;
let codes = super::color::input_texel(cx, fb, color)?;
let d = extended_range::tile_value(fb, ib.form, codes, table)?;
let d = extended_range::tile_value(fb, ib.form, codes)?;
let constant = fetch::blend_constant(cx, fb, b)?;
let ranges = Some(extended_range::blend::extended_ranges(ib.form));
let v = extended_range::blend::native(fb, b, ranges, (part, s1, d), constant)?;
if ib.kept.is_empty() {
return extended_range::encode(fb, ib.form, v, table);
return extended_range::encode(fb, ib.form, v);
}
let kept = [
vk::ColorComponentFlags::R,
@@ -243,7 +242,7 @@ pub(crate) fn texel(
vk::ColorComponentFlags::A,
]
.map(|c| ib.kept.contains(c));
extended_range::encode_keeping(fb, ib.form, v, table, (codes, kept))
extended_range::encode_keeping(fb, ib.form, v, (codes, kept))
}
/// The words the planned blends add at `rets` returns: one input attachment each beside the
@@ -7,8 +7,9 @@
//! the taps and filters them itself, on a device that samples through Metal's own sampler too.
//!
//! **Metal's answers** (an Apple M3 Max on macOS 26.7 and an Apple M4 on macOS 27.0.1,
//! byte-identical): a nearest sample is the read of the texel at Metal's position, decoded
//! (`extended_range::decode`, its `half` rounded with ties away from zero). A linear sample's
//! byte-identical): a nearest sample is the read of the texel at Metal's position, decoded (its
//! `half` rounded with ties away from zero; here `extended_range::decode`, the device's
//! arithmetic). A linear sample's
//! footprint is the other formats' (`linear`, the position quantized to 1/256 of a texel, each tap
//! addressed on its own, a border tap the sampler's border color through the format's channels).
//! Its sum is the device's: the four taps' decoded values blended by its `FMix` at the fractions
@@ -162,7 +163,7 @@ use crate::metal::{PixelFormat, SamplerMipFilter, TextureSwizzleChannels};
use crate::spirv::builder::constructs::{ArmEnd, ArmFn, Merged};
use crate::spirv::builder::{FunctionBuilder, ModuleBuilder};
use crate::spirv::error::BResult;
use crate::spirv::ids::{DemoteTy, FuncId, GlobalId, TypeId, Value as SValue};
use crate::spirv::ids::{DemoteTy, FuncId, TypeId, Value as SValue};
use crate::spirv::ir::{BinOp, ConstBits, Constant, ConvOp, GlslOp, ImageQuery};
use super::bicubic::{
@@ -498,14 +499,12 @@ pub(super) struct Texture {
pub size: Option<SValue>,
}
/// How a sample's raw texels decode: by one form, a slot's variant's, through the form's sRGB
/// table; or by the form a heap handle's class index names (`sampler::heap_raw`), through the
/// How a sample's raw texels decode: by one form, a slot's variant's; or by the form a heap handle's class index names (`sampler::heap_raw`), through the
/// heap's decode routine of each result type (`texture::heap_raw::define`).
#[derive(Clone, Copy)]
pub(super) enum Decode {
Form {
form: ExtendedRange,
table: Option<GlobalId>,
},
Heap {
/// The form's index in `ExtendedRange::HEAP_READ` (a `u32`).
@@ -669,7 +668,6 @@ fn sampled(
(offset, passed): (Option<&[i32]>, Option<(SValue, u8)>),
) -> BResult<SValue> {
let (decl, img) = crate::lower::texture::slot_image(cx, fb, r.texture)?;
let table = crate::lower::texture::extended_table(cx, r.form)?;
let t = Tys::new(fb)?;
let flags = scalar(fb, t.u32_, u64::from(flags(r.form)))?;
let swizzle = match r.swizzle {
@@ -710,10 +708,7 @@ fn sampled(
arrayed: r.layer,
texel: decl.texel,
},
decode: Decode::Form {
form: r.form,
table,
},
decode: Decode::Form { form: r.form },
flags: value(fb, flags)?,
swizzle,
parent,
@@ -1413,9 +1408,7 @@ fn decoded(
half: bool,
) -> BResult<SValue> {
match tex.decode {
Decode::Form { form, table } => {
crate::lower::arith::extended_range::decode(fb, form, raw, table, half)
}
Decode::Form { form } => crate::lower::arith::extended_range::decode(fb, form, raw, half),
Decode::Heap { form, routines, .. } => {
let routine = match (half, routines) {
(false, (f, _)) => f,
@@ -36,7 +36,6 @@ use crate::error::{Error, Feature, Unsupported};
use crate::lower::arith::extended_range;
use crate::lower::arith::texel_round::{self, HalfRounding};
use crate::lower::arith::{FloatFmt, Form, Held};
use crate::lower::emit::EmitCx;
use crate::lower::select::SelectCx;
use crate::metal::format::ExtendedRange;
use crate::pipeline::lower_inputs::ExtendedRangeColor;
@@ -94,7 +93,6 @@ pub(super) fn plan(
/// attachment `e`: [`texel`] (or, a bfloat one's [`bfloat_output`]), as the raw format's
/// components.
pub(super) fn encode(
cx: &mut EmitCx<'_>,
fb: &mut FunctionBuilder<'_>,
e: ExtendedRangeColor,
f: Form,
@@ -103,7 +101,7 @@ pub(super) fn encode(
let form = e.form;
let texel = match form.bfloat() {
true => bfloat_output(fb, e, f, x)?,
false => texel(cx, fb, form, f, x)?,
false => texel(fb, form, f, x)?,
};
raw_components(fb, form, texel)
}
@@ -158,15 +156,13 @@ const FOUR: Form = Form {
/// then the kernel write's encode. The storage form's unblended write stores it too
/// (`lower::fragment::fetch`).
pub(crate) fn texel(
cx: &mut EmitCx<'_>,
fb: &mut FunctionBuilder<'_>,
form: ExtendedRange,
f: Form,
x: Value,
) -> BResult<Value> {
let v = held(fb, form, f, x)?;
let table = crate::lower::texture::extended_table(cx, form)?;
extended_range::encode(fb, form, v, table)
extended_range::encode(fb, form, v)
}
/// The value [`texel`] encodes for output `x` (form `f`) to an attachment held in `form`, a
@@ -1995,7 +1995,7 @@ fn output_part(
None => word,
}
}
(None, Some(e)) => extended_color::encode(cx, fb, e, o.link.form, part)?,
(None, Some(e)) => extended_color::encode(fb, e, o.link.form, part)?,
(None, None) => color_write::round(cx, fb, color, o.link.form, part)?,
},
None => part,
+2 -25
View File
@@ -2495,9 +2495,8 @@ fn read(cx: &mut EmitCx<'_>, fb: &mut FunctionBuilder<'_>, r: &Read) -> BResult<
// texel is selected.
let texel = match r.extended {
Some(form) => {
let table = extended_table(cx, form)?;
let half = r.texel.conv == TexelConv::F16;
crate::lower::arith::extended_range::decode(fb, form, texel, table, half)?
crate::lower::arith::extended_range::decode(fb, form, texel, half)?
}
None => texel,
};
@@ -2793,25 +2792,6 @@ pub(crate) fn heap_raw_image(
fb.load(p, MemAccess::default())
}
/// The table an extended-range texel of `form` converts through: the module's for an `_sRGB`
/// form (`ArithPlan::extended_range_srgb`), the form's own for a padded `_sRGB` one
/// (`ArithPlan::padded_srgb`), none for a linear one.
pub(crate) fn extended_table(
cx: &mut EmitCx<'_>,
form: crate::metal::format::ExtendedRange,
) -> BResult<Option<crate::spirv::ids::GlobalId>> {
let arith = &cx.decl.families.arith;
let table = match form.padded_srgb() {
true => arith.padded_srgb.get(&form).copied(),
false => arith.extended_range_srgb,
};
match (form.srgb() || form.padded_srgb(), table) {
(false, _) => Ok(None),
(true, Some(table)) => Ok(Some(table)),
(true, None) => Err(cx.fail("an sRGB extended-range texel without Metal's table")),
}
}
fn write(cx: &mut EmitCx<'_>, fb: &mut FunctionBuilder<'_>, w: &Write) -> BResult<()> {
let Loaded {
decl,
@@ -2846,10 +2826,7 @@ fn write(cx: &mut EmitCx<'_>, fb: &mut FunctionBuilder<'_>, w: &Write) -> BResul
};
// An extended-range texel's raw code, encoded as Metal writes it.
let texel = match w.extended {
Some(form) => {
let table = extended_table(cx, form)?;
crate::lower::arith::extended_range::encode(fb, form, v, table)?
}
Some(form) => crate::lower::arith::extended_range::encode(fb, form, v)?,
None => to_image(fb, &decl, w.texel, v)?,
};
// An integer texel's lanes, saturated to the format's channels as Metal stores them.
@@ -73,7 +73,7 @@ pub fn define(mb: &mut ModuleBuilder, half: bool) -> BResult<FuncId> {
let mut v = zero;
let mut alpha_one = None;
for (k, &f) in (0u64..).zip(ExtendedRange::HEAP_READ.iter()) {
let decoded = crate::lower::arith::extended_range::decode(&mut fb, f, raw, None, half)?;
let decoded = crate::lower::arith::extended_range::decode(&mut fb, f, raw, half)?;
let c = fb.module().constant(Constant::Scalar {
ty: u32_,
bits: ConstBits(k),
+5 -5
View File
@@ -134,11 +134,11 @@ pub(crate) use absent::absent_arm;
pub use absent::ABSENT_ARM;
pub use atomic::TexAtomic;
pub(crate) use emit::{
constant_lanes, dispatch, extended_table, half_class, heap_element, heap_half_class,
heap_raw_form, heap_raw_image, live_or_zero, reinterpret, resident_access, rgb9e5_word,
slot_image, sparse_spec, srgb_raw_tap, srgb_texel, swizzled_float, swizzled_gather,
swizzled_held, tile_map, tiled_word, with_word, NullLeaf, TileLevel, RGB9E5_WORDS,
SRGB_DECODE_WORDS, SRGB_TAP_WORDS, SRGB_TEXEL,
constant_lanes, dispatch, half_class, heap_element, heap_half_class, heap_raw_form,
heap_raw_image, live_or_zero, reinterpret, resident_access, rgb9e5_word, slot_image,
sparse_spec, srgb_raw_tap, srgb_texel, swizzled_float, swizzled_gather, swizzled_held,
tile_map, tiled_word, with_word, NullLeaf, TileLevel, RGB9E5_WORDS, SRGB_DECODE_WORDS,
SRGB_TAP_WORDS, SRGB_TEXEL,
};
pub use emit::{emit, held_texel, to_image};
pub(crate) use slot::depth_comparison;
+8 -9
View File
@@ -411,9 +411,9 @@ impl ExtendedRange {
}
}
/// Whether the color channels are sRGB-encoded through the extended-range formats' tables
/// (`lower::arith::extended_range::declare`). The padded `_sRGB` twins have tables of their
/// own ([`padded_srgb`](Self::padded_srgb)).
/// Whether the color channels are sRGB-encoded, `BGR10_XR_sRGB`, `BGRA10_XR_sRGB` and
/// `RGB10A8_2P_XR10_sRGB` (`lower::arith::extended_range`'s transfer by the device's `Pow`). The
/// padded `_sRGB` twins are [`padded_srgb`](Self::padded_srgb).
pub fn srgb(self) -> bool {
match self {
ExtendedRange::Bgr10 { srgb }
@@ -439,9 +439,9 @@ impl ExtendedRange {
)
}
/// Whether the codes convert through the padded `_sRGB` formats' tables
/// (`R10Unorm_X6_sRGB`, `RG10Unorm_X12_sRGB`, and `RGB10A2Unorm_sRGB`'s color channels
/// through `R10Unorm_X6_sRGB`'s; `lower::arith::extended_range::declare_padded`).
/// Whether the form is a padded `_sRGB` twin: `R10Unorm_X6_sRGB`, `RG10Unorm_X12_sRGB` and
/// `RGB10A2Unorm_sRGB` (`lower::arith::extended_range`'s transfer by the device's `Pow`; the
/// runtime's clear texels through Metal's tables, `metal::format::padded_srgb`).
pub fn padded_srgb(self) -> bool {
matches!(
self,
@@ -477,9 +477,8 @@ impl ExtendedRange {
/// The forms an argument buffer's texture is read in (a heap element), in the order their
/// classes follow `metal::texel_format::heap_classes`' own: a function decodes such a texture's
/// raw texels, read through the heap's unsigned integer array, without a table. The `_sRGB`
/// forms' decodes take the module's tables and the two-plane forms are held in two planes, so a
/// heap does not hold them.
/// raw texels, read through the heap's unsigned integer array. A heap holds no `_sRGB` form
/// (their heap classes are not built) and no two-plane form, which is held in two planes.
pub const HEAP_READ: [ExtendedRange; 7] = [
ExtendedRange::Bgr10 { srgb: false },
ExtendedRange::Bgra10 { srgb: false },
@@ -1,73 +1,8 @@
//! Metal's tables of the padded `_sRGB` formats, read from an Apple M4 under macOS 27.0.1 and an
//! Apple M3 Max under macOS 26.7 (the M3's and the M4's files byte-identical): `R10Unorm_X6_sRGB`'s
//! decode step of every code and first encode index of every code, and `RG10Unorm_X12_sRGB`'s code
//! of every linear write code. The shader's `lower::arith::extended_range` declares them once per
//! module that reads or writes such a texture; the runtime's clear values read them through
//! `ExtendedRange::clear_texel`.
/// The decode step `s` of every code `c` of `R10Unorm_X6_sRGB`: Metal reads `s / 8192` (every
/// code read).
pub(crate) const R10X6_SRGB_DECODE_STEPS: [u16; 1024] = [
0, 0, 1, 2, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 10, 10, 10, 11, 12, 12, 13, 14, 14, 15, 16, 16,
16, 17, 18, 19, 20, 20, 20, 21, 22, 22, 23, 24, 24, 25, 26, 26, 26, 27, 28, 29, 30, 30, 30, 31,
32, 33, 34, 34, 35, 36, 36, 37, 38, 39, 40, 41, 42, 42, 43, 44, 45, 46, 47, 47, 48, 49, 50, 51,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77,
78, 79, 81, 82, 83, 84, 86, 87, 88, 89, 91, 92, 94, 95, 96, 97, 99, 100, 102, 103, 105, 106,
108, 109, 111, 112, 114, 115, 117, 118, 120, 121, 123, 124, 126, 127, 129, 130, 132, 133, 135,
137, 139, 140, 142, 144, 146, 147, 149, 151, 153, 154, 156, 158, 160, 161, 163, 165, 167, 169,
171, 173, 175, 176, 178, 180, 182, 184, 186, 188, 190, 192, 195, 197, 199, 201, 203, 205, 207,
209, 211, 213, 216, 218, 220, 222, 225, 227, 229, 231, 234, 236, 238, 241, 243, 246, 248, 251,
253, 256, 258, 260, 262, 265, 267, 270, 272, 275, 277, 280, 282, 285, 287, 290, 293, 296, 298,
301, 303, 306, 309, 312, 314, 317, 320, 323, 325, 328, 331, 334, 336, 339, 342, 345, 348, 351,
354, 357, 359, 362, 365, 368, 371, 374, 377, 380, 383, 386, 389, 393, 396, 399, 402, 405, 408,
411, 414, 418, 421, 424, 427, 431, 434, 437, 440, 444, 447, 451, 454, 457, 460, 464, 467, 471,
474, 478, 481, 485, 488, 492, 495, 499, 502, 506, 509, 513, 516, 520, 524, 528, 531, 535, 539,
543, 546, 550, 554, 558, 561, 565, 569, 573, 577, 581, 584, 588, 592, 596, 600, 604, 608, 612,
616, 620, 624, 628, 632, 636, 641, 645, 649, 654, 658, 662, 666, 670, 674, 679, 683, 688, 692,
696, 700, 705, 709, 714, 718, 722, 726, 731, 735, 740, 744, 749, 753, 758, 762, 767, 771, 776,
781, 786, 790, 795, 799, 804, 809, 814, 818, 823, 828, 833, 837, 842, 847, 852, 857, 862, 867,
872, 876, 881, 886, 891, 896, 901, 906, 911, 917, 922, 927, 932, 937, 942, 947, 952, 958, 963,
968, 973, 979, 984, 989, 994, 1000, 1005, 1011, 1016, 1022, 1027, 1032, 1037, 1043, 1048, 1054,
1059, 1065, 1070, 1076, 1082, 1088, 1093, 1099, 1104, 1110, 1115, 1121, 1127, 1133, 1138, 1144,
1150, 1156, 1161, 1167, 1173, 1179, 1185, 1191, 1196, 1202, 1208, 1214, 1220, 1226, 1232, 1238,
1244, 1251, 1257, 1263, 1269, 1275, 1281, 1287, 1293, 1300, 1306, 1312, 1319, 1326, 1332, 1339,
1345, 1351, 1357, 1364, 1370, 1377, 1383, 1390, 1396, 1403, 1409, 1416, 1422, 1429, 1435, 1442,
1448, 1455, 1462, 1468, 1475, 1482, 1488, 1496, 1502, 1509, 1516, 1522, 1529, 1536, 1542, 1550,
1556, 1564, 1570, 1578, 1584, 1592, 1598, 1606, 1612, 1620, 1626, 1634, 1641, 1648, 1656, 1662,
1670, 1676, 1684, 1691, 1698, 1706, 1713, 1720, 1728, 1735, 1742, 1750, 1757, 1764, 1772, 1779,
1787, 1794, 1802, 1809, 1817, 1824, 1832, 1840, 1848, 1855, 1863, 1870, 1878, 1886, 1894, 1901,
1909, 1917, 1925, 1932, 1940, 1948, 1956, 1964, 1972, 1980, 1988, 1996, 2004, 2012, 2020, 2028,
2036, 2044, 2052, 2060, 2068, 2077, 2085, 2093, 2101, 2110, 2118, 2126, 2134, 2143, 2151, 2159,
2167, 2176, 2184, 2193, 2201, 2210, 2218, 2227, 2235, 2244, 2252, 2261, 2270, 2279, 2288, 2297,
2305, 2314, 2323, 2332, 2340, 2349, 2358, 2367, 2375, 2384, 2393, 2402, 2411, 2420, 2429, 2438,
2447, 2456, 2465, 2474, 2483, 2492, 2501, 2510, 2519, 2528, 2538, 2547, 2556, 2565, 2575, 2584,
2593, 2602, 2612, 2621, 2631, 2640, 2649, 2658, 2668, 2677, 2687, 2696, 2706, 2715, 2725, 2734,
2744, 2754, 2764, 2773, 2783, 2792, 2802, 2812, 2822, 2831, 2841, 2851, 2861, 2871, 2881, 2891,
2901, 2910, 2920, 2930, 2940, 2950, 2961, 2971, 2981, 2991, 3001, 3011, 3021, 3031, 3042, 3052,
3062, 3072, 3083, 3093, 3104, 3114, 3124, 3134, 3145, 3155, 3166, 3176, 3187, 3197, 3208, 3218,
3229, 3239, 3250, 3261, 3272, 3282, 3293, 3303, 3314, 3325, 3336, 3346, 3357, 3368, 3379, 3390,
3401, 3412, 3423, 3433, 3444, 3455, 3466, 3477, 3488, 3500, 3511, 3522, 3534, 3545, 3556, 3567,
3579, 3590, 3601, 3612, 3624, 3635, 3647, 3658, 3670, 3681, 3692, 3703, 3715, 3726, 3738, 3749,
3761, 3773, 3785, 3796, 3808, 3819, 3831, 3842, 3854, 3866, 3878, 3889, 3901, 3913, 3925, 3937,
3949, 3961, 3973, 3984, 3996, 4008, 4020, 4032, 4044, 4057, 4069, 4081, 4093, 4105, 4117, 4129,
4141, 4154, 4166, 4178, 4190, 4203, 4215, 4228, 4240, 4253, 4265, 4277, 4289, 4302, 4315, 4328,
4340, 4353, 4365, 4378, 4390, 4403, 4416, 4429, 4441, 4454, 4467, 4480, 4492, 4505, 4518, 4531,
4544, 4557, 4570, 4583, 4596, 4609, 4622, 4635, 4648, 4661, 4674, 4687, 4700, 4714, 4727, 4740,
4753, 4766, 4779, 4793, 4806, 4820, 4833, 4846, 4859, 4873, 4886, 4900, 4913, 4927, 4940, 4954,
4968, 4982, 4995, 5009, 5022, 5036, 5050, 5064, 5077, 5091, 5104, 5118, 5134, 5148, 5162, 5175,
5189, 5203, 5217, 5231, 5245, 5259, 5274, 5288, 5302, 5316, 5330, 5344, 5359, 5373, 5387, 5401,
5416, 5430, 5444, 5458, 5473, 5487, 5502, 5516, 5531, 5545, 5560, 5574, 5589, 5603, 5618, 5632,
5647, 5662, 5677, 5691, 5706, 5720, 5735, 5750, 5765, 5780, 5795, 5809, 5824, 5839, 5854, 5869,
5884, 5899, 5914, 5929, 5944, 5959, 5975, 5990, 6005, 6020, 6036, 6051, 6066, 6081, 6097, 6112,
6128, 6143, 6158, 6173, 6189, 6204, 6220, 6235, 6251, 6266, 6282, 6298, 6314, 6329, 6345, 6360,
6376, 6392, 6408, 6423, 6439, 6455, 6471, 6487, 6503, 6518, 6534, 6550, 6566, 6582, 6598, 6614,
6630, 6647, 6663, 6679, 6695, 6711, 6727, 6744, 6760, 6776, 6792, 6809, 6825, 6842, 6858, 6874,
6890, 6907, 6923, 6940, 6956, 6973, 6990, 7007, 7023, 7040, 7056, 7073, 7092, 7109, 7126, 7142,
7159, 7176, 7193, 7210, 7226, 7243, 7260, 7277, 7294, 7311, 7328, 7345, 7362, 7380, 7397, 7414,
7431, 7448, 7466, 7483, 7500, 7517, 7534, 7552, 7570, 7587, 7604, 7622, 7640, 7657, 7674, 7692,
7710, 7727, 7744, 7762, 7780, 7797, 7815, 7833, 7850, 7868, 7886, 7904, 7922, 7940, 7958, 7975,
7993, 8011, 8029, 8047, 8065, 8083, 8101, 8119, 8138, 8156, 8174, 8192,
];
//! Metal's tables of the padded `_sRGB` formats' writes, read from an Apple M4 under macOS 27.0.1
//! and an Apple M3 Max under macOS 26.7 (the M3's and the M4's files byte-identical):
//! `R10Unorm_X6_sRGB`'s first encode index of every code, and `RG10Unorm_X12_sRGB`'s code of every
//! linear write code. The runtime's clear values read them through `ExtendedRange::clear_texel`; a
//! shader's write takes the transfer by the device's `Pow` (`lower::arith::extended_range`).
/// The first encode index of every code of `R10Unorm_X6_sRGB` (`0` for code 0): Metal writes a
/// value `x` as the largest code `c` with `R10X6_SRGB_ENCODE_FIRST[c] <= i`, where `i` is `x`
+13 -1
View File
@@ -1827,7 +1827,19 @@ pub enum PrecisionNote {
/// Metal rounds `c / D` once), a fragment function's read and write of an 8-bit sRGB attachment
/// in the interlocked storage form or through its word view, and a snapshot read's decode of a
/// normalized code (`c` times the `f32` nearest `1 / D`, where Metal reads `c / D` correctly
/// rounded). Validation derives no tolerance from it.
/// rounded). So does every conversion of an extended-range, padded 10-bit or bfloat texel
/// (`lower::arith::extended_range`; `ArithPlan::converts` records it), on every device, no
/// Vulkan format holding them: a read `float(c - 384)` (a padded code's `float(c)`) times the
/// `f32` nearest `1 / 510` (`1 / 1023`), a write `RoundEven` of the clamped value's `f32`
/// product plus 384, an sRGB twin's colour the MSL transfer by the device's `Pow` on the
/// magnitude, a `half` result the device's narrowing, a bfloat NaN as it is (a write's kept a
/// NaN by its quiet bit), where Metal divides correctly rounded, rounds the exact product,
/// rounds a `half` with ties away from zero, converts the sRGB twins through its own tables,
/// makes a bfloat NaN `0x7fc00000` or `0x7fc0` and rounds a bfloat sample's `half` toward zero:
/// a linear value within one `f32` ulp of Metal's, a code within one, an sRGB twin's decoded
/// value within half a `2^-13` step of Metal's table (`R10Unorm_X6_sRGB`'s within 1.64 steps)
/// beyond the `Pow`'s bound, a `half` result within one `half` ulp. Validation derives no
/// tolerance from it.
DevicePackConversion,
/// A render pipeline whose color attachments the device draws in more than one group
/// (`GraphicsState::color_group`, the module docs of `pipeline::compile::color_group`): a
@@ -30,7 +30,6 @@ use crate::device::{Device, DeviceDescription, DevicePolicy};
use crate::error::Feature;
use crate::library::{FunctionConstantValues, Library};
use crate::lower::select::{LowerInputs, Plan};
use crate::metal::format::extended_srgb::{SRGB_DECODE_STEPS, SRGB_ENCODE_FIRST};
use crate::metal::format::ExtendedRange;
use crate::metal::{self, PixelFormat, TextureType};
use crate::pipeline::compile::{compile_bitcode, plan_bitcode, EntryRef};
@@ -285,62 +284,29 @@ fn written(form: ExtendedRange, n: u32) -> [u32; 4] {
}
}
/// `k / d` (`0 <= k <= d`, `d` even but `k / d` dyadic only when exact) correctly rounded to
/// `f32`.
fn ratio_f32(k: u64, d: u64) -> f32 {
if k == 0 {
return 0.0;
}
let (k, d) = (u128::from(k), u128::from(d));
let mut e = 0;
while k << e < d << 23 {
e += 1;
}
let n = k << e;
let (q, r) = (n / d, n % d);
let q = q + u128::from(2 * r > d || (2 * r == d && q % 2 == 1));
(q as f64 * 2f64.powi(-e)) as f32
}
/// Metal's value of code `c` of channel `channel` of `form` (red 0, alpha 3).
/// The device's value of code `c` of channel `channel` of linear `form` (red 0, alpha 3): the code
/// less 384 times the `f32` nearest `1 / 510` (`extended_range::decode`), a two-plane texel's
/// alpha byte times that of `1 / 255`. An `_sRGB` form's is the device's `Pow`'s, which the
/// interpreter does not model.
fn value(form: ExtendedRange, channel: usize, c: u32) -> f32 {
assert!(!form.srgb(), "{form:?}: the interpreter models no Pow");
if channel == 3 {
return match form {
ExtendedRange::Bgr10 { .. } => 1.0,
// The alpha byte, an 8-bit unorm code.
ExtendedRange::Planes { .. } => ratio_f32(u64::from(c), 255),
_ => ratio_f32(u64::from(c.clamp(384, 894) - 384), 510),
ExtendedRange::Planes { .. } => c as f32 * (1.0 / 255.0f32),
_ => (c.clamp(384, 894) - 384) as f32 * (1.0 / 510.0f32),
};
}
let n = c.abs_diff(384);
let m = if form.srgb() {
f32::from(SRGB_DECODE_STEPS[n as usize]) / 8192.0
} else {
ratio_f32(u64::from(n), 510)
};
if c < 384 {
-m
} else {
m
}
(c as i32 - 384) as f32 * (1.0 / 510.0f32)
}
/// `x` rounded to `half` with ties away from zero, Metal's rounding of an extended-range read
/// `x` narrowed to `half`, nearest even, the device's narrowing of an extended-range read
/// (`extended_range::decode`; every value here is a normal `half` or zero).
fn half_bits(x: f32) -> u16 {
let b = x.to_bits();
let sign = ((b >> 16) & 0x8000) as u16;
let a = b & 0x7fff_ffff;
if a == 0 {
return sign;
}
let exp = (a >> 23) as i32 - 127 + 15;
assert!(exp > 0 && exp < 31, "{x} is no normal half");
let mant = (a & 0x7f_ffff) | 0x80_0000;
let (q, r) = (mant >> 13, mant & 0x1fff);
let q = q + u32::from(r >= 0x1000);
let bits = ((exp as u32) << 10) + (q - 0x400);
sign | bits as u16
let h = crate::float16::f32_to_f16_bits(x);
assert!(h & 0x7c00 != 0 || h & 0x7fff == 0, "{x} is no normal half");
h
}
/// The image of slot `index` of `kind`'s texels.
@@ -432,8 +398,10 @@ fn texels_of(images: &[Image], index: u32) -> &[[u32; 4]] {
.texels
}
/// Every code of each format, read through a sampled and a storage slot with a `half` and a
/// `float` result, is Metal's value bit for bit; written back, it is Metal's raw texel.
/// Every code of each linear format, read through a sampled and a storage slot with a `half` and a
/// `float` result, is the device's product (`value`), narrowed to `half` to nearest even; written
/// back, it is Metal's raw texel. An `_sRGB` form's transfer takes the device's `Pow`, which the
/// interpreter does not model: its values are the device lanes'.
#[test]
fn reads_and_writes_of_every_code_are_metals() {
for source in [Source::Read, Source::ReadWrite] {
@@ -443,7 +411,7 @@ fn reads_and_writes_of_every_code_are_metals() {
return;
};
for (stem, p) in profiles() {
for form in FORMS {
for form in FORMS.into_iter().filter(|f| !f.srgb()) {
let what = format!("{what} {form:?} on {stem}");
let (plan, m) = typed_module_with(&bc, "k", &p, &inputs(form, source))
.unwrap_or_else(|e| panic!("{what}: {e}"));
@@ -493,8 +461,9 @@ fn reads_outside_the_texture_are_metals_zero() {
let Some(bc) = assemble("outside", &kernel(Source::Read, false, SIDE)) else {
return;
};
// An `_sRGB` form's decode takes the device's `Pow`, which the interpreter does not model.
for (stem, p) in profiles() {
for form in FORMS {
for form in FORMS.into_iter().filter(|f| !f.srgb()) {
let what = format!("{form:?} on {stem}");
let (plan, m) = typed_module_with(&bc, "k", &p, &inputs(form, Source::Read))
.unwrap_or_else(|e| panic!("{what}: {e}"));
@@ -522,9 +491,11 @@ fn bfloat_codes(n: u32) -> [u32; 4] {
}
/// Every texel of each bfloat form, read through a sampled and a storage slot with a `half` and
/// a `float` result, is Metal's value bit for bit, the channels a form lacks 0 and alpha 1
/// whatever the image's other components hold; written back, it is Metal's code of that value
/// (a `half` read's `half` widened): the code itself, a NaN `0x7fc0`. A read outside the texture
/// a `float` result, is its code shifted up 16 bits (a NaN code a NaN, as the device computes
/// it, where Metal reads `0x7fc00000`), a `half` result the device's narrowing of it (to nearest
/// even, a result below the smallest normal `half` its zero where the device's quantize flushes
/// it), the channels a form lacks 0 and alpha 1 whatever the image's other components hold;
/// written back, it is that value's top 16 bits (a NaN a NaN code). A read outside the texture
/// is Metal's zero texel, alpha 1 where the form has none.
#[test]
fn bfloat_reads_and_writes_are_metals() {
@@ -533,14 +504,10 @@ fn bfloat_reads_and_writes_are_metals() {
(ExtendedRange::Rg16Bfloat, 2),
(ExtendedRange::Rgba16Bfloat, 4),
];
let read = |c: u32| match c & 0x7FFF > 0x7F80 {
true => 0x7FC0_0000u32,
false => c << 16,
};
let write = |b: u32| match b & 0x7FFF_FFFF > 0x7F80_0000 {
true => 0x7FC0u32,
false => b >> 16,
};
let read = |c: u32| c << 16;
let nan32 = |b: u32| b & 0x7FFF_FFFF > 0x7F80_0000;
let nan16 = |h: u32| h & 0x7FFF > 0x7C00;
let bfloat_nan = |c: u32| c & 0x7FFF > 0x7F80;
let one = 1.0f32.to_bits();
for source in [Source::Read, Source::ReadWrite] {
for half in [false, true] {
@@ -578,20 +545,34 @@ fn bfloat_reads_and_writes_are_metals() {
(false, _) => 0,
};
let h = crate::float16::f32_to_f16_bits(f32::from_bits(v));
let want = match half {
true => u32::from(h),
false => v,
};
let got = lane(&out, half, n, c);
assert_eq!(got, want, "{what}: texel {n} channel {c}");
let held = match (half, nan32(v)) {
(_, true) => {
let nan = if half { nan16(got) } else { nan32(got) };
assert!(nan, "{what}: texel {n} channel {c}: {got:#x}");
if c < ch {
let w = target[at][c];
assert!(bfloat_nan(w), "{what}: texel {n} {c}: {w:#x}");
}
continue;
}
(true, false) => {
// The device's quantize may flush a `half` denormal.
let flushed = u32::from(h & 0x8000);
let ok =
got == u32::from(h) || (h & 0x7C00 == 0 && got == flushed);
assert!(ok, "{what}: texel {n} channel {c}: {got:#x}");
crate::float16::f16_bits_to_f32(got as u16).to_bits()
}
(false, false) => {
assert_eq!(got, v, "{what}: texel {n} channel {c}");
v
}
};
if c < ch {
let held = match half {
true => crate::float16::f16_bits_to_f32(h).to_bits(),
false => v,
};
assert_eq!(
target[at][c],
write(held),
held >> 16,
"{what}: texel {n} channel {c} written"
);
}
@@ -799,24 +780,6 @@ fn half_value(bits: u16) -> f32 {
(sign * magnitude) as f32
}
/// `x` (not a NaN) rounded toward zero to `half`: a finite value past 65504 is 65504.
fn half_toward_zero(x: f32) -> u16 {
let sign = if x.is_sign_negative() { 0x8000u16 } else { 0 };
let a = x.abs();
if a.is_infinite() {
return sign | 0x7c00;
}
if a >= 65504.0 {
return sign | 0x7bff;
}
if a < 2f32.powi(-14) {
return sign | (a * 2f32.powi(24)).floor() as u16;
}
let bits = a.to_bits();
let exponent = ((bits >> 23) & 0xff) as u16 - (127 - 15);
sign | (exponent << 10) | ((bits >> 13) & 0x3ff) as u16
}
fn devices() -> Vec<(String, Device)> {
let dir = std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
.join("../metal2vulkan-validation/profiles");
@@ -1079,19 +1042,6 @@ fn a_swizzled_extended_texture_joins_the_variant_at_a_sampled_slot() {
assert!(planned > 0);
}
/// The sRGB tables are Metal's: each offset's decode step encodes back to it, so a texel read
/// and written back keeps its codes (`reads_and_writes_of_every_code_are_metals` relies on it).
#[test]
fn every_srgb_step_encodes_to_its_own_offset() {
for (n, &step) in SRGB_DECODE_STEPS.iter().enumerate() {
let back = SRGB_ENCODE_FIRST
.iter()
.rposition(|&first| first <= step)
.expect("offset");
assert_eq!(back, n, "offset {n} step {step}");
}
}
/// A storage slot of `YCbCrWrite`, a 4:4:4 two-plane YCbCr texture's write shadow, stores each
/// texel the kernel writes as its red, green and blue bits and the mark 1 in an
/// `R32G32B32A32_UINT` image, which the encode kernel reads (`bind::ycbcr_write`); the module
@@ -114,31 +114,16 @@ fn two_plane_samples_are_metals() {
replay(550);
}
#[test]
fn two_plane_srgb_samples_are_metals() {
replay(551);
}
#[test]
fn bgra10_samples_are_metals() {
replay(552);
}
#[test]
fn bgra10_srgb_samples_are_metals() {
replay(553);
}
#[test]
fn bgr10_samples_are_metals() {
replay(554);
}
#[test]
fn bgr10_srgb_samples_are_metals() {
replay(555);
}
/// A padded or bfloat form's bicubic sample, a swizzled texture's, and a gather through a bicubic
/// sampler are refused, `NotImplemented(SamplerBicubicFilter)`, but a two-plane form's gather, which
/// is refused under any sampler, `NotImplemented(Format)`; each compiles without the slot's
@@ -413,6 +413,10 @@ fn level_samples_are_metals_bytes() {
let mut checked = 0;
for (key, group) in &groups {
let r0 = group[0];
// An `_sRGB` form's decode takes the device's `Pow`, which the interpreter does not model.
if r0.form.srgb() {
continue;
}
let seed = match (r0.gather, r0.clamp.is_some()) {
(false, false) => 7,
(true, false) => 9,
@@ -470,7 +474,12 @@ fn level_samples_are_metals_bytes() {
r.point,
r.bits
),
false => assert_eq!(lanes, r.bits, "{what}: point {:?}", r.point),
false => assert!(
super::samples::near_metals(&lanes, &r.bits),
"{what}: point {:?}: {lanes:x?}, Metal's {:x?}",
r.point,
r.bits
),
}
checked += 1;
}
@@ -24,6 +24,7 @@
use super::*;
use crate::bind::{BoundSampler, SamplerDescriptor};
use crate::error::Unsupported;
use crate::metal::format::extended_srgb::SRGB_DECODE_STEPS;
use crate::metal::sampler::SamplerWord;
use crate::metal::{SamplerAddressMode, SamplerBorderColor, SamplerMinMagFilter};
@@ -46,6 +47,25 @@ fn metal_linear() -> String {
}
pub(super) use metal2vulkan_devtools::xr_bicubic::filtered_close;
/// Whether lane `got` (bits; `half` bits where `half`) is the device's answer for `want`: a NaN
/// for a NaN (its bits the device's), a `half` denormal or its signed zero (a device's quantize
/// may flush it), else `want` itself.
fn native_lane(got: u32, want: u32, half: bool) -> bool {
match half {
false if f32::from_bits(want).is_nan() => f32::from_bits(got).is_nan(),
false => got == want,
true if want & 0x7FFF > 0x7C00 => got & 0x7FFF > 0x7C00,
true if want & 0x7C00 == 0 => got == want || got == want & 0x8000,
true => got == want,
}
}
/// Whether the lanes `got` (bits) lie within `DevicePackConversion`'s bound of Metal's `want`:
/// each at most two units in the last place apart (a decode's product one `f32` ulp from Metal's
/// quotient, or a `half` narrowed from it, carried through a filter's sum).
pub(super) fn near_metals(got: &[u32], want: &[u32]) -> bool {
got.len() == want.len() && got.iter().zip(want).all(|(&g, &w)| g.abs_diff(w) <= 2)
}
/// The format of a raw format number of [`metal_linear`].
pub(super) fn form_of(raw: &str) -> ExtendedRange {
@@ -346,7 +366,9 @@ fn linear_samples_are_metals_bytes() {
let Some(bc) = assemble("metal", &sample_kernel(through, half, (0, 0), false)) else {
return;
};
for raw in ["550", "551", "552", "553", "554", "555"] {
// The `_sRGB` twins' (551, 553, 555) taps take the device's `Pow`, which the
// interpreter does not model: their samples are the device lanes'.
for raw in ["550", "552", "554"] {
let form = form_of(raw);
let kind = if half { "h" } else { "f" };
let rows: Vec<Vec<&str>> = metal
@@ -707,9 +729,11 @@ fn models(runtime: bool) {
true,
),
];
// Each form's texels: a two-plane texel's alpha code is a byte.
// Each form's texels: a two-plane texel's alpha code is a byte. An `_sRGB` form's decode takes
// the device's `Pow`, which the interpreter does not model.
let texels: Vec<(ExtendedRange, Vec<[u32; 4]>)> = FORMS
.into_iter()
.filter(|f| !f.srgb())
.map(|form| {
let codes = codes
.iter()
@@ -841,10 +865,11 @@ fn unbuilt_samples_are_refused() {
/// each address mode and border color, a constant offset, and pixel coordinates, through a
/// constexpr and a runtime sampler, with `float` and `half` results, at 96 positions each around
/// and past the edges: a sample is the nearest texel under either filter, its `float` the code
/// shifted up 16 (a NaN code the quiet NaN, a channel the format lacks 0 and alpha 1) and its
/// `half` that rounded toward zero, saturating at 65504; a gather reads the red of the linear
/// footprint's four taps in Vulkan's order `(x0, y1)`, `(x1, y1)`, `(x1, y0)`, `(x0, y0)`, its
/// `half` rounded to nearest even; a tap outside a border axis reads the border color through
/// shifted up 16 (a NaN code a NaN as the device computes it, where Metal reads the quiet NaN; a
/// channel the format lacks 0 and alpha 1) and its `half` the device's narrowing of it (where
/// Metal rounds a sample's toward zero); a gather reads the red of the linear footprint's four
/// taps in Vulkan's order `(x0, y1)`, `(x1, y1)`, `(x1, y0)`, `(x0, y0)`, its `half` the device's
/// narrowing too; a tap outside a border axis reads the border color through
/// the format's channels.
#[test]
fn bfloat_samples_read_the_nearest_texel() {
@@ -951,10 +976,7 @@ fn bfloat_samples_read_the_nearest_texel() {
(ExtendedRange::Rg16Bfloat, 2),
(ExtendedRange::Rgba16Bfloat, 4),
];
let read = |c: u32| match c & 0x7FFF > 0x7F80 {
true => 0x7FC0_0000u32,
false => c << 16,
};
let read = |c: u32| c << 16;
// Lane `c` of texel `(x, y)`, or of the border texel of color `b` where it is `None`.
let texel = |ch: usize, at: Option<(i64, i64)>, b: u32, c: usize| -> u32 {
match (at, c < ch) {
@@ -969,14 +991,10 @@ fn bfloat_samples_read_the_nearest_texel() {
},
}
};
// A gather's `half` rounds to nearest even, a sample's toward zero.
let bits = |v: u32, half: bool, gather: bool| {
let x = f32::from_bits(v);
match (half, gather || x.is_nan()) {
(false, _) => v,
(true, true) => u32::from(crate::float16::f32_to_f16_bits(x)),
(true, false) => u32::from(super::half_toward_zero(x)),
}
// A gather's and a sample's `half` alike: the device's narrowing, to nearest even.
let bits = |v: u32, half: bool, _gather: bool| match half {
false => v,
true => u32::from(crate::float16::f32_to_f16_bits(f32::from_bits(v))),
};
for runtime in [false, true] {
for (mode, border, offset, constexpr, (rm, rb), pixel) in states {
@@ -1037,7 +1055,8 @@ fn bfloat_samples_read_the_nearest_texel() {
})
}
};
assert_eq!(g, want, "{what}: q ({qx}, {qy})");
let ok = g.iter().zip(want).all(|(&g, w)| native_lane(g, w, half));
assert!(ok, "{what}: q ({qx}, {qy}): {g:x?}, {want:x?}");
}
}
}
@@ -1066,14 +1085,13 @@ fn swizzled_samples_and_gathers_are_the_unswizzled_swizzled() {
C::new(S::Blue, S::Green, S::Red, S::Alpha),
C::new(S::Green, S::Green, S::Green, S::Green),
];
// The `_sRGB` forms' decode takes the device's `Pow`, which the interpreter does not model
// (`RG10Unorm_X12_sRGB` reads its codes linearly).
let forms = [
ExtendedRange::Bgr10 { srgb: false },
ExtendedRange::Bgr10 { srgb: true },
ExtendedRange::Bgra10 { srgb: false },
ExtendedRange::Bgra10 { srgb: true },
ExtendedRange::Planes { srgb: false },
ExtendedRange::R10X6,
ExtendedRange::R10X6Srgb,
ExtendedRange::Rg10X12,
ExtendedRange::Rg10X12Srgb,
ExtendedRange::R16Bfloat,
@@ -1240,11 +1258,11 @@ fn padded_samples_are_metals_bytes() {
}
/// Each of Metal's samples in `padded_srgb_samples.tsv` (an Apple M4 under macOS 27.0.1,
/// byte-identical on an Apple M3 Max under macOS 26.7) is Metal's bytes, as
/// [`padded_samples_are_metals_bytes`] replays them: `R10Unorm_X6_sRGB` (its taps its decode
/// steps, its linear filter a YCbCr field's on the grid `8192`) and `RG10Unorm_X12_sRGB` (its
/// reads and filter `RG10Unorm_X12`'s) under every address mode and border color, nearest and
/// linear, normalized and pixel coordinates.
/// byte-identical on an Apple M3 Max under macOS 26.7) is within `DevicePackConversion`'s bound of
/// Metal's bytes, as [`padded_samples_are_metals_bytes`] replays them: `RG10Unorm_X12_sRGB`'s
/// (its reads and filter `RG10Unorm_X12`'s) under every address mode and border color, nearest
/// and linear, normalized and pixel coordinates. `R10Unorm_X6_sRGB`'s decode takes the device's
/// `Pow`, which the interpreter does not model.
#[test]
fn padded_srgb_samples_are_metals_bytes() {
replay_padded_samples("padded_srgb_samples.tsv");
@@ -1278,6 +1296,11 @@ fn replay_padded_samples(name: &str) {
assert!(groups.len() >= 8, "{:?}", groups.keys());
let mut checked = 0;
for ((raw, filter, mode, space), rows) in &groups {
// `R10Unorm_X6_sRGB`'s decode takes the device's `Pow`, which the interpreter does not
// model: its samples are the device lanes'.
if raw == "577" {
continue;
}
let (form, ch) = match raw.as_str() {
"576" => (ExtendedRange::R10X6, 1),
"578" => (ExtendedRange::Rg10X12, 2),
@@ -119,7 +119,9 @@ fn clear_texels_are_the_kernel_writes_of_their_halves() {
return;
};
let (stem, p) = profiles().into_iter().next().expect("profile");
for form in FORMS {
// An `_sRGB` form's write takes the device's `Pow`, which the interpreter does not model (and
// its clear texel keeps Metal's table: the two may be a code apart).
for form in FORMS.into_iter().filter(|f| !f.srgb()) {
let mut inputs = LowerInputs::new();
inputs.extended_range.insert(TARGET, form);
inputs.storage_images.insert(
@@ -130,6 +130,10 @@ fn volume_samples_are_metals_bytes() {
let mut checked = 0;
for (key, group) in &groups {
let r0 = group[0];
// An `_sRGB` form's decode takes the device's `Pow`, which the interpreter does not model.
if r0.form.srgb() {
continue;
}
let seed = match r0.mode {
SamplerAddressMode::ClampToEdge => 7,
_ => 17,
@@ -169,7 +173,12 @@ fn volume_samples_are_metals_bytes() {
r.point,
r.bits
),
false => assert_eq!(lanes.to_vec(), r.bits, "{what}: point {:?}", r.point),
false => assert!(
super::samples::near_metals(&lanes, &r.bits),
"{what}: point {:?}: {lanes:x?}, Metal's {:x?}",
r.point,
r.bits
),
}
checked += 1;
}
+13 -1
View File
@@ -3308,7 +3308,19 @@ bound.
serve an implicit imageblock access of a normalized attachment (a `half` load rounding the
unpacked `float` once more), a fragment function's read and write of an 8-bit sRGB attachment
in the interlocked storage form or through its word view, and a snapshot read's decode of a
normalized code (`c` times the `f32` nearest `1 / D`), noted alike.
normalized code (`c` times the `f32` nearest `1 / D`), noted alike. So does every conversion of
an extended-range, padded 10-bit or bfloat texel (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`,
`R10Unorm_X6`, `RG10Unorm_X12`, their sRGB twins, `RGB10A2Unorm_sRGB`, `R16Bfloat`, `RG16Bfloat`,
`RGBA16Bfloat`), which no Vulkan format holds: a read is `float(c - 384)` (a padded code `c`)
times the `f32` nearest `1 / 510` (`1 / 1023`), a write `RoundEven` of the clamped value's `f32`
product plus 384, an sRGB twin's colour the MSL transfer by the device's `Pow` on the magnitude,
a `half` result the device's narrowing, a bfloat code's NaN as it is (a write's kept a NaN by
its quiet bit). Metal divides correctly rounded, rounds the exact product, rounds a `half` with
ties away from zero, converts the sRGB twins through its own tables, makes a bfloat NaN
`0x7fc00000` or `0x7fc0`, and rounds a bfloat sample's `half` toward zero: a linear value within
one `f32` ulp, a code within one, an sRGB twin's decoded value within half a `2^-13` step of
Metal's table (`R10Unorm_X6_sRGB`'s 1.64 steps) beyond the `Pow`'s bound, a `half` result within
one `half` ulp.
- `metal2vulkan-degrade-color-attachment-groups` (precision).
`PrecisionNote::ColorAttachmentGroups`: A render pipeline whose color attachments the device
draws in more than one group (more than the lesser of its `maxColorAttachments` and
+240 -43
View File
@@ -44,7 +44,7 @@ Its limits, measured rather than asserted:
| committed recordings | 1122 |
| distinct SDK items the Metal leg reaches, of any status | 800 |
| of those, reached only where this cannot name the family | 2 |
| ledger rows (a case whose gap is recorded) | 1130 |
| ledger rows (a case whose gap is recorded) | 1327 |
| declared crossings of the option space (pairs put to Metal at once) | 26 |
| declared crossings that are no pair of it (a boolean or numeric field, or one type in two slots) | 30 |
@@ -3268,42 +3268,235 @@ A case whose difference from Metal is recorded rather than compared away. The le
| `texture-fills-81` | Metal's plain colour fill (`fillTexture:...color:` with no pixel format; the case's c0, c4, c5 and c7) packs the colour by its fill's own rules, a tie rounded h… |
| `texture-fills-110` | Metal's plain colour fill (`fillTexture:...color:` with no pixel format; the case's c0, c4, c5 and c7) packs the colour by its fill's own rules, a tie rounded h… |
| `texture-fills-115` | Metal's plain colour fill (`fillTexture:...color:` with no pixel format; the case's c0, c4, c5 and c7) packs the colour by its fill's own rules, a tie rounded h… |
| `xr-blend-bgr10xr-add` | A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in th… |
| `xr-blend-bgr10xr-premul` | A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, in… |
| `xr-blend-bgr10xr-srgb-add` | A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in th… |
| `xr-blend-bgr10xr-srgb-premul` | A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, in… |
| `xr-blend-bgra10xr-add` | A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in th… |
| `xr-blend-bgra10xr-premul` | A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, in… |
| `xr-blend-bgra10xr-srgb-add` | A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in th… |
| `xr-blend-bgra10xr-srgb-premul` | A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, in… |
| `xr-blend-planes-add` | A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in th… |
| `xr-blend-planes-add` | A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in th… |
| `xr-blend-planes-premul` | A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, in… |
| `xr-blend-planes-premul` | A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, in… |
| `xr-blend-planes-srgb-add` | A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in th… |
| `xr-blend-planes-srgb-add` | A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in th… |
| `xr-blend-planes-srgb-premul` | A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, in… |
| `xr-blend-planes-srgb-premul` | A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, in… |
| `extended-swizzles-bgr10xr` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12-srgb` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12-srgb` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12-srgb` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12-srgb` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12-srgb` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `xr-planes-bgr10xr-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-planes-bgr10xr-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-planes-bgr10xr-srgb-bgra10xr` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-planes-bgr10xr-srgb-bgra10xr` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-two-planes-rgb10a8-2p-xr10` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-two-planes-rgb10a8-2p-xr10` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-two-planes-rgb10a8-2p-xr10` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-two-planes-rgb10a8-2p-xr10` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-two-planes-rgb10a8-2p-xr10` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-two-planes-rgb10a8-2p-xr10` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-two-planes-rgb10a8-2p-xr10` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-two-planes-rgb10a8-2p-xr10-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-two-planes-rgb10a8-2p-xr10-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-two-planes-rgb10a8-2p-xr10-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-two-planes-rgb10a8-2p-xr10-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-two-planes-rgb10a8-2p-xr10-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-two-planes-rgb10a8-2p-xr10-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-two-planes-rgb10a8-2p-xr10-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-two-planes-rgb10a8-2p-xr10-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-two-planes-rgb10a8-2p-xr10-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-two-planes-rgb10a8-2p-xr10-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-two-planes-rgb10a8-2p-xr10-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-two-planes-rgb10a8-2p-xr10-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-two-plane-samples-p2-nc-f` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-two-plane-samples-p2-nr-f` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-two-plane-samples-p2s-nc-f` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-two-plane-samples-p2s-nc-h` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-two-plane-samples-p2s-nr-f` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-two-plane-samples-p2s-nr-h` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `rgb10a2-srgb-reads` | `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfe… |
| `rgb10a2-srgb-writes` | `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfe… |
| `rgb10a2-srgb-samples-nearest-f` | `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfe… |
| `rgb10a2-srgb-samples-nearest-f` | `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfe… |
| `rgb10a2-srgb-samples-nearest-h` | `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfe… |
| `rgb10a2-srgb-samples-nearest-h` | `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfe… |
| `rgb10a2-srgb-stores-f` | `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfe… |
| `rgb10a2-srgb-stores-h` | `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfe… |
| `xr-draw-bgra10xr-srgb-half` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-draw-bgra10xr-srgb-float` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-draw-bgr10xr-srgb-half` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-draw-bgr10xr-srgb-float` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-draw-planes-half` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-draw-planes-float` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-draw-planes-srgb-half` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-draw-planes-srgb-float` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-clears-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-clears-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-clears-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-clears-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-clears-planes` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-clears-planes-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-blend-bgra10xr-srgb-one-zero` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-blend-bgr10xr-srgb-one-zero` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-blend-planes-one-zero` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `xr-blend-planes-srgb-one-zero` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `xr-blend-planes-srgb-one-zero` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgra10xr` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgra10xr` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgra10xr` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgra10xr` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgra10xr` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgra10xr-srgb` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range texel read, written or blended over (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`): the function decodes a code `c` as `float(c - 384)` times th… |
| `extended-swizzles-bgr10xr` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range sRGB twin's colour read, written or blended over (`BGR10_XR_sRGB`, `BGRA10_XR_sRGB`, `RGB10A8_2P_XR10_sRGB`): the function decodes and encodes… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-bgr10xr-srgb` | An extended-range format's linear sample (`sl`) blends its four decoded taps by the device's `FMix` at the `f32` fractions (crates/metal2vulkan/src/lower/sample… |
| `extended-swizzles-r10unormx6` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-r10unormx6` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-r10unormx6` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-r10unormx6` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-r10unormx6` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-r10unormx6` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-r10unormx6` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-r10unormx6` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-r10unormx6` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-r10unormx6` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-r10unormx6` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-r10unormx6` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-r10unormx6-srgb` | `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Po… |
| `extended-swizzles-r10unormx6-srgb` | `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Po… |
| `extended-swizzles-r10unormx6-srgb` | `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Po… |
| `extended-swizzles-r10unormx6-srgb` | `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Po… |
| `extended-swizzles-r10unormx6-srgb` | `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Po… |
| `extended-swizzles-r10unormx6-srgb` | `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Po… |
| `extended-swizzles-r10unormx6-srgb` | `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Po… |
| `extended-swizzles-r10unormx6-srgb` | `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Po… |
| `extended-swizzles-r10unormx6-srgb` | `R10Unorm_X6_sRGB`'s red read or sampled: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfer by the device's `Po… |
| `extended-swizzles-r10unormx6-srgb` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-r10unormx6-srgb` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-r10unormx6-srgb` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit texel read or sampled (`R10Unorm_X6`, `RG10Unorm_X12`): the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023`, where Metal a… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rgba16bfloat` | A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, … |
| `extended-swizzles-rgba16bfloat` | A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, … |
| `extended-swizzles-rgba16bfloat` | A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, … |
| `extended-swizzles-rgba16bfloat` | A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, … |
| `extended-swizzles-rgba16bfloat` | A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, … |
| `extended-swizzles-rgba16bfloat` | A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, … |
| `extended-swizzles-rgba16bfloat` | A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, … |
| `extended-swizzles-rgba16bfloat` | A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, … |
| `extended-swizzles-rgba16bfloat` | A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, … |
| `extended-swizzles-rgba16bfloat` | A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, … |
| `extended-swizzles-rgba16bfloat` | A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, … |
| `extended-swizzles-rgba16bfloat` | A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, … |
| `extended-swizzles-rgba16bfloat` | A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, … |
| `extended-swizzles-rgba16bfloat` | A bfloat texel's NaN code read, sampled or gathered (`RGBA16Bfloat`): the function shifts the code up 16 bits and keeps the NaN as it is, its sign and payload, … |
| `xr-two-plane-samples-p2-lc-f` | A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` frac… |
| `xr-two-plane-samples-p2-lc-f` | A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` frac… |
| `xr-two-plane-samples-p2-lc-h` | A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` frac… |
@@ -3316,20 +3509,24 @@ A case whose difference from Metal is recorded rather than compared away. The le
| `xr-two-plane-samples-p2s-lc-h` | A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` frac… |
| `xr-two-plane-samples-p2s-lr-f` | A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` frac… |
| `xr-two-plane-samples-p2s-lr-h` | A linear sample of a two-plane extended-range texture (`RGB10A8_2P_XR10` or its sRGB twin) blends its four decoded taps by the device's `FMix` at the `f32` frac… |
| `extended-swizzles-r10unormx6` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-r10unormx6` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-r10unormx6` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-r10unormx6-srgb` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-r10unormx6-srgb` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-r10unormx6-srgb` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12-srgb` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12-srgb` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12-srgb` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12-srgb` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `extended-swizzles-rg10unormx12-srgb` | A padded 10-bit format's linear sample (`sl`: `R10Unorm_X6`, `RG10Unorm_X12` and their sRGB twins, filtered in the module) blends its four decoded taps by the d… |
| `xr-blend-bgra10xr-add` | A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in th… |
| `xr-blend-bgra10xr-premul` | A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, in… |
| `xr-blend-bgr10xr-add` | A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in th… |
| `xr-blend-bgr10xr-premul` | A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, in… |
| `rgb10a2-srgb-samples-linear-f` | `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfe… |
| `rgb10a2-srgb-samples-linear-f` | `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfe… |
| `rgb10a2-srgb-samples-linear-h` | `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfe… |
| `rgb10a2-srgb-samples-linear-h` | `RGB10A2Unorm_sRGB`'s colour read, sampled, written or stored: the function decodes a code `c` as `c` times the `f32` nearest `1 / 1023` through the MSL transfe… |
| `xr-blend-bgra10xr-srgb-add` | A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in th… |
| `xr-blend-bgra10xr-srgb-premul` | A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, in… |
| `xr-blend-bgr10xr-srgb-add` | A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in th… |
| `xr-blend-bgr10xr-srgb-premul` | A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, in… |
| `xr-blend-planes-add` | A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in th… |
| `xr-blend-planes-add` | A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in th… |
| `xr-blend-planes-premul` | A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, in… |
| `xr-blend-planes-premul` | A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, in… |
| `xr-blend-planes-srgb-add` | A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in th… |
| `xr-blend-planes-srgb-add` | A `half4` fill blended into an extended-range attachment (one over the destination, added): the function blends in the shader, inside the pixel interlock, in th… |
| `xr-blend-planes-srgb-premul` | A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, in… |
| `xr-blend-planes-srgb-premul` | A `half4` fill blended into an extended-range attachment (premultiplied over: one over one minus the source alpha, added): the function blends in the shader, in… |
+1 -1
View File
@@ -56,7 +56,7 @@ known. The rest of the differences are docs/API.md section 9's precision notes.
| `dot`, `mix` and `fast::sqrt` are the device's `OpDot`, `FMix` and `Sqrt` on every device, not Metal's fused chain, its two fused multiply-adds and `x · rsqrt(x)`: a `float` one on MoltenVK reaches Metal's own `dot`, `mix` and `fast::sqrt`, a `half` one is the instruction on its `float` container, rounded once; a `dot` of other than two to four lanes sums the `OpDot` of each chunk of up to four lanes. | The device's order is the contract. | `float` `dot` of n lanes within (3n − 1)·2^-24·Σ\|aᵢbᵢ\|, `mix` within 2^-21 of its two terms, `fast::sqrt` 4.5 ulp. `NativeDot` (`native-dot`), `NativeMix` (`native-mix`), `NativeTranscendentals` (`native-transcendentals`); a `dot` of other than two to four lanes within Vulkan's precision of its chunks' `OpDot` and sum, `DeviceArithmetic` (`device-arithmetic`) |
| A filter emulated by fetches sums its taps in the device's arithmetic on every device: Metal's bicubic filter on every format (the Catmull-Rom weights computed in `f32` from the fraction, the sixteen taps summed by the device's multiply and add, a 32-bit float format's or a level under four texels' bilinear filter by its `FMix`), and an extended-range texture's linear, 3D and linear-mip-filter samples (`FMix` of the decoded taps at the `f32` fractions); a `half` result is the device's narrowing. Metal's fixed-point weight table, its exact grid sums rounded half up, its float accumulators and its sixty-fourth level fractions are not reproduced. The footprint, the addressing, the filter each format selects, the level and the format's clamp stay Metal's. | The device's arithmetic is the contract (rule 1); the device has no cubic filter on any committed profile (`VK_EXT_filter_cubic`), and no format holds the extended-range codes. | A few grid steps (`1/4080` at 8 bits), up to `2.1e-3` on an extended-range sRGB bicubic sample (`xr_bicubic::WEIGHTS_BOUND`), up to `1/64` of the levels' difference under a linear mip filter. `BicubicFilterArithmetic` (`bicubic-filter-arithmetic`) |
| Fast-math sums, differences and products group, and a multiply contracts into an addition, as the device's compiler groups and fuses them, on every device, MoltenVK included: each operation is emitted in the AIR's order, one carrying both `contract` and `reassoc` undecorated and any other `NoContraction`. Metal's compiler takes its own grouping (its rank order of a sum's leaves, its pairing of a product's lane-uniform factors) and its own fusion pairs. | The device's grouping is the contract: what the AIR's flags allow, the device's compiler chooses; nothing reproduces Metal's choice. | Unbounded relative to the result where a sum of mixed signs is grouped otherwise, or a multiply-add is fused on one side alone; each operation kept apart is exact as written. `FastMathRewrites` (`fast-math-rewrites`) |
| `air.pack` and `air.unpack` of a normalized format are the device's conversion: `GLSL.std.450`'s `Pack`/`Unpack` `Unorm4x8`, `Snorm4x8`, `Unorm2x16` and `Snorm2x16`, and for `rgb10a2` and `rgb565` their definition by the device's `NClamp`, multiply, `RoundEven` (a pack) and multiply by the reciprocal (an unpack); `unorm4x8_srgb`'s colour is the MSL transfer functions by the device's `Pow` around the 8-bit instruction, as is an 8-bit sRGB storage texture's write through its UNORM alias. A `float` one of the four named formats on MoltenVK reaches Metal's own. The same conversions serve an implicit imageblock access of a normalized attachment (a `half` load rounding the unpacked `float` once more), the interlocked storage form's 8-bit sRGB attachment and sRGB word, and a snapshot's normalized codes (`c` times the `f32` nearest `1/D`). | The device's conversion is the contract. | A packed code within one of Metal's, apart only where `clamp(c)·scale` lies within its rounding of a half-integer (`Round`'s tie is the device's); an unpacked value within 2.5 ulp of the correctly rounded quotient; a decoded sRGB colour within half a twelve-bit step (`1/8190`) of Metal's table step `k/4095`, beyond its `Pow`'s bound; a NaN channel's code the device's (Metal's: 0). `DevicePackConversion` (`device-pack-conversion`) |
| `air.pack` and `air.unpack` of a normalized format are the device's conversion: `GLSL.std.450`'s `Pack`/`Unpack` `Unorm4x8`, `Snorm4x8`, `Unorm2x16` and `Snorm2x16`, and for `rgb10a2` and `rgb565` their definition by the device's `NClamp`, multiply, `RoundEven` (a pack) and multiply by the reciprocal (an unpack); `unorm4x8_srgb`'s colour is the MSL transfer functions by the device's `Pow` around the 8-bit instruction, as is an 8-bit sRGB storage texture's write through its UNORM alias. A `float` one of the four named formats on MoltenVK reaches Metal's own. The same conversions serve an implicit imageblock access of a normalized attachment (a `half` load rounding the unpacked `float` once more), the interlocked storage form's 8-bit sRGB attachment and sRGB word, and a snapshot's normalized codes (`c` times the `f32` nearest `1/D`). So does every conversion of an extended-range, padded 10-bit or bfloat texel, which no Vulkan format holds (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10`, `R10Unorm_X6`, `RG10Unorm_X12`, their sRGB twins, `RGB10A2Unorm_sRGB`, the bfloat formats; every device): a read `float(c - 384)` (a padded code's `float(c)`) times the `f32` nearest `1/510` (`1/1023`), a write `RoundEven` of the clamped value's `f32` product plus 384, an sRGB twin's colour the MSL transfer by the device's `Pow` on the magnitude, a `half` result the device's narrowing, a bfloat NaN as it is. | The device's conversion is the contract. | A packed code within one of Metal's, apart only where `clamp(c)·scale` lies within its rounding of a half-integer (`Round`'s tie is the device's); an unpacked value within 2.5 ulp of the correctly rounded quotient; a decoded sRGB colour within half a twelve-bit step (`1/8190`) of Metal's table step `k/4095`, beyond its `Pow`'s bound; a NaN channel's code the device's (Metal's: 0). An extended-range or padded value within one `f32` ulp of Metal's quotient, a code within one of Metal's exact product, an sRGB twin's decoded value within half a `2^-13` step of Metal's table (`R10Unorm_X6_sRGB`'s 1.64 steps) and its code within one, a `half` result within one `half` ulp (Metal rounds ties away from zero, a bfloat sample's `half` toward zero), a bfloat NaN the device's (Metal's: `0x7fc00000`, a write `0x7fc0`). `DevicePackConversion` (`device-pack-conversion`) |
| Off MoltenVK a `float` multiply, a fused multiply-add by `OpFmaKHR`, and a `float` `ldexp` (whose result below `2^-126` is that multiply's product) round before Metal's flush: Metal flushes a result whose exact value lies below `2^-126` before rounding it, so a result whose exact value lies within half a unit below `2^-126` answers `2^-126` of its sign where Metal answers the zero of its sign. | Every device measured off MoltenVK (RADV, ANV, NVIDIA, lavapipe) rounds first; its multiply is the contract. | Announced once per device as it is made: `float-tininess-after-rounding` |
| `f32` denormals in a `float` operation on a device not measured to read them as Metal does (`DriverDeviation::MetalFloatDenormals`: lavapipe, and every unmeasured device), in `floor`, `ceil` and `fneg` on every device, in the maths functions (`fabs`, `sign` and `fract` among them, and the zero and sign tests of `pow`, `powr` and `atan2`) and the device's order of the rows above, and in a conversion to or from `double`. Metal reads them as zero and flushes a denormal result. | The device's reading is the contract: Vulkan lets each device keep or flush them, and Metal runs no `double`, so its reading of a conversion is not measured. | `DeviceDenormals` (`device-denormals`) |
| Samples, gathers, depth comparisons and level queries are the device's own sampler's on every device whose sampler is not Metal's (every device but MoltenVK): its filter, footprint, level, anisotropy, sRGB decode and comparison, its level clamp (the descriptor's as given, which Metal holds on a `1/64` grid) and its reading of a subnormal coordinate (which Metal reads as the zero of its sign before addressing). A sample's or gather's residency on a device with `shaderResourceResidency` is the device's `OpImageSparse*` word and non-resident value (`SparseResidency`); Metal's footprint rule answers it only where the device has no residency and the slot's tile map does. A two-plane YCbCr texture's linear sample is the device's filter of its texels (the device's own Y′CbCr conversion's where it converts the format, next row; Metal's reads exactly elsewhere); where the device's memory is the host's, a sample that reads the planes in place is Metal's filter exactly. An 8-bit sRGB format the device cannot sample (`R8_SRGB` on lavapipe, `R8G8_SRGB` on lavapipe, ANV and NVIDIA) is held as its UNORM twin, the device lacking its decode: a read, a sample, a fetch, a gather and a bicubic tap decode what the twin's view reads (one texel's codes, or the device's filter of them) by the MSL transfer through the device's `Pow`. | The device's sampler is the contract. | Linear filter within one code (1/255) on the measured devices, sRGB within 1.83, a two-plane YCbCr texture's within 1.183; levels, anisotropy, cubes, 3D, gathers and comparisons unmeasured. A twin's texel: the transfer within the device's `Pow` (MoltenVK's within 1.83e-7 through a storage alias, `runtime_lane::srgb_storage`) where Metal's table rounds it to a twelve-bit step (up to 1/8190 apart); a filtered sample decodes the filtered codes, up to 0.286 off for a blend of codes 0 and 255 (`SrgbTexelDecode`). `DeviceSampling` (`device-sampling`) |