From bb96884232f0abdb41ff073d451d30f17d60028b Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Fri, 20 Nov 2026 14:39:23 -0800 Subject: [PATCH] conformance: the device line rule is a native note; the line ties' rows The replays of a2476a2e76 (m3-max-60395 lavapipe, 60396 RTX 3090, 60397 RX 550, 60399 Iris Xe) were checked against the case. With Bresenham's rule, primitive-type-restart-indices' Line and LineStrip cells are Metal's on lavapipe. On the RTX 3090, the RX 550 and the Iris Xe each differs by two texels at the boundary point (3.5, 1.0), the same four rows on all three venues: the diamond-vertex tie, where Metal covers the lower pixel and the device the upper. These are accepted-difference rows, venues NVIDIA, RX 550 and Iris(R) Xe, under docs/API.md section 10's new sentence (a line's tie-break is the device's own). Every alpha-to-coverage and alpha-to-one case announced the new metal2vulkan-degrade-device-line-rasterization (a2c-on-*, a2one-on-*: 11 rows a venue), which no case declared. The note is the device's own line rule, the one form such a state draws lines in, so it joins the suite's native notes (replay::NATIVE_NOTES), declared for every case beside device-alpha-coverage. A case never names one itself (no_case_names_a_native_note). --- crates/metal2vulkan-conformance/known-gaps-rt.tsv | 12 ++++++++++++ crates/metal2vulkan-conformance/src/replay.rs | 6 +++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/crates/metal2vulkan-conformance/known-gaps-rt.tsv b/crates/metal2vulkan-conformance/known-gaps-rt.tsv index f85e34b11..e4dd7ee66 100644 --- a/crates/metal2vulkan-conformance/known-gaps-rt.tsv +++ b/crates/metal2vulkan-conformance/known-gaps-rt.tsv @@ -7530,3 +7530,15 @@ bicubic-texel-classes Iris(R) Xe divergent case/rgba16float/sampled 500 elements bicubic-texel-classes Iris(R) Xe divergent case/rgba16unorm/sampled 496 elements differ (F32), the largest difference 0.000007758848369121552 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note. bicubic-texel-classes Iris(R) Xe divergent case/rgba8snorm/sampled 756 elements differ (F32), the largest difference 0.00048828125 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note. bicubic-texel-classes Iris(R) Xe divergent case/rgba8unorm/sampled 494 elements differ (F32), the largest difference 0.000244140625 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note. +primitive-type-restart-indices NVIDIA divergent case/MTLPrimitiveTypeLine/MTLIndexTypeUInt16/texels 2 elements differ (U32), the largest difference 3 An accepted difference (docs/API.md section 10, Draws: a line's tie-break is the device's own): the line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), where it only touches the diamonds of the two pixels the point joins, and Vulkan's Bresenham diamond is open, so no Vulkan control decides which a conforming driver covers. With Bresenham's rule on (bresenhamLines, the runtime's floor), Metal on the Apple M3 Max covers the lower pixel and NVIDIA's driver (the RTX 3090, 620.70.06) the upper (row 0, column 3); lavapipe covers Metal's. +primitive-type-restart-indices NVIDIA divergent case/MTLPrimitiveTypeLine/MTLIndexTypeUInt32/texels 2 elements differ (U32), the largest difference 4 An accepted difference (docs/API.md section 10, Draws: a line's tie-break is the device's own): the line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), where it only touches the diamonds of the two pixels the point joins, and Vulkan's Bresenham diamond is open, so no Vulkan control decides which a conforming driver covers. With Bresenham's rule on (bresenhamLines, the runtime's floor), Metal on the Apple M3 Max covers the lower pixel and NVIDIA's driver (the RTX 3090, 620.70.06) the upper (row 0, column 3); lavapipe covers Metal's. +primitive-type-restart-indices NVIDIA divergent case/MTLPrimitiveTypeLineStrip/MTLIndexTypeUInt16/texels 2 elements differ (U32), the largest difference 5 An accepted difference (docs/API.md section 10, Draws: a line's tie-break is the device's own): the line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), where it only touches the diamonds of the two pixels the point joins, and Vulkan's Bresenham diamond is open, so no Vulkan control decides which a conforming driver covers. With Bresenham's rule on (bresenhamLines, the runtime's floor), Metal on the Apple M3 Max covers the lower pixel and NVIDIA's driver (the RTX 3090, 620.70.06) the upper (row 0, column 3); lavapipe covers Metal's. +primitive-type-restart-indices NVIDIA divergent case/MTLPrimitiveTypeLineStrip/MTLIndexTypeUInt32/texels 2 elements differ (U32), the largest difference 6 An accepted difference (docs/API.md section 10, Draws: a line's tie-break is the device's own): the line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), where it only touches the diamonds of the two pixels the point joins, and Vulkan's Bresenham diamond is open, so no Vulkan control decides which a conforming driver covers. With Bresenham's rule on (bresenhamLines, the runtime's floor), Metal on the Apple M3 Max covers the lower pixel and NVIDIA's driver (the RTX 3090, 620.70.06) the upper (row 0, column 3); lavapipe covers Metal's. +primitive-type-restart-indices RX 550 divergent case/MTLPrimitiveTypeLine/MTLIndexTypeUInt16/texels 2 elements differ (U32), the largest difference 3 An accepted difference (docs/API.md section 10, Draws: a line's tie-break is the device's own): the line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), where it only touches the diamonds of the two pixels the point joins, and Vulkan's Bresenham diamond is open, so no Vulkan control decides which a conforming driver covers. With Bresenham's rule on (bresenhamLines, the runtime's floor), Metal on the Apple M3 Max covers the lower pixel and RADV on the RX 550 the upper (row 0, column 3); lavapipe covers Metal's. +primitive-type-restart-indices RX 550 divergent case/MTLPrimitiveTypeLine/MTLIndexTypeUInt32/texels 2 elements differ (U32), the largest difference 4 An accepted difference (docs/API.md section 10, Draws: a line's tie-break is the device's own): the line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), where it only touches the diamonds of the two pixels the point joins, and Vulkan's Bresenham diamond is open, so no Vulkan control decides which a conforming driver covers. With Bresenham's rule on (bresenhamLines, the runtime's floor), Metal on the Apple M3 Max covers the lower pixel and RADV on the RX 550 the upper (row 0, column 3); lavapipe covers Metal's. +primitive-type-restart-indices RX 550 divergent case/MTLPrimitiveTypeLineStrip/MTLIndexTypeUInt16/texels 2 elements differ (U32), the largest difference 5 An accepted difference (docs/API.md section 10, Draws: a line's tie-break is the device's own): the line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), where it only touches the diamonds of the two pixels the point joins, and Vulkan's Bresenham diamond is open, so no Vulkan control decides which a conforming driver covers. With Bresenham's rule on (bresenhamLines, the runtime's floor), Metal on the Apple M3 Max covers the lower pixel and RADV on the RX 550 the upper (row 0, column 3); lavapipe covers Metal's. +primitive-type-restart-indices RX 550 divergent case/MTLPrimitiveTypeLineStrip/MTLIndexTypeUInt32/texels 2 elements differ (U32), the largest difference 6 An accepted difference (docs/API.md section 10, Draws: a line's tie-break is the device's own): the line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), where it only touches the diamonds of the two pixels the point joins, and Vulkan's Bresenham diamond is open, so no Vulkan control decides which a conforming driver covers. With Bresenham's rule on (bresenhamLines, the runtime's floor), Metal on the Apple M3 Max covers the lower pixel and RADV on the RX 550 the upper (row 0, column 3); lavapipe covers Metal's. +primitive-type-restart-indices Iris(R) Xe divergent case/MTLPrimitiveTypeLine/MTLIndexTypeUInt16/texels 2 elements differ (U32), the largest difference 3 An accepted difference (docs/API.md section 10, Draws: a line's tie-break is the device's own): the line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), where it only touches the diamonds of the two pixels the point joins, and Vulkan's Bresenham diamond is open, so no Vulkan control decides which a conforming driver covers. With Bresenham's rule on (bresenhamLines, the runtime's floor), Metal on the Apple M3 Max covers the lower pixel and ANV on the Iris Xe the upper (row 0, column 3); lavapipe covers Metal's. +primitive-type-restart-indices Iris(R) Xe divergent case/MTLPrimitiveTypeLine/MTLIndexTypeUInt32/texels 2 elements differ (U32), the largest difference 4 An accepted difference (docs/API.md section 10, Draws: a line's tie-break is the device's own): the line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), where it only touches the diamonds of the two pixels the point joins, and Vulkan's Bresenham diamond is open, so no Vulkan control decides which a conforming driver covers. With Bresenham's rule on (bresenhamLines, the runtime's floor), Metal on the Apple M3 Max covers the lower pixel and ANV on the Iris Xe the upper (row 0, column 3); lavapipe covers Metal's. +primitive-type-restart-indices Iris(R) Xe divergent case/MTLPrimitiveTypeLineStrip/MTLIndexTypeUInt16/texels 2 elements differ (U32), the largest difference 5 An accepted difference (docs/API.md section 10, Draws: a line's tie-break is the device's own): the line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), where it only touches the diamonds of the two pixels the point joins, and Vulkan's Bresenham diamond is open, so no Vulkan control decides which a conforming driver covers. With Bresenham's rule on (bresenhamLines, the runtime's floor), Metal on the Apple M3 Max covers the lower pixel and ANV on the Iris Xe the upper (row 0, column 3); lavapipe covers Metal's. +primitive-type-restart-indices Iris(R) Xe divergent case/MTLPrimitiveTypeLineStrip/MTLIndexTypeUInt32/texels 2 elements differ (U32), the largest difference 6 An accepted difference (docs/API.md section 10, Draws: a line's tie-break is the device's own): the line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), where it only touches the diamonds of the two pixels the point joins, and Vulkan's Bresenham diamond is open, so no Vulkan control decides which a conforming driver covers. With Bresenham's rule on (bresenhamLines, the runtime's floor), Metal on the Apple M3 Max covers the lower pixel and ANV on the Iris Xe the upper (row 0, column 3); lavapipe covers Metal's. diff --git a/crates/metal2vulkan-conformance/src/replay.rs b/crates/metal2vulkan-conformance/src/replay.rs index 66fd030d8..3a93b53e8 100644 --- a/crates/metal2vulkan-conformance/src/replay.rs +++ b/crates/metal2vulkan-conformance/src/replay.rs @@ -459,7 +459,10 @@ pub fn reads_opaque_black_border(spec: &crate::case::SamplerSpec) -> bool { /// reads and stores a signed lowest code as the code above it); /// - **resolves**: `device-rounded-resolve`; /// - **coverage**: the device's own conversion of a fragment's alpha to its coverage under -/// alpha-to-coverage (`device-alpha-coverage`). +/// alpha-to-coverage (`device-alpha-coverage`); +/// - **lines**: the device's own line rule, the one form a state that enables alpha to coverage or +/// alpha to one draws its lines in, Vulkan's Bresenham mode taking neither +/// (`device-line-rasterization`), announced by every such state whether or not it draws lines. /// /// **What is not here**, and stays each case's to declare: a note of what the device **lacks** /// (`device-signed-zero-inf-nan`, `device-anisotropic-filter`, `device-point-size`, @@ -511,6 +514,7 @@ pub const NATIVE_NOTES: &[crate::degradation::Degradation] = { D::NativeLogicOperation, D::DeviceRoundedResolve, D::DeviceAlphaCoverage, + D::DeviceLineRasterization, ] };