From 8ec8cbbc20b54ccc6416ebb3b7d6dfe44be55802 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Tue, 17 Nov 2026 11:29:18 -0800 Subject: [PATCH] old-runtime regression fix: a half color output is 16-bit again under Device::new 6f5bd20321 removed the 16-bit `half` color output form on every device. That moved Device::new's output, which the old runtime builds on: 111 golden cells on each RADV, ANV and MoltenVK profile (5c47b9c867 -> bfe63b5097). The form comes back for Device::new alone, as a profile fact: ProfileFacts::half_outputs is HalfOutputs::Sixteen in Device::new's facts (ROWS) and HalfOutputs::Widened in Device::from_queries' (EVERY). Under Sixteen a `half` color output is declared with 16-bit `float` lanes where the profile enables storageInputOutput16 and shaderFloat16, as before 6f5bd20321. storageInputOutput16 is not one of the queries rule 2 lets choose a second form, so the new runtime keeps one 32-bit form for every stage output. The fact renders into no ROWS fingerprint, so Device::new's profile keys do not move. - lower::stage_io: plan::half_variable (now reading the fact and the enabled feature), IoObject::User::half, the 16-bit store and io_elem's width are back. StageIo::half_outputs and the link contract's 16-bit lanes are back. - The HalfOutputPrecision and HalfOutputFastMathBlend note texts, docs/API.md's degrade catalogue, docs/FAST-PATHS.md and the half-output-blends case say what they said for the old path, each scoped to Device::new, with Device::from_queries handing every device the `float`. - known-gaps.tsv: the 52 MoltenVK rows for the M3 Max's half-output-blends-r16f, -rg16f and -rgba16f go, as before 6f5bd20321: with the 16-bit output MoltenVK stored Metal's codes there. docs/CONFORMANCE-COVERAGE.md is regenerated (3,783 -> 3,731 ledger rows). - The Iris Xe's 62 half-output rows (6769c2eaaf) were measured with the 32-bit form on ANV, which gets the 16-bit form again under Device::new: they are owed a re-run with it. - SEMANTICS_VERSION 2157 (the 111 cells per profile change under unchanged keys) and ARTIFACT_FORMAT_VERSION 530 (the artifact codec has StageIo::half_outputs again). - The engine_stage_io test is back. It also checks that the profile from Device::from_queries is HalfOutputs::Widened and keeps the output 32-bit on MoltenVK, RADV and lavapipe, with no StorageInputOutput16. Verified at 8e0e199a12 on 00ca405504, whose tree is this commit's but for SEMANTICS_VERSION (2156 there; development took it meanwhile) and development's later commits (03a3741772 and the harness's), which touch none of this commit's files: - msi 41897: golden_hashes_match_the_table with every difference listed, compared with the tables at 5c47b9c867 and bfe63b5097. All 504 stage-io cells on the .ll rows that Linux compares (56 on each of the 4 RADV, 4 ANV and MoltenVK profiles) are back at their 5c47b9c867 values, none elsewhere. On ANV and MoltenVK those are the only cells that moved (280, under unchanged keys). The RADV and NVIDIA columns are stale under profile fingerprints that development's e0f567a8bc moved back before this commit (12,705 cells, the table not yet blessed for it); in them only the stage-io cells above and 185 cells on each of nvidia-rtx50-linux and nvidia-rtx5080-laptop (e0f567a8bc's NVIDIA restore) moved. No ROWS fingerprint moved with this commit. The 55 stage-io cells per profile on .air.ll rows need metal-as and wait for the M3 bless. - msi 41813: clippy -p metal2vulkan --all-targets --all-features -D warnings, rustdoc -D warnings, nextest -p metal2vulkan -p metal2vulkan-conformance in full: 4,719 of 4,722 pass. The failures: golden_hashes_match_the_table, for the bless above; the_public_signatures_are_the_committed_table, development's degradations! row, fixed since by 489bc24c4e; the_authored_4096_step_kernel_compiles_inside_the_budget, which passed alone on the same build (41862) and is not in this commit's scope. - msi 41814: clippy under --cfg m2v_gpu and --cfg m2v_cpu_icd. --- .../metal2vulkan-conformance/known-gaps.tsv | 52 ------------ .../src/cases/half_output_blends.rs | 10 ++- crates/metal2vulkan/src/cache/codec.rs | 2 +- crates/metal2vulkan/src/cache/mod.rs | 4 +- crates/metal2vulkan/src/device/derive.rs | 3 +- crates/metal2vulkan/src/device/profile.rs | 23 ++++++ crates/metal2vulkan/src/lower/stage_io/mod.rs | 50 +++++++++--- .../metal2vulkan/src/lower/stage_io/plan.rs | 39 ++++++++- crates/metal2vulkan/src/pipeline/artifact.rs | 17 +++- .../src/pipeline/link/contract.rs | 18 ++++- crates/metal2vulkan/src/pipeline/stage_io.rs | 20 ++++- .../metal2vulkan/src/tests/engine_stage_io.rs | 80 ++++++++++++++----- docs/API.md | 7 +- docs/CONFORMANCE-COVERAGE.md | 54 +------------ docs/FAST-PATHS.md | 2 +- 15 files changed, 227 insertions(+), 154 deletions(-) diff --git a/crates/metal2vulkan-conformance/known-gaps.tsv b/crates/metal2vulkan-conformance/known-gaps.tsv index b1014c196..996acb0b5 100644 --- a/crates/metal2vulkan-conformance/known-gaps.tsv +++ b/crates/metal2vulkan-conformance/known-gaps.tsv @@ -215,23 +215,6 @@ blend-interaction-format-srgb8 on x86-64 AVX2 divergent case/blended/one-one-sub blend-interaction-format-srgb8 on AArch64 divergent case/blended/one-one-subtract 81 elements differ (U8), the largest difference 3 Metal's stored sRGB code and ours differ at this site, and the row's count and bound are this run's. Two of the device's own answers meet in it. The device encodes the colour into sRGB by its own approximation, where Metal encodes through its twelve-bit table: the case's unblended `off` and `one-zero-add` sites differ by one code at every texel on this venue. And the device's fixed-function unit computes the blend, where Metal's compiler folds it into the fragment function under fast math (measured on an Apple M3 Max, macOS 27.0.1, from the `half-output-blends-*` family's recordings). Under the native-arithmetic contract both are the answer: `device-color-conversion` records the device's conversion into the attachment, blended or not, where near a tie the device may store the other code, and validation derives no tolerance from it. This run does not separate the encode from the blend at a blended site. This site's bound of 3 is within the four codes the note records for a blend into an 8-bit sRGB attachment on lavapipe. The count is the host's: llvmpipe's compiler takes the host's vector instructions, and the same Mesa 26.2.6 build (LLVM 23.1.4) stores a code apart at 78 of this site's texels on a host with AVX-512 (a Ryzen 7 7840HS) and at 81 on one with AVX2 alone (an i9-13900H). Open: nothing in the product; reproducing Metal's bits on the device is the emulation the native-arithmetic contract rules out. blend-interaction-format-srgb8 on x86-64 AVX-512 divergent case/blended/one-one-subtract 78 elements differ (U8), the largest difference 3 Metal's stored sRGB code and ours differ at this site, and the row's count and bound are this run's. Two of the device's own answers meet in it. The device encodes the colour into sRGB by its own approximation, where Metal encodes through its twelve-bit table: the case's unblended `off` and `one-zero-add` sites differ by one code at every texel on this venue. And the device's fixed-function unit computes the blend, where Metal's compiler folds it into the fragment function under fast math (measured on an Apple M3 Max, macOS 27.0.1, from the `half-output-blends-*` family's recordings). Under the native-arithmetic contract both are the answer: `device-color-conversion` records the device's conversion into the attachment, blended or not, where near a tie the device may store the other code, and validation derives no tolerance from it. This run does not separate the encode from the blend at a blended site. This site's bound of 3 is within the four codes the note records for a blend into an 8-bit sRGB attachment on lavapipe. The count is the host's: llvmpipe's compiler takes the host's vector instructions, and the same Mesa 26.2.6 build (LLVM 23.1.4) stores a code apart at 78 of this site's texels on a host with AVX-512 (a Ryzen 7 7840HS) and at 81 on one with AVX2 alone (an i9-13900H). Open: nothing in the product; reproducing Metal's bits on the device is the emulation the native-arithmetic contract rules out. blend-sweep-operations llvmpipe divergent case/blended/dc-1mdc-subtract 4 elements differ (F32), the largest difference 0 Metal stores a negative zero where we store a positive one: the first differing element is Metal 0x80000000 against our 0x0, and all four of the site's elements differ while the bound is 0, a sign-of-zero difference. The blend is `DestinationColor` against `OneMinusDestinationColor` under `Subtract`, whose exact result is zero at this destination, so the question is only which sign the arithmetic leaves: Metal's is its compiler's fast-math fold of the blend into the fragment function, and ours is this device's fixed-function blend unit, which answers `+0`. Under the native-arithmetic contract the device's blend is the answer, the sign of its zero included: `device-color-conversion` records that a 32-bit float attachment that so blends stores the device's blend arithmetic, and validation derives no tolerance from it. Whether every destination of the sweep answers so is not established; only this site's four elements were measured. Open: nothing in the product; folding the blend to take Metal's sign is the emulation the native-arithmetic contract rules out. -half-output-blends-r16f Apple M3 Max divergent case/blended/1mbc-zero 204 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. At the blend-colour sites the largest differences are cancellation near zero, not overflow or NaN: at RGBA16Float's alpha, source -1.0625 over destination 0.869140625 with blend colour 0.45 sums to -9.8e-5 exactly; the device's `float` blend stores -9.763e-5 (0x8666) and Metal, rounding the blend colour to `half`, -3.34e-6 (0x8038), 1,582 codes apart near zero but 9.4e-5 in value, under one `half` unit in the last place at the operands' magnitude (a `float` model of the blend reproduces the 1,582). Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-r16f Apple M3 Max divergent case/blended/1mdc-one 85 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-r16f Apple M3 Max divergent case/blended/1msc-1msc 76 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-r16f Apple M3 Max divergent case/blended/ba-1mba 122 elements differ (U16), the largest difference 210 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. At the blend-colour sites the largest differences are cancellation near zero, not overflow or NaN: at RGBA16Float's alpha, source -1.0625 over destination 0.869140625 with blend colour 0.45 sums to -9.8e-5 exactly; the device's `float` blend stores -9.763e-5 (0x8666) and Metal, rounding the blend colour to `half`, -3.34e-6 (0x8038), 1,582 codes apart near zero but 9.4e-5 in value, under one `half` unit in the last place at the operands' magnitude (a `float` model of the blend reproduces the 1,582). Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-r16f Apple M3 Max divergent case/blended/bc-1mbc 137 elements differ (U16), the largest difference 100 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. At the blend-colour sites the largest differences are cancellation near zero, not overflow or NaN: at RGBA16Float's alpha, source -1.0625 over destination 0.869140625 with blend colour 0.45 sums to -9.8e-5 exactly; the device's `float` blend stores -9.763e-5 (0x8666) and Metal, rounding the blend colour to `half`, -3.34e-6 (0x8038), 1,582 codes apart near zero but 9.4e-5 in value, under one `half` unit in the last place at the operands' magnitude (a `float` model of the blend reproduces the 1,582). Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-r16f Apple M3 Max divergent case/blended/bc-1msa 152 elements differ (U16), the largest difference 38 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. At the blend-colour sites the largest differences are cancellation near zero, not overflow or NaN: at RGBA16Float's alpha, source -1.0625 over destination 0.869140625 with blend colour 0.45 sums to -9.8e-5 exactly; the device's `float` blend stores -9.763e-5 (0x8666) and Metal, rounding the blend colour to `half`, -3.34e-6 (0x8038), 1,582 codes apart near zero but 9.4e-5 in value, under one `half` unit in the last place at the operands' magnitude (a `float` model of the blend reproduces the 1,582). Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-r16f Apple M3 Max divergent case/blended/dc-1mdc 103 elements differ (U16), the largest difference 2 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-r16f Apple M3 Max divergent case/blended/dc-zero 58 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-r16f Apple M3 Max divergent case/blended/one-1msa 73 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-r16f Apple M3 Max divergent case/blended/one-1msa-sub 79 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-r16f Apple M3 Max divergent case/blended/one-one 6 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-r16f Apple M3 Max divergent case/blended/one-one-sub 10 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-r16f Apple M3 Max divergent case/blended/sa-1msa 73 elements differ (U16), the largest difference 2 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-r16f Apple M3 Max divergent case/blended/sa-1msa-rsub 72 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-r16f Apple M3 Max divergent case/blended/sas-1msa 81 elements differ (U16), the largest difference 24 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-r16f Apple M3 Max divergent case/blended/sc-dc 113 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-r16f Apple M3 Max divergent case/blended/zero-1msa 71 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. half-output-blends-r16f llvmpipe divergent case/blended/1mdc-one 85 elements differ (U16), the largest difference 1 Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings -- and the runtime leaves the blend to the device's fixed-function unit, whose results are its own; that is why the row names this venue and why its numbers are not the Apple rows'. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and two units of a `float` into a 32-bit float one, and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. On this venue the bound at `zero-1msa` and `sas-1msa` is exactly the sign bit (32768 at 16-bit words, 2147483648 at 32-bit ones), a zero of the other sign rather than a code of difference; which side holds which sign is not established. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. half-output-blends-r16f llvmpipe divergent case/blended/1msc-1msc 76 elements differ (U16), the largest difference 1 Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings -- and the runtime leaves the blend to the device's fixed-function unit, whose results are its own; that is why the row names this venue and why its numbers are not the Apple rows'. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and two units of a `float` into a 32-bit float one, and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. On this venue the bound at `zero-1msa` and `sas-1msa` is exactly the sign bit (32768 at 16-bit words, 2147483648 at 32-bit ones), a zero of the other sign rather than a code of difference; which side holds which sign is not established. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. half-output-blends-r16f llvmpipe divergent case/blended/dc-1mdc 103 elements differ (U16), the largest difference 2 Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings -- and the runtime leaves the blend to the device's fixed-function unit, whose results are its own; that is why the row names this venue and why its numbers are not the Apple rows'. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and two units of a `float` into a 32-bit float one, and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. On this venue the bound at `zero-1msa` and `sas-1msa` is exactly the sign bit (32768 at 16-bit words, 2147483648 at 32-bit ones), a zero of the other sign rather than a code of difference; which side holds which sign is not established. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. @@ -273,23 +256,6 @@ half-output-blends-r32f llvmpipe divergent case/blended/bc-1msa 60 elements diff half-output-blends-r32f NVIDIA GeForce RTX 5080 Laptop GPU divergent case/blended/ba-1mba 19 elements differ (U32), the largest difference 15 Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings -- and the runtime leaves the blend to the device's fixed-function unit, whose results are its own; that is why the row names this venue and why its numbers are not the Apple rows'. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and two units of a `float` into a 32-bit float one (MoltenVK on the M3 Max against plain Metal), and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. half-output-blends-r32f NVIDIA GeForce RTX 5080 Laptop GPU divergent case/blended/bc-1mbc 20 elements differ (U32), the largest difference 16 Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings -- and the runtime leaves the blend to the device's fixed-function unit, whose results are its own; that is why the row names this venue and why its numbers are not the Apple rows'. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and two units of a `float` into a 32-bit float one (MoltenVK on the M3 Max against plain Metal), and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. half-output-blends-r32f NVIDIA GeForce RTX 5080 Laptop GPU divergent case/blended/bc-1msa 22 elements differ (U32), the largest difference 8 Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings -- and the runtime leaves the blend to the device's fixed-function unit, whose results are its own; that is why the row names this venue and why its numbers are not the Apple rows'. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and two units of a `float` into a 32-bit float one (MoltenVK on the M3 Max against plain Metal), and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rg16f Apple M3 Max divergent case/blended/1mbc-zero 252 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. At the blend-colour sites the largest differences are cancellation near zero, not overflow or NaN: at RGBA16Float's alpha, source -1.0625 over destination 0.869140625 with blend colour 0.45 sums to -9.8e-5 exactly; the device's `float` blend stores -9.763e-5 (0x8666) and Metal, rounding the blend colour to `half`, -3.34e-6 (0x8038), 1,582 codes apart near zero but 9.4e-5 in value, under one `half` unit in the last place at the operands' magnitude (a `float` model of the blend reproduces the 1,582). Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rg16f Apple M3 Max divergent case/blended/1mdc-one 172 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rg16f Apple M3 Max divergent case/blended/1msc-1msc 159 elements differ (U16), the largest difference 2 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rg16f Apple M3 Max divergent case/blended/ba-1mba 189 elements differ (U16), the largest difference 73 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. At the blend-colour sites the largest differences are cancellation near zero, not overflow or NaN: at RGBA16Float's alpha, source -1.0625 over destination 0.869140625 with blend colour 0.45 sums to -9.8e-5 exactly; the device's `float` blend stores -9.763e-5 (0x8666) and Metal, rounding the blend colour to `half`, -3.34e-6 (0x8038), 1,582 codes apart near zero but 9.4e-5 in value, under one `half` unit in the last place at the operands' magnitude (a `float` model of the blend reproduces the 1,582). Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rg16f Apple M3 Max divergent case/blended/bc-1mbc 315 elements differ (U16), the largest difference 222 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. At the blend-colour sites the largest differences are cancellation near zero, not overflow or NaN: at RGBA16Float's alpha, source -1.0625 over destination 0.869140625 with blend colour 0.45 sums to -9.8e-5 exactly; the device's `float` blend stores -9.763e-5 (0x8666) and Metal, rounding the blend colour to `half`, -3.34e-6 (0x8038), 1,582 codes apart near zero but 9.4e-5 in value, under one `half` unit in the last place at the operands' magnitude (a `float` model of the blend reproduces the 1,582). Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rg16f Apple M3 Max divergent case/blended/bc-1msa 334 elements differ (U16), the largest difference 154 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. At the blend-colour sites the largest differences are cancellation near zero, not overflow or NaN: at RGBA16Float's alpha, source -1.0625 over destination 0.869140625 with blend colour 0.45 sums to -9.8e-5 exactly; the device's `float` blend stores -9.763e-5 (0x8666) and Metal, rounding the blend colour to `half`, -3.34e-6 (0x8038), 1,582 codes apart near zero but 9.4e-5 in value, under one `half` unit in the last place at the operands' magnitude (a `float` model of the blend reproduces the 1,582). Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rg16f Apple M3 Max divergent case/blended/dc-1mdc 240 elements differ (U16), the largest difference 2 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rg16f Apple M3 Max divergent case/blended/dc-zero 104 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rg16f Apple M3 Max divergent case/blended/one-1msa 153 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rg16f Apple M3 Max divergent case/blended/one-1msa-sub 146 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rg16f Apple M3 Max divergent case/blended/one-one 11 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rg16f Apple M3 Max divergent case/blended/one-one-sub 14 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rg16f Apple M3 Max divergent case/blended/sa-1msa 133 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rg16f Apple M3 Max divergent case/blended/sa-1msa-rsub 171 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rg16f Apple M3 Max divergent case/blended/sas-1msa 124 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rg16f Apple M3 Max divergent case/blended/sc-dc 231 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rg16f Apple M3 Max divergent case/blended/zero-1msa 121 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. half-output-blends-rg16f llvmpipe divergent case/blended/1mdc-one 172 elements differ (U16), the largest difference 1 Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings -- and the runtime leaves the blend to the device's fixed-function unit, whose results are its own; that is why the row names this venue and why its numbers are not the Apple rows'. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and two units of a `float` into a 32-bit float one, and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. On this venue the bound at `zero-1msa` and `sas-1msa` is exactly the sign bit (32768 at 16-bit words, 2147483648 at 32-bit ones), a zero of the other sign rather than a code of difference; which side holds which sign is not established. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. half-output-blends-rg16f llvmpipe divergent case/blended/1msc-1msc 159 elements differ (U16), the largest difference 2 Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings -- and the runtime leaves the blend to the device's fixed-function unit, whose results are its own; that is why the row names this venue and why its numbers are not the Apple rows'. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and two units of a `float` into a 32-bit float one, and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. On this venue the bound at `zero-1msa` and `sas-1msa` is exactly the sign bit (32768 at 16-bit words, 2147483648 at 32-bit ones), a zero of the other sign rather than a code of difference; which side holds which sign is not established. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. half-output-blends-rg16f llvmpipe divergent case/blended/dc-1mdc 240 elements differ (U16), the largest difference 2 Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings -- and the runtime leaves the blend to the device's fixed-function unit, whose results are its own; that is why the row names this venue and why its numbers are not the Apple rows'. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and two units of a `float` into a 32-bit float one, and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. On this venue the bound at `zero-1msa` and `sas-1msa` is exactly the sign bit (32768 at 16-bit words, 2147483648 at 32-bit ones), a zero of the other sign rather than a code of difference; which side holds which sign is not established. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. @@ -336,24 +302,6 @@ half-output-blends-rg32f llvmpipe divergent case/blended/bc-1msa 125 elements di half-output-blends-rg32f NVIDIA GeForce RTX 5080 Laptop GPU divergent case/blended/ba-1mba 148 elements differ (U32), the largest difference 28 Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings -- and the runtime leaves the blend to the device's fixed-function unit, whose results are its own; that is why the row names this venue and why its numbers are not the Apple rows'. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and two units of a `float` into a 32-bit float one (MoltenVK on the M3 Max against plain Metal), and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. half-output-blends-rg32f NVIDIA GeForce RTX 5080 Laptop GPU divergent case/blended/bc-1mbc 44 elements differ (U32), the largest difference 15 Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings -- and the runtime leaves the blend to the device's fixed-function unit, whose results are its own; that is why the row names this venue and why its numbers are not the Apple rows'. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and two units of a `float` into a 32-bit float one (MoltenVK on the M3 Max against plain Metal), and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. half-output-blends-rg32f NVIDIA GeForce RTX 5080 Laptop GPU divergent case/blended/bc-1msa 30 elements differ (U32), the largest difference 9 Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings -- and the runtime leaves the blend to the device's fixed-function unit, whose results are its own; that is why the row names this venue and why its numbers are not the Apple rows'. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and two units of a `float` into a 32-bit float one (MoltenVK on the M3 Max against plain Metal), and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/1mbc-zero 284 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. At the blend-colour sites the largest differences are cancellation near zero, not overflow or NaN: at RGBA16Float's alpha, source -1.0625 over destination 0.869140625 with blend colour 0.45 sums to -9.8e-5 exactly; the device's `float` blend stores -9.763e-5 (0x8666) and Metal, rounding the blend colour to `half`, -3.34e-6 (0x8038), 1,582 codes apart near zero but 9.4e-5 in value, under one `half` unit in the last place at the operands' magnitude (a `float` model of the blend reproduces the 1,582). Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/1mdc-one 301 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/1msc-1msc 323 elements differ (U16), the largest difference 2 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/ba-1mba 421 elements differ (U16), the largest difference 811 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. At the blend-colour sites the largest differences are cancellation near zero, not overflow or NaN: at RGBA16Float's alpha, source -1.0625 over destination 0.869140625 with blend colour 0.45 sums to -9.8e-5 exactly; the device's `float` blend stores -9.763e-5 (0x8666) and Metal, rounding the blend colour to `half`, -3.34e-6 (0x8038), 1,582 codes apart near zero but 9.4e-5 in value, under one `half` unit in the last place at the operands' magnitude (a `float` model of the blend reproduces the 1,582). Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/bc-1mbc 536 elements differ (U16), the largest difference 1582 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. At the blend-colour sites the largest differences are cancellation near zero, not overflow or NaN: at RGBA16Float's alpha, source -1.0625 over destination 0.869140625 with blend colour 0.45 sums to -9.8e-5 exactly; the device's `float` blend stores -9.763e-5 (0x8666) and Metal, rounding the blend colour to `half`, -3.34e-6 (0x8038), 1,582 codes apart near zero but 9.4e-5 in value, under one `half` unit in the last place at the operands' magnitude (a `float` model of the blend reproduces the 1,582). Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/bc-1msa 559 elements differ (U16), the largest difference 819 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. At the blend-colour sites the largest differences are cancellation near zero, not overflow or NaN: at RGBA16Float's alpha, source -1.0625 over destination 0.869140625 with blend colour 0.45 sums to -9.8e-5 exactly; the device's `float` blend stores -9.763e-5 (0x8666) and Metal, rounding the blend colour to `half`, -3.34e-6 (0x8038), 1,582 codes apart near zero but 9.4e-5 in value, under one `half` unit in the last place at the operands' magnitude (a `float` model of the blend reproduces the 1,582). Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/da-1mda 495 elements differ (U16), the largest difference 32 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/dc-1mdc 499 elements differ (U16), the largest difference 2 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/dc-zero 211 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/one-1msa 282 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/one-1msa-sub 339 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/one-one 22 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/one-one-sub 26 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/sa-1msa 311 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/sa-1msa-rsub 303 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/sas-1msa 352 elements differ (U16), the largest difference 64 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/sc-dc 452 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. -half-output-blends-rgba16f Apple M3 Max divergent case/blended/zero-1msa 251 elements differ (U16), the largest difference 1 TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carries it. Metal's stored blend result and ours differ at this site, and the row's count and bound are MoltenVK's on the Apple M3 Max. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings. The pipeline hands every device the function's `half` widened to a 32-bit `float`, one form on every device, so MoltenVK's Metal compiler folds the blend of a `float` output, whose arithmetic is not that of Metal's `half` output; that is why the row names this venue. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. half-output-blends-rgba16f llvmpipe divergent case/blended/1mdc-one 301 elements differ (U16), the largest difference 1 Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings -- and the runtime leaves the blend to the device's fixed-function unit, whose results are its own; that is why the row names this venue and why its numbers are not the Apple rows'. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and two units of a `float` into a 32-bit float one, and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. On this venue the bound at `zero-1msa` and `sas-1msa` is exactly the sign bit (32768 at 16-bit words, 2147483648 at 32-bit ones), a zero of the other sign rather than a code of difference; which side holds which sign is not established. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. half-output-blends-rgba16f llvmpipe divergent case/blended/1msc-1msc 323 elements differ (U16), the largest difference 2 Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings -- and the runtime leaves the blend to the device's fixed-function unit, whose results are its own; that is why the row names this venue and why its numbers are not the Apple rows'. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and two units of a `float` into a 32-bit float one, and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. On this venue the bound at `zero-1msa` and `sas-1msa` is exactly the sign bit (32768 at 16-bit words, 2147483648 at 32-bit ones), a zero of the other sign rather than a code of difference; which side holds which sign is not established. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. half-output-blends-rgba16f llvmpipe divergent case/blended/da-1mda 495 elements differ (U16), the largest difference 32 Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math, rounding the source product to the attachment's precision and carrying the destination product into the sum unrounded -- `round(round(Sf*S) + Df*D)`, measured word by word on an Apple M3 Max (macOS 27.0.1) from this family's own committed recordings -- and the runtime leaves the blend to the device's fixed-function unit, whose results are its own; that is why the row names this venue and why its numbers are not the Apple rows'. Under the native-arithmetic contract the device's blend is the answer: the case declares `half-output-fast-math-blend`, whose definition in pipeline/artifact.rs bounds the device's blend at three units in the last place of a `half` at the largest operand's magnitude into a 16-bit float attachment and two units of a `float` into a 32-bit float one, and says validation derives no tolerance from it. The report's bound is a distance at the stored value, not at the operands' magnitude, so whether this site is within the note's bound is not established by this run. On this venue the bound at `zero-1msa` and `sas-1msa` is exactly the sign bit (32768 at 16-bit words, 2147483648 at 32-bit ones), a zero of the other sign rather than a code of difference; which side holds which sign is not established. Open: nothing in the product; folding the blend into the function to reproduce Metal's bits is the emulation the native-arithmetic contract rules out. diff --git a/crates/metal2vulkan-conformance/src/cases/half_output_blends.rs b/crates/metal2vulkan-conformance/src/cases/half_output_blends.rs index d6fb68846..dead7b4bd 100644 --- a/crates/metal2vulkan-conformance/src/cases/half_output_blends.rs +++ b/crates/metal2vulkan-conformance/src/cases/half_output_blends.rs @@ -77,8 +77,14 @@ //! blend-colour sites are not modelled by that rule (`bc-1msa` does not fit it at the first word of //! `r16f`: Metal stores 0.60498046875 where the rule gives 0.6044921875). //! -//! **What our side does.** The pipeline hands every device the function's `half` widened to a -//! 32-bit `float`, which holds every `half` exactly, and the device's blend is the answer (the +//! **What our side does.** Where the device enables `storageInputOutput16` (MoltenVK, RADV, ANV) +//! the pipeline hands it the function's `half` as a 16-bit output (`StageIo::half_outputs`), so +//! the device blends the `half` Metal's attachment receives as its own `half` output. On the M3 +//! Max under MoltenVK 1.4.2 that is Metal's compiler blending Metal's own output type: every word +//! of every blend stores Metal's code, in the 16- and the 32-bit float formats alike, the +//! blend-colour rows included (a replay of the six cases against the committed recordings). RADV +//! and ANV are not measured with it. Where the device lacks the feature (lavapipe, NVIDIA's) the +//! pipeline hands it the `half` widened to `float`, and the device's blend is the answer (the //! native-arithmetic contract): the sites where it differs from Metal's stay `divergent` rather //! than being loosened, because `half-output-fast-math-blend`'s own definition says validation //! derives no tolerance from it, and `known-gaps.tsv` carries a row for each, per venue. diff --git a/crates/metal2vulkan/src/cache/codec.rs b/crates/metal2vulkan/src/cache/codec.rs index d57df5ad1..bb09194c6 100644 --- a/crates/metal2vulkan/src/cache/codec.rs +++ b/crates/metal2vulkan/src/cache/codec.rs @@ -1171,7 +1171,7 @@ codec_struct! { early_fragment_tests, extended_range_colors, unattached_colors, sample_mask, rotated_colors, rotated_factors, rotated_blends, decoded_fetches, texture_write_rounding, uniform_outputs, uniform_inputs, instanced_attributes, - half_blend_colors, half_fast_colors, float_blend_colors, zero_indices, + half_blend_colors, half_fast_colors, half_outputs, float_blend_colors, zero_indices, color_group, word_colors, alpha_in_red_colors, alpha_test, depth_compares, logic_operation, } diff --git a/crates/metal2vulkan/src/cache/mod.rs b/crates/metal2vulkan/src/cache/mod.rs index 75652a676..084e44dba 100644 --- a/crates/metal2vulkan/src/cache/mod.rs +++ b/crates/metal2vulkan/src/cache/mod.rs @@ -61,7 +61,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 = 2156; +pub const SEMANTICS_VERSION: u32 = 2157; /// The byte-layout version of encoded artifacts (`CompiledFunction::to_bytes` and the /// [`PipelineArtifact`] encodings). Every encoded artifact carries it, and a decode under another @@ -71,7 +71,7 @@ pub const SEMANTICS_VERSION: u32 = 2156; /// re-typed in an encoded type, its `codec` body or its `envelope`. A variant removed while its tag /// stays unused needs no bump: an entry holding it fails to decode, which is a miss. The commit that /// bumps it says what changed; this comment keeps no history. -pub const ARTIFACT_FORMAT_VERSION: u32 = 529; +pub const ARTIFACT_FORMAT_VERSION: u32 = 530; /// The version of what this crate's runtime does with a compiled pipeline: instantiating a binding /// plan (`BindingPlan::instantiate_*`: descriptor ranges, push bytes, root, argument, and handle diff --git a/crates/metal2vulkan/src/device/derive.rs b/crates/metal2vulkan/src/device/derive.rs index 9afc04f23..669ad71f3 100644 --- a/crates/metal2vulkan/src/device/derive.rs +++ b/crates/metal2vulkan/src/device/derive.rs @@ -85,7 +85,8 @@ impl Device { /// (`DriverWorkaround::ClippedCoverageNotMetals`, `DriverWorkaround::TessellatorNotMetals`), /// `InterpolateAtOffset` reads from the pixel's center as GLSL.std.450 states, and a thread's /// Function storage is the 16 KiB floor. A two-plane YCbCr texture's planes are read in place - /// on every device, whatever its type. + /// on every device, whatever its type. Every stage output is 32-bit: a `half` color output + /// reaches the device widened to `float`, whatever `storageInputOutput16` says. pub fn from_queries(desc: DeviceDescription, policy: DevicePolicy) -> Result { Device::derived(desc.without_identity(), policy, |desc, policy| { let fields = ProfileFields { diff --git a/crates/metal2vulkan/src/device/profile.rs b/crates/metal2vulkan/src/device/profile.rs index e71885b0f..d5e8c3749 100644 --- a/crates/metal2vulkan/src/device/profile.rs +++ b/crates/metal2vulkan/src/device/profile.rs @@ -111,6 +111,11 @@ impl DeviceProfile { self.facts.narrow_wrap } + /// Whether a `half` color output may be declared with 16-bit `float` lanes. + pub(crate) fn half_outputs(&self) -> HalfOutputs { + self.facts.half_outputs + } + /// The profile's fields: internal; the profile is opaque to consumers, who compare /// [`DeviceProfile::fingerprint`] and read its facts through the accessors. pub(crate) fn fields(&self) -> &ProfileFields { @@ -543,6 +548,8 @@ pub(crate) struct ProfileFacts { pub(crate) reconvergence_note: ReconvergenceNote, /// Which narrow integer results clear the bits above their width. pub(crate) narrow_wrap: NarrowWrap, + /// Whether a `half` color output may be declared with 16-bit `float` lanes. + pub(crate) half_outputs: HalfOutputs, } impl ProfileFacts { @@ -552,6 +559,7 @@ impl ProfileFacts { half_pair_note: HalfPairNote::Fused, reconvergence_note: ReconvergenceNote::Field, narrow_wrap: NarrowWrap::Every, + half_outputs: HalfOutputs::Sixteen, }; /// `Device::from_queries`': each fact the same on every device. @@ -560,6 +568,7 @@ impl ProfileFacts { half_pair_note: HalfPairNote::Every, reconvergence_note: ReconvergenceNote::Noted, narrow_wrap: NarrowWrap::Read, + half_outputs: HalfOutputs::Widened, }; } @@ -577,6 +586,20 @@ pub(crate) enum NarrowWrap { Read, } +/// How a `half` color output (a scalar or vector of AIR's `half`) reaches the device +/// (`lower::stage_io`'s `half_variable`, `StageIo::half_outputs`). +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub(crate) enum HalfOutputs { + /// Declared with 16-bit `float` lanes where the profile enables `storageInputOutput16` and + /// `shaderFloat16`, so the device receives the `half` as Metal's attachment does; 32-bit, the + /// `half` widened, elsewhere: `Device::new`'s profile. + Sixteen, + /// 32-bit on every device, the `half` widened to `float`, which holds every `half` exactly: + /// `storageInputOutput16` is not a query that may choose a second form. + /// `Device::from_queries`' profile. + Widened, +} + /// Whether a stage whose reconvergence is implementation-defined (`Reconvergence::ImplementationDefined`: /// a tangled instruction on a device without maximal reconvergence) records /// `PrecisionNote::DeviceReconvergence`. diff --git a/crates/metal2vulkan/src/lower/stage_io/mod.rs b/crates/metal2vulkan/src/lower/stage_io/mod.rs index 96ff6a234..c13cdc1ea 100644 --- a/crates/metal2vulkan/src/lower/stage_io/mod.rs +++ b/crates/metal2vulkan/src/lower/stage_io/mod.rs @@ -11,10 +11,15 @@ //! //! - User interface variables (vertex attributes, varyings, color outputs) carry a relocatable //! `Location` keyed by a [`VaryingKey`] whose role the artifact states -//! ([`crate::pipeline::stage_io::StageIo`]); link numbers them. Every one is 32-bit on every -//! device: integers are declared `uint` (held zero-extended), narrow floats `float` (held -//! widened; every `half` is exactly a `float`), so no module needs `storageInputOutput16`. A -//! 32-bit integer color output to a signed-integer attachment +//! ([`crate::pipeline::stage_io::StageIo`]); link numbers them. Every one is 32-bit: integers are +//! declared `uint` (held zero-extended), narrow floats `float` (held widened), but a `half` color +//! output on a profile that enables `storageInputOutput16` and `shaderFloat16` +//! under `HalfOutputs::Sixteen` (`Device::new`'s profile; `Device::from_queries`' widens it), +//! declared with +//! 16-bit `float` lanes (`StageIo::half_outputs`) and stored by the exact conversion of the +//! `half` it holds, so the device receives the `half` the function returns, as Metal's attachment +//! does, and blends and converts it as its own `half` output. Only that output needs +//! `storageInputOutput16`. A 32-bit integer color output to a signed-integer attachment //! (`LoweringInputs::signed_color_attachments`) is declared `int` and stored by `OpBitcast`; a //! narrower one to such an attachment is `NotImplemented`. //! - Builtins map one to one (`vertex_id` → `VertexIndex`, `[[position]]` → `Position` / @@ -213,6 +218,10 @@ pub enum IoObject { numeric: IoNumeric, components: u8, deco: IoDecor, + /// Declared with 16-bit `float` lanes: a `half` color output on a device that enables + /// `storageInputOutput16` (`plan::half_variable`), stored by the conversion of the `half` it + /// holds widened, exact. Every other user variable is 32-bit. + half: bool, }, /// A builtin variable. Builtin { @@ -2904,8 +2913,9 @@ fn below_count( /// The element type of a user variable of class `numeric`: 32-bit, but a 16-bit `float` where /// `half` (`IoObject::User::half`). -fn io_elem(mb: &mut ModuleBuilder, numeric: IoNumeric) -> BResult { +fn io_elem(mb: &mut ModuleBuilder, numeric: IoNumeric, half: bool) -> BResult { match numeric { + IoNumeric::Float if half => mb.ty(SType::Float { width: 16 }), IoNumeric::Float => mb.ty(SType::Float { width: 32 }), IoNumeric::Uint => mb.ty(SType::Int { width: 32, @@ -2919,10 +2929,29 @@ fn io_elem(mb: &mut ModuleBuilder, numeric: IoNumeric) -> BResult { } /// Store output part `x` (in its lowered representation, which is the interface type, except a -/// `bool`, carried as `uint` 1 or 0, and a 32-bit integer declared `int`, whose bits are stored by -/// `OpBitcast`) through `link`. +/// `bool`, carried as `uint` 1 or 0, a 32-bit integer declared `int`, whose bits are stored by +/// `OpBitcast`, and a `half` declared 16-bit, stored by `OpFConvert` of the `f32` holding it, +/// whose value is a `half`, so the conversion is exact) through `link`. fn store(cx: &mut EmitCx<'_>, fb: &mut FunctionBuilder<'_>, link: &Link, x: SValue) -> BResult<()> { - let x = if bool_as_uint(cx, link) { + let x = if let Some(IoObject::User { + numeric: IoNumeric::Float, + components, + half: true, + .. + }) = cx.plan.families.stage_io.objects.get(link.object) + { + let components = *components; + let elem = io_elem(fb.module(), IoNumeric::Float, true)?; + let ty = if components == 1 { + elem + } else { + fb.module().ty(SType::Vector { + elem, + len: components, + })? + }; + fb.convert(ConvOp::FConvert, x, ty)? + } else if bool_as_uint(cx, link) { let one = ops::splat(fb, uint_lanes(link.form), 1)?; let zero = ops::splat(fb, uint_lanes(link.form), 0)?; fb.select(x, one, zero)? @@ -2933,7 +2962,7 @@ fn store(cx: &mut EmitCx<'_>, fb: &mut FunctionBuilder<'_>, link: &Link, x: SVal }) = cx.plan.families.stage_io.objects.get(link.object) { let components = *components; - let elem = io_elem(fb.module(), IoNumeric::Sint)?; + let elem = io_elem(fb.module(), IoNumeric::Sint, false)?; let ty = if components == 1 { elem } else { @@ -3001,8 +3030,9 @@ pub fn declare( numeric, components, deco, + half, } => { - let elem = io_elem(mb, *numeric)?; + let elem = io_elem(mb, *numeric, *half)?; let ty = if *components == 1 { elem } else { diff --git a/crates/metal2vulkan/src/lower/stage_io/plan.rs b/crates/metal2vulkan/src/lower/stage_io/plan.rs index 0d714cffc..46e7c0e94 100644 --- a/crates/metal2vulkan/src/lower/stage_io/plan.rs +++ b/crates/metal2vulkan/src/lower/stage_io/plan.rs @@ -201,6 +201,18 @@ fn user( dir: IoDir, ty: IoType, deco: IoDecor, +) -> Result { + declare(sp, key, dir, ty, deco, false) +} + +/// [`user`], declared with 16-bit `float` lanes where `half` (`IoObject::User::half`). +fn declare( + sp: &mut StageIoPlan, + key: VaryingKey, + dir: IoDir, + ty: IoType, + deco: IoDecor, + half: bool, ) -> Result { let o = IoObject::User { key: key.clone(), @@ -208,6 +220,7 @@ fn user( numeric: ty.numeric, components: ty.components, deco, + half, }; // One key per direction: a second, different declaration of the same key is not a Metal // interface. @@ -3397,8 +3410,12 @@ fn output(cx: &mut SelectCx<'_>, o: &OutputBinding, ty: AirTypeId) -> Result) -> Result<(), Error> { Ok(()) } +/// Whether a color output of form `f` to `attachment`, through a variable of its own type, is +/// declared with 16-bit `float` lanes (`StageIo::half_outputs`): a `half` output on a profile that +/// enables `storageInputOutput16` and `shaderFloat16` under `HalfOutputs::Sixteen` (`Device::new`'s +/// profile; `Device::from_queries`' widens every one), so the device receives the `half` the +/// function returns as a `half`, as Metal's attachment does, and blends and converts it as its own +/// `half` output. Its value is a `half`, also where the attachment's write rounds a lane +/// (`color_write::plan`: a `half` lane rounds only to a float format of no more precision and the +/// same exponent range), so the conversion that stores it is exact. Not to an attachment held with +/// its channels rotated, whose output may be premultiplied in `float` (`rotated_blend_form`). +fn half_variable(cx: &SelectCx<'_>, attachment: u32, f: Form) -> bool { + use crate::device::profile::HalfOutputs; + use crate::device::requirements::VkFeature; + let fields = cx.profile.fields(); + f.float_fmt() == Some(FloatFmt::Half) + && cx.profile.half_outputs() == HalfOutputs::Sixteen + && (fields.enabled.features).contains(&VkFeature::StorageInputOutput16) + && fields.leaf.float16 + && !cx.inputs.rotated_colors.contains(&attachment) +} + /// Whether AIR type `ty` of entry `e` is `half` or a vector of it: a `half` color output /// (`PrecisionNote::HalfOutputPrecision`, or `HalfOutputFastMathBlend` under fast math). fn half_color(e: &crate::air::Entry, ty: AirTypeId) -> bool { diff --git a/crates/metal2vulkan/src/pipeline/artifact.rs b/crates/metal2vulkan/src/pipeline/artifact.rs index 7ee61bd44..24a931a90 100644 --- a/crates/metal2vulkan/src/pipeline/artifact.rs +++ b/crates/metal2vulkan/src/pipeline/artifact.rs @@ -1502,8 +1502,14 @@ pub enum PrecisionNote { /// on NVIDIA) for a 32-bit float one (at 0bcc0163e5: an RTX 3090 and an /// RTX 5080 Laptop GPU on NVIDIA's 615.71.09, a Radeon 780M on RADV, an Iris Xe of RPL-P on /// ANV and lavapipe, Mesa 26.2.4, the 14 blends Metal measured over the two sweeps, each handed - /// the output widened to `float`, as every device is); and 1 or 2 codes of an 8-bit or - /// extended-range format. + /// the output widened to `float`; RADV and ANV, which enable `storageInputOutput16`, receive + /// it as a 16-bit `half` under `Device::new`, `StageIo::half_outputs`, which is not measured + /// there, and widened under `Device::from_queries`); and 1 or 2 + /// codes of an 8-bit or extended-range format. MoltenVK 1.4.2 on the M3 Max (macOS 27.0.1), + /// which receives the 16-bit `half`, stores the value of Metal's measured rule in every channel + /// of every measured blend draw of the sweep into `R16Float`, `RG16Float` and `RGBA16Float` + /// (28 of 28 each, `runtime_lane::half_output_blends`), and into `R32Float`, `RG32Float` and + /// `RGBA32Float` 28, 28 and 26 of 28, the two off at one channel by a zero's sign. /// /// Also: a `float` color output (a scalar or vector of AIR's `float`) of a module compiled /// without fast math to a 16-bit float attachment that blends by one and zero, added, for @@ -1711,7 +1717,12 @@ pub enum PrecisionNote { /// two units in the last place of a `float` there into a 32-bit float one (MoltenVK on the M3 /// Max, handed the output widened to `float`, against plain Metal over every blended draw of /// the sweep; the device's `float` blend modelled on the same draws, three units). A consumer - /// may relay it as a known difference. + /// may relay it as a known difference. Where the device enables `storageInputOutput16` the + /// output reaches it under `Device::new` as a 16-bit `half` (`StageIo::half_outputs`; under + /// `Device::from_queries` it is widened to `float` on every device): MoltenVK 1.4.2 on the M3 + /// Max (macOS 27.0.1) then stores Metal's codes at every word of every blend of the + /// conformance family `half-output-blends-*` (a loaded `half4`, 21 blends into each 16- and + /// 32-bit float format); a computed output is not measured there. /// /// A fragment function that fetches a blended `R16Float`, `RG16Float` or `RGBA16Float` /// attachment in the interlocked storage form computes the blend itself, no Vulkan blend diff --git a/crates/metal2vulkan/src/pipeline/link/contract.rs b/crates/metal2vulkan/src/pipeline/link/contract.rs index ae74b0fa8..c4959b1f9 100644 --- a/crates/metal2vulkan/src/pipeline/link/contract.rs +++ b/crates/metal2vulkan/src/pipeline/link/contract.rs @@ -62,7 +62,11 @@ pub fn stage_symbols(m: &TypedModule, io: &StageIo) -> Result *elem, _ => g.pointee, }; - if !io_type_matches(m, pointee, *ty)? { + let width = match io.half_outputs.contains(key) { + true => 16, + false => 32, + }; + if !io_type_matches(m, pointee, *ty, width)? { return Err(invariant("a user interface variable of another type")); } declared += 1; @@ -123,15 +127,21 @@ fn invariant(detail: &str) -> Error { /// Whether data type `ty` is the scalar or vector `want` declares (32-bit `float` or /// unsigned-integer lanes; signed-integer lanes for a color output to a signed-integer -/// attachment). -fn io_type_matches(m: &TypedModule, ty: TypeId, want: IoType) -> Result { +/// attachment), its `float` lanes `float_width` bits wide (16 for one of +/// `StageIo::half_outputs`). +fn io_type_matches( + m: &TypedModule, + ty: TypeId, + want: IoType, + float_width: u8, +) -> Result { let types = m.types(); let (elem, lanes) = match types.get(ty)? { Type::Vector { elem, len } => (*elem, *len), _ => (ty, 1), }; let numeric = match types.get(elem)? { - Type::Float { width: 32 } => IoNumeric::Float, + Type::Float { width } if *width == float_width => IoNumeric::Float, Type::Int { width: 32, signed: false, diff --git a/crates/metal2vulkan/src/pipeline/stage_io.rs b/crates/metal2vulkan/src/pipeline/stage_io.rs index 39c62e913..21b939129 100644 --- a/crates/metal2vulkan/src/pipeline/stage_io.rs +++ b/crates/metal2vulkan/src/pipeline/stage_io.rs @@ -49,9 +49,11 @@ //! namespace tag, so no AIR user key can collide with another role's key. Keys stay opaque to //! link; it reads the role here, never the bytes. //! -//! Every interface variable is 32-bit on every device (narrow values are widened at the interface, -//! so no module needs `storageInputOutput16`); [`IoType::source_bits`] keeps the AIR element width -//! for format checks. An attribute or color +//! Every interface variable is 32-bit (narrow varyings are widened at the interface, so no varying +//! needs `storageInputOutput16`), but a `half` color output on a device that enables +//! `storageInputOutput16` under `Device::new` ([`StageIo::half_outputs`]; never under +//! `Device::from_queries`), declared with 16-bit `float` lanes; +//! [`IoType::source_bits`] keeps the AIR element width for format checks. An attribute or color //! takes one whole location; a user varying takes one location at //! component 0 unless link packs varyings into shared locations, for which the module decorates //! every varying with a relocatable `Component`. @@ -379,6 +381,15 @@ pub struct StageIo { /// output can differ there. Empty for any other function. #[cfg_attr(feature = "serde", serde(default))] pub half_fast_colors: Vec, + /// The color outputs declared with 16-bit `float` lanes, in the order of the entry's outputs: + /// each `half` color output (a scalar or vector of AIR's `half`) through a variable of its own + /// type on a device that enables `storageInputOutput16` and `shaderFloat16` under + /// `Device::new` (never under `Device::from_queries`), but to an + /// attachment held with its channels rotated, so the device receives the `half` as Metal's + /// attachment does. Every other user variable is declared 32-bit (a narrower value widened). + /// Empty for every other function. + #[cfg_attr(feature = "serde", serde(default))] + pub half_outputs: Vec, /// The index builtins, `Layer` and `ViewportIndex`, a fragment function reads as 0 on a device /// that cannot declare them (`Layer` needs `geometryShader` or `shaderOutputLayer`, /// `ViewportIndex` `multiViewport` or `shaderOutputViewportIndex`), sorted: compiled for a @@ -879,7 +890,8 @@ pub struct IoType { pub numeric: IoNumeric, pub components: u8, /// The AIR element width (8, 16, or 32; 16 for `half`; 1 for `bool`, carried as `uint` 0 or - /// 1): narrower values are widened at the interface. + /// 1): narrower values are widened at the interface, but a color output of + /// [`StageIo::half_outputs`], declared 16-bit. pub source_bits: u8, } diff --git a/crates/metal2vulkan/src/tests/engine_stage_io.rs b/crates/metal2vulkan/src/tests/engine_stage_io.rs index 1f55e7a01..c29cdb252 100644 --- a/crates/metal2vulkan/src/tests/engine_stage_io.rs +++ b/crates/metal2vulkan/src/tests/engine_stage_io.rs @@ -978,33 +978,77 @@ fn output_widths(words: &[u32]) -> Vec { found } -/// A `half` color output (`stage_io_fragment_point`'s `half4` to color 0) is declared 32-bit, the -/// `half` widened, on every profile, those that enable `storageInputOutput16` and `shaderFloat16` -/// (MoltenVK, RADV) included, as is a `float` output (`stage_io_fragment`); no module requires -/// `StorageInputOutput16`. Each module passes L3. +/// A `half` color output (`stage_io_fragment_point`'s `half4` to color 0) is declared with 16-bit +/// float lanes on a profile that enables `storageInputOutput16` and `shaderFloat16` +/// (`StageIo::half_outputs`), so the device receives the `half` the function returns as a `half`, +/// and the module requires `StorageInputOutput16`; on a profile without it (lavapipe) the output is +/// 32-bit, the `half` widened, as is a `float` output (`stage_io_fragment`) everywhere and a +/// `half` one to an attachment held with its channels rotated. Each module passes L3. The profile +/// `Device::from_queries` derives never takes the 16-bit form: there every device receives the +/// `half` widened. #[test] -fn a_half_color_output_is_declared_32_bit_on_every_device() { +fn a_half_color_output_is_declared_16_bit_where_the_device_enables_it() { + use crate::device::profile::HalfOutputs; use crate::device::requirements::VkFeature; + use crate::lower::select::LowerInputs; + use crate::pipeline::testing::compile_with; let Some(bc) = fixture() else { return }; + let color = VaryingKey::color(0, 0); let mut seen = [false; 2]; for stem in ["moltenvk-m3", "amd-rdna3-radv", "lavapipe"] { let p = prof(stem); - let enabled = &p.enabled().features; - let sixteen = enabled.contains(&VkFeature::StorageInputOutput16) && p.fields().leaf.float16; + let leaf = p.fields().leaf; + let sixteen = p.half_outputs() == HalfOutputs::Sixteen + && (p.fields().enabled.features).contains(&VkFeature::StorageInputOutput16) + && leaf.float16; seen[usize::from(sixteen)] = true; - for function in ["stage_io_fragment_point", "stage_io_fragment"] { - let f = compile(&bc, function, &p).expect(function); - let words = validate(&f, &alone(&f, &p), &p); - assert!( - output_widths(&words).iter().all(|w| *w == 32), - "{stem} {function}" - ); - let io16 = f + let half = compile(&bc, "stage_io_fragment_point", &p).expect("half"); + let words = validate(&half, &alone(&half, &p), &p); + let io16 = half + .requirements + .features + .contains(&VkFeature::StorageInputOutput16); + match sixteen { + true => { + assert_eq!( + half.interface.io.half_outputs, + std::slice::from_ref(&color), + "{stem}" + ); + assert_eq!(output_widths(&words), [16], "{stem}"); + assert!(io16, "{stem}: {:?}", half.requirements.features); + } + false => { + assert!(half.interface.io.half_outputs.is_empty(), "{stem}"); + assert_eq!(output_widths(&words), [32], "{stem}"); + assert!(!io16, "{stem}"); + } + } + let float = compile(&bc, "stage_io_fragment", &p).expect("float"); + assert!(float.interface.io.half_outputs.is_empty(), "{stem}"); + let words = validate(&float, &alone(&float, &p), &p); + assert!(output_widths(&words).iter().all(|w| *w == 32), "{stem}"); + let mut inputs = LowerInputs::new(); + inputs.rotated_colors.insert(0); + let rotated = compile_with(&bc, "stage_io_fragment_point", &p, &inputs).expect("rotated"); + assert!(rotated.interface.io.half_outputs.is_empty(), "{stem}"); + let desc = crate::pipeline::testing::description(stem).expect("description"); + let queried = crate::device::Device::from_queries(desc, DevicePolicy::default()) + .expect("from_queries") + .profile() + .clone(); + assert_eq!(queried.half_outputs(), HalfOutputs::Widened, "{stem}"); + let half = compile(&bc, "stage_io_fragment_point", &queried).expect("queried half"); + let words = validate(&half, &alone(&half, &queried), &queried); + assert!(half.interface.io.half_outputs.is_empty(), "{stem}"); + assert_eq!(output_widths(&words), [32], "{stem}"); + assert!( + !half .requirements .features - .contains(&VkFeature::StorageInputOutput16); - assert!(!io16, "{stem} {function}: {:?}", f.requirements.features); - } + .contains(&VkFeature::StorageInputOutput16), + "{stem}" + ); } assert_eq!(seen, [true, true], "both kinds of profile are exercised"); } diff --git a/docs/API.md b/docs/API.md index 465f29540..b34122fa0 100644 --- a/docs/API.md +++ b/docs/API.md @@ -5160,8 +5160,11 @@ bound. and records nothing; so does the blend of a fetched 8-bit unorm attachment it computes there (every factor, operation, write mask and blend color it builds), which Metal reads the output into clamped, folding none of it (the storage image's store of its result is the device's - conversion, `DeviceColorConversion`). The output reaches every device widened to a 32-bit - `float`, which holds every `half` exactly. + conversion, `DeviceColorConversion`). On a device that enables `storageInputOutput16` the output + reaches the device as a 16-bit `half` under `Device::new` (`StageIo::half_outputs`; under + `Device::from_queries` every device receives it widened to `float`); MoltenVK 1.4.2 on an Apple M3 + Max then stores Metal's codes for a loaded `half4` under every blend measured (21, into 16- and + 32-bit float formats). - `metal2vulkan-degrade-device-sampling` (precision). `PrecisionNote::DeviceSampling`: Native device sampling: the module hands a sample, gather, comparison or level query to the device's own sampler on a device whose sampler is not Metal's (the module requires diff --git a/docs/CONFORMANCE-COVERAGE.md b/docs/CONFORMANCE-COVERAGE.md index 13d7c8f8c..fea0cc9f7 100644 --- a/docs/CONFORMANCE-COVERAGE.md +++ b/docs/CONFORMANCE-COVERAGE.md @@ -44,7 +44,7 @@ Its limits, measured rather than asserted: | committed recordings | 1277 | | distinct SDK items the Metal leg reaches, of any status | 822 | | of those, reached only where this cannot name the family | 3 | -| ledger rows (a case whose gap is recorded) | 3783 | +| ledger rows (a case whose gap is recorded) | 3731 | | 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 | @@ -2373,23 +2373,6 @@ A case whose difference from Metal is recorded rather than compared away. The le | `blend-interaction-format-srgb8` | Metal's stored sRGB code and ours differ at this site, and the row's count and bound are this run's. Two of the device's own answers meet in it. The device enco… | | `blend-interaction-format-srgb8` | Metal's stored sRGB code and ours differ at this site, and the row's count and bound are this run's. Two of the device's own answers meet in it. The device enco… | | `blend-sweep-operations` | Metal stores a negative zero where we store a positive one: the first differing element is Metal 0x80000000 against our 0x0, and all four of the site's elements… | -| `half-output-blends-r16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-r16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-r16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-r16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-r16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-r16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-r16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-r16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-r16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-r16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-r16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-r16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-r16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-r16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-r16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-r16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-r16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | | `half-output-blends-r16f` | Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its fo… | | `half-output-blends-r16f` | Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its fo… | | `half-output-blends-r16f` | Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its fo… | @@ -2431,23 +2414,6 @@ A case whose difference from Metal is recorded rather than compared away. The le | `half-output-blends-r32f` | Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its fo… | | `half-output-blends-r32f` | Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its fo… | | `half-output-blends-r32f` | Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its fo… | -| `half-output-blends-rg16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rg16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rg16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rg16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rg16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rg16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rg16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rg16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rg16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rg16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rg16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rg16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rg16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rg16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rg16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rg16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rg16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | | `half-output-blends-rg16f` | Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its fo… | | `half-output-blends-rg16f` | Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its fo… | | `half-output-blends-rg16f` | Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its fo… | @@ -2494,24 +2460,6 @@ A case whose difference from Metal is recorded rather than compared away. The le | `half-output-blends-rg32f` | Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its fo… | | `half-output-blends-rg32f` | Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its fo… | | `half-output-blends-rg32f` | Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its fo… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | -| `half-output-blends-rgba16f` | TEST VENUE, NOT A PRODUCT GAP: MoltenVK on the Apple M3 Max is a test venue, so this row records the venue's answer and no precision note or README entry carrie… | | `half-output-blends-rgba16f` | Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its fo… | | `half-output-blends-rgba16f` | Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its fo… | | `half-output-blends-rgba16f` | Metal's stored blend result and ours differ at this site, and the row's count and bound are this run's. Metal's compiler folds the attachment's blend and its fo… | diff --git a/docs/FAST-PATHS.md b/docs/FAST-PATHS.md index c89d8fc70..b89770d3f 100644 --- a/docs/FAST-PATHS.md +++ b/docs/FAST-PATHS.md @@ -91,7 +91,7 @@ known. The rest of the differences are docs/API.md section 9's precision notes. | On RADV, a perspective input read at a sample or an offset (`interpolate_at_sample`, `interpolate_at_offset`, and a sample-qualified varying a function looping over its covered samples reads at each pass's sample) is the driver's value at the pixel center extrapolated along the quad's coarse derivatives, a first-order answer, where Metal interpolates in perspective at the location. It is off by the value's curvature across the distance: on the pull-model lane's triangle (clip `w` 1, 2 and 4 over a 6x6 target) up to about 1.0 in a lane whose vertices hand 3, -2 and 0.5, on the Radeon 780M with Mesa 26.2.6. A no-perspective input is exact there. | The device's interpolation is the only form (Vulkan states no precision for it); computing the perspective division in the shader would replace it. | `ExtrapolatedInterpolation` (`extrapolated-interpolation`) | | `interpolate_at_offset` reads at the offset moved to the device's origin and clamped to its `[minInterpolationOffset, maxInterpolationOffset]`, which Vulkan requires, and the device rounds it to its `subPixelInterpolationOffsetBits`; Metal reads at the offset as given, from the pixel's corner, at any distance and on no grid (an Apple M3 Max). Within the range the read lies within half a grid step of Metal's (MoltenVK: Metal's, its range `[-1/16, 15/16]` from the corner); past it, at the range's nearer end. | Vulkan states the range and the grid; no exact form reads past them. | `DeviceInterpolationOffset` (`device-interpolation-offset`) | | Every device but MoltenVK on Apple's GPUs of the Apple M3 Max's macOS 27 identity covers by alpha (`alphaToCoverageEnabled`) by its own algorithm: lavapipe takes a 2x2 ordered dither at one sample too, where Metal covers a pixel there only above an alpha of 1/2, so a whole fragment is stored or dropped between a pixel's threshold and 1/2; at four samples it is Metal's but within an `f32` ulp of a threshold, one sample apart. MoltenVK hands the field to Metal. | The device's coverage is its native answer, and Vulkan specifies no algorithm for it; Metal's dither computed in the shader would emulate the device's own coverage. | `DeviceAlphaCoverage` (`device-alpha-coverage`) | -| A fast-math function's `half` color into a blend: within three `half` ulps (16-bit float) or two `float` ulps (32-bit float). A fetched 16-bit float attachment's blend, computed in the pixel interlock, where Metal folds the output's own arithmetic into it or regroups it: within 2 `half` ulps at the operands' magnitude, 16 at the stored value's under cancellation; exact elsewhere. | Metal's compiler regroups the blend per pipeline, following its passes over the whole function: a form the blend state decides is Metal's only where it is measured, and a lane of the output the compiler can fold into the blend has no form at all. Two 16-bit float states are measured, and a fetched attachment's blend takes Metal's forms there; `SourceAlphaSaturated` over `OneMinusSourceAlpha` shows why the rest are not, Metal rounding the destination's product first at one and four channels and the source's at two. Every device receives the output widened to a 32-bit `float`, which holds every `half` exactly. | `HalfOutputFastMathBlend` (`half-output-fast-math-blend`) | +| A fast-math function's `half` color into a blend: within three `half` ulps (16-bit float) or two `float` ulps (32-bit float). A fetched 16-bit float attachment's blend, computed in the pixel interlock, where Metal folds the output's own arithmetic into it or regroups it: within 2 `half` ulps at the operands' magnitude, 16 at the stored value's under cancellation; exact elsewhere. | Metal's compiler regroups the blend per pipeline, following its passes over the whole function: a form the blend state decides is Metal's only where it is measured, and a lane of the output the compiler can fold into the blend has no form at all. Two 16-bit float states are measured, and a fetched attachment's blend takes Metal's forms there; `SourceAlphaSaturated` over `OneMinusSourceAlpha` shows why the rest are not, Metal rounding the destination's product first at one and four channels and the source's at two. A device that enables `storageInputOutput16` receives the output as a 16-bit `half` under `Device::new` (`StageIo::half_outputs`; under `Device::from_queries` every device receives it widened to `float`): MoltenVK 1.4.2 on the M3 Max then stores Metal's codes at every word of `half-output-blends-*` (a loaded `half4`, 21 blends into 16- and 32-bit float formats). | `HalfOutputFastMathBlend` (`half-output-fast-math-blend`) | | A fetched blended attachment of a format whose Metal blend arithmetic is not built (16-bit normalized, 8-bit signed normalized, 10-bit, packed float, `A8Unorm`; an 8-bit unorm one through fewer than four output lanes; a 32-bit float one (`R32Float`, `RG32Float`, `RGBA32Float`); a 16-bit float or 8-bit unorm one under a blend of the second source), on a device that orders fetch only through the pixel interlock (MoltenVK, RADV, ANV): the shader blends in `float`, each step rounded, the source and blend color clamped to a normalized format's range, the device's conversion storing the result. An 8-bit sRGB one under a blend of the second source, a one- or two-channel one under a fast-math lerp, and one written by an output of fewer than four lanes: the 8-bit unorm blend's rounded forms over the decoded texel, encoded by Metal's table (Metal's without fast math, at four lanes). Bound not measured. | No Vulkan blend applies to the interlock's storage write, and Metal's blend arithmetic for these formats is not measured, so no exact form is known. A 32-bit float attachment's blend in `float` is the device's own arithmetic, as its blend unit would compute it (every committed profile but the Vulkan 1.2 floor blends the three formats; a pipeline whose attachment is not fetched takes that blend). | `UnmeasuredFetchBlend` (`unmeasured-fetch-blend`) | | A framebuffer fetch on a device with neither rasterization-order color attachment access nor `fragmentShaderPixelInterlock` (Honeykrisp on Apple's M2 Pro; RADV on the RX 550) reads the attachment as an input attachment, ordered after every earlier draw by a barrier between the draws (`WorkCounts::fetch_draw_barriers`) but not after an overlapping earlier fragment of its own draw, which Metal orders in primitive order. Exact for a draw whose primitives do not overlap at a pixel. | Vulkan orders an input attachment read after an overlapping earlier fragment of the same draw only through rasterization-order attachment access, and a storage read only inside the pixel interlock; the device has neither. Drawing each primitive as a draw of its own behind a barrier would order them, at a draw and a barrier per primitive; that form is not built. | `UnorderedFetchWithinDraw` (`unordered-fetch-within-draw`) | | A color blended into an extended-range attachment (`BGR10_XR`, `BGRA10_XR`, `RGB10A8_2P_XR10` and their sRGB twins) or a padded 10-bit one (`R10Unorm_X6`, `RG10Unorm_X12`, their sRGB twins, `RGB10A2Unorm_sRGB`) is blended in the shader over an ordered read of the attachment (inside the pixel interlock, or over its rasterization-order input attachment), in the device's arithmetic: `S·Fs op D·Fd` in `float`, in the blend equation's order, `1 - x` in `float`, `SourceAlphaSaturated` `min(sa, 1 - da)`, the source, second source and blend color clamped to the format's range first (a NaN to its low end; a padded format's not clamped, as Metal clamps none there), then encoded as the kernel write encodes. The device's compiler may contract and regroup it: MoltenVK on the M3 Max and NVIDIA's driver on an RTX 5080 compute `S·F + D·(1 - F)` as `D + F·(S - D)`. Every device. Measured against Metal by the conformance suite's extended-range and padded blend cases: a stored channel within two codes of Metal's on a linear format and within six on an sRGB twin near zero, and where the device's compiler regroups a padded format's blend, an infinite second source stores the end code its sign picks where Metal's sum is NaN, stored as code 0. | No device's blend unit reads the format's raw codes, so the shader blends (capability), and its arithmetic is the device's: Metal's compiler fuses the blend into the function, regroups it and rounds each step to `half`, a form no device has natively. | `ExtendedRangeBlendSource` (`extended-range-blend-source`), `ExtendedRangeFloatBlendSource` (`extended-range-float-blend-source`) |