From f21db0934cdb87f89d573c0eb6f9514a3e4d8933 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sun, 22 Nov 2026 13:02:13 -0800 Subject: [PATCH] Conformance: the stage-in cases' lavapipe answers, and StageInKind's doc no longer opens a list The first replay of the stage-in cases through the runtime on lavapipe (llvmpipe, Mesa 26.2.4, job m3-max-68623) compared every row the old refusal had hidden. stage-in-region-clamps was refused at its one indirect row alone (its 27 other rows Metal's), attribute-format-class-crossings exact, and twelve sites differed, each now a ledger row or a declaration: - The three cases over stage_in_fetch_wide declare simdgroup-access-order, as the other cases whose kernels store at an index of the grid's width do: the runtime's pipelines note the store's SIMD-group access pairs on every device. It loosens the notices site alone. - attribute-format-fetches, five normalized 8-bit formats, on every venue: the pulled fetch's own product of the code and its maximum's reciprocal, which DeviceVertexConversion's recorded bound computes one f32 ulp high of Metal's quotient at 126 of the 256 unsigned codes (127 reads 0x3efeff00 where Metal reads 0x3efefeff). - attribute-format-fetches, the half and RG11B10 formats, on llvmpipe: the device's widening keeps a NaN's payload (0x7fc02000, 0x7ffe0000) where Metal reads 0x7fc00000, under DeviceNanEncoding. Each GPU's rows follow from its own replay. clippy refused StageInKind::IndexedStepRate's doc, whose second line began "1. ", a list item (doc_lazy_continuation, the same job); it is reworded. --- .../metal2vulkan-conformance/known-gaps-rt.tsv | 10 ++++++++++ .../src/cases/attribute_formats.rs | 16 ++++++++++++++++ .../src/cases/stage_in_unread.rs | 8 ++++++++ crates/metal2vulkan-runtime/src/error.rs | 6 +++--- docs/CONFORMANCE-COVERAGE.md | 12 +++++++++++- 5 files changed, 48 insertions(+), 4 deletions(-) diff --git a/crates/metal2vulkan-conformance/known-gaps-rt.tsv b/crates/metal2vulkan-conformance/known-gaps-rt.tsv index 3cb6a754c..808fe0042 100644 --- a/crates/metal2vulkan-conformance/known-gaps-rt.tsv +++ b/crates/metal2vulkan-conformance/known-gaps-rt.tsv @@ -7998,3 +7998,13 @@ pixel-samplers-rgba16f-nearest-zero NVIDIA divergent case/output/norm the digest pixel-samplers-rgba16f-nearest-zero RX 550 divergent case/output/norm the digest is 3288187d8ade9557ef4b727bf31750abd8136d15c98b6d29b17ccf6423c0d497 on Metal and 181213b4f4895852c79d14b069dde19b045933de9743eec64b2aff176b053e70 here The device's own answer (rule 1): `norm` differs from Metal's (`arg`, `const` and `slot` read Metal's answer). The device's nearest filter at the normalized coordinate over the size (`norm`, the case's control), where the sources that hand the device a texel's centre or the coordinate itself read Metal's texels. Note `device-sampling`. The site records a digest alone, so the run names no coordinate. pixel-samplers-rgba16f-nearest-zero Iris(R) Xe divergent case/output/norm the digest is 3288187d8ade9557ef4b727bf31750abd8136d15c98b6d29b17ccf6423c0d497 on Metal and 18ed16e2998cc7c3d87dee548216bd6f3bdff85329f9a3ce3025330f3bcd0c0f here The device's own answer (rule 1): `norm` differs from Metal's (`arg`, `const` and `slot` read Metal's answer). The device's nearest filter at the normalized coordinate over the size (`norm`, the case's control), where the sources that hand the device a texel's centre or the coordinate itself read Metal's texels. Note `device-sampling`. The site records a digest alone, so the run names no coordinate. stage-in-region-clamps * refused case/x_ind_r6_g8/dispatch Err(Error::Unsupported("a kernel's stage input of a form not built yet: IndirectRegion")) refused: no stream uses it yet (four-case census, m3-max-62954..62957: 35 streams, no setStageInRegionWithIndirectBuffer:indirectBufferOffset:). rt refuses the call (Gap::StageIn, StageInKind::IndirectRegion: a stage-in region the GPU reads is not built); rt README, Known gaps of compute. +attribute-format-fetches llvmpipe divergent case/MTLAttributeFormatFloatRG11B10/attribute0/MTLAttributeFormatFloatRG11B10 9 elements differ (U32), the largest difference 4063232 The device's own answer (rule 1): a NaN of a `half` or `RG11B10` stage-in attribute widened by the shader's fetch on the device keeps its payload where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0x7ffe0000 at the first differing element. Note `device-nan-encoding`. +attribute-format-fetches llvmpipe divergent case/MTLAttributeFormatHalf/attribute0/MTLAttributeFormatHalf 2 elements differ (U32), the largest difference 2147491840 The device's own answer (rule 1): a NaN of a `half` or `RG11B10` stage-in attribute widened by the shader's fetch on the device keeps its payload where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0x7fc02000 at the first differing element. Note `device-nan-encoding`. +attribute-format-fetches llvmpipe divergent case/MTLAttributeFormatHalf2/attribute0/MTLAttributeFormatHalf2 4 elements differ (U32), the largest difference 2147491840 The device's own answer (rule 1): a NaN of a `half` or `RG11B10` stage-in attribute widened by the shader's fetch on the device keeps its payload where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0x7fc02000 at the first differing element. Note `device-nan-encoding`. +attribute-format-fetches llvmpipe divergent case/MTLAttributeFormatHalf3/attribute0/MTLAttributeFormatHalf3 6 elements differ (U32), the largest difference 2147491840 The device's own answer (rule 1): a NaN of a `half` or `RG11B10` stage-in attribute widened by the shader's fetch on the device keeps its payload where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0x7fc02000 at the first differing element. Note `device-nan-encoding`. +attribute-format-fetches llvmpipe divergent case/MTLAttributeFormatHalf4/attribute0/MTLAttributeFormatHalf4 8 elements differ (U32), the largest difference 2147491840 The device's own answer (rule 1): a NaN of a `half` or `RG11B10` stage-in attribute widened by the shader's fetch on the device keeps its payload where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0x7fc02000 at the first differing element. Note `device-nan-encoding`. +attribute-format-fetches * divergent case/MTLAttributeFormatUChar2Normalized/attribute0/MTLAttributeFormatUChar2Normalized 8 elements differ (U32), the largest difference 1 A conversion answer (rule 1) under its static note: the pulled fetch's own product of the code and its maximum's reciprocal, rounded once, which the note's recorded bound computes one f32 ulp high of Metal's quotient at 126 of the 256 8-bit unsigned codes, on every device. Metal reads 0x3efefeff, we read 0x3efeff00 at the first differing element. Note `device-vertex-conversion`. +attribute-format-fetches * divergent case/MTLAttributeFormatUChar3Normalized/attribute0/MTLAttributeFormatUChar3Normalized 12 elements differ (U32), the largest difference 1 A conversion answer (rule 1) under its static note: the pulled fetch's own product of the code and its maximum's reciprocal, rounded once, which the note's recorded bound computes one f32 ulp high of Metal's quotient at 126 of the 256 8-bit unsigned codes, on every device. Metal reads 0x3efefeff, we read 0x3efeff00 at the first differing element. Note `device-vertex-conversion`. +attribute-format-fetches * divergent case/MTLAttributeFormatUChar4Normalized/attribute0/MTLAttributeFormatUChar4Normalized 16 elements differ (U32), the largest difference 1 A conversion answer (rule 1) under its static note: the pulled fetch's own product of the code and its maximum's reciprocal, rounded once, which the note's recorded bound computes one f32 ulp high of Metal's quotient at 126 of the 256 8-bit unsigned codes, on every device. Metal reads 0x3efefeff, we read 0x3efeff00 at the first differing element. Note `device-vertex-conversion`. +attribute-format-fetches * divergent case/MTLAttributeFormatUChar4Normalized_BGRA/attribute0/MTLAttributeFormatUChar4Normalized_BGRA 16 elements differ (U32), the largest difference 1 A conversion answer (rule 1) under its static note: the pulled fetch's own product of the code and its maximum's reciprocal, rounded once, which the note's recorded bound computes one f32 ulp high of Metal's quotient at 126 of the 256 8-bit unsigned codes, on every device. Metal reads 0x3f48c8c9, we read 0x3f48c8ca at the first differing element. Note `device-vertex-conversion`. +attribute-format-fetches * divergent case/MTLAttributeFormatUCharNormalized/attribute0/MTLAttributeFormatUCharNormalized 4 elements differ (U32), the largest difference 1 A conversion answer (rule 1) under its static note: the pulled fetch's own product of the code and its maximum's reciprocal, rounded once, which the note's recorded bound computes one f32 ulp high of Metal's quotient at 126 of the 256 8-bit unsigned codes, on every device. Metal reads 0x3efefeff, we read 0x3efeff00 at the first differing element. Note `device-vertex-conversion`. diff --git a/crates/metal2vulkan-conformance/src/cases/attribute_formats.rs b/crates/metal2vulkan-conformance/src/cases/attribute_formats.rs index 4444b9f1c..f892dd18c 100644 --- a/crates/metal2vulkan-conformance/src/cases/attribute_formats.rs +++ b/crates/metal2vulkan-conformance/src/cases/attribute_formats.rs @@ -515,6 +515,14 @@ impl Case for AttributeFormats { MetalSource::Run } + fn allowances(&self) -> Vec { + // One declaration, which loosens no value: `stage_in_fetch_wide` stores at an index of the + // grid's width, which the translator does not find disjoint between two threads of one + // SIMD-group, so the runtime's pipelines note SIMD-group access pairs on every device + // (`crate::replay::simdgroup_access_order_notice`). + vec![crate::replay::simdgroup_access_order_notice()] + } + fn shaders(&self) -> Result, String> { let mut shaders = Vec::new(); for extension in [RUNTIME_TEXT, METAL_TEXT] { @@ -699,6 +707,14 @@ impl Case for ClassCrossings { MetalSource::Run } + fn allowances(&self) -> Vec { + // One declaration, which loosens no value: `stage_in_fetch_wide` stores at an index of the + // grid's width, which the translator does not find disjoint between two threads of one + // SIMD-group, so the runtime's pipelines note SIMD-group access pairs on every device + // (`crate::replay::simdgroup_access_order_notice`). + vec![crate::replay::simdgroup_access_order_notice()] + } + fn shaders(&self) -> Result, String> { AttributeFormats.shaders() } diff --git a/crates/metal2vulkan-conformance/src/cases/stage_in_unread.rs b/crates/metal2vulkan-conformance/src/cases/stage_in_unread.rs index 140f66826..b9eb2e9b4 100644 --- a/crates/metal2vulkan-conformance/src/cases/stage_in_unread.rs +++ b/crates/metal2vulkan-conformance/src/cases/stage_in_unread.rs @@ -821,6 +821,14 @@ impl Case for StageInUnread { MetalSource::Run } + fn allowances(&self) -> Vec { + // One declaration, which loosens no value: `stage_in_fetch_wide` stores at an index of the + // grid's width, which the translator does not find disjoint between two threads of one + // SIMD-group, so the runtime's pipelines note SIMD-group access pairs on every device + // (`crate::replay::simdgroup_access_order_notice`). + vec![crate::replay::simdgroup_access_order_notice()] + } + fn shaders(&self) -> Result, String> { let fixture = Self::fixture(); let mut shaders = Vec::new(); diff --git a/crates/metal2vulkan-runtime/src/error.rs b/crates/metal2vulkan-runtime/src/error.rs index ebcb8187c..d93e849ac 100644 --- a/crates/metal2vulkan-runtime/src/error.rs +++ b/crates/metal2vulkan-runtime/src/error.rs @@ -1722,9 +1722,9 @@ pub enum StageInKind { /// encoder does not have. DynamicStride, /// An attribute the kernel reads through a layout of an indexed step - /// (`MTLStepFunctionThreadPositionInGridXIndexed` or `...YIndexed`) at a step rate other than - /// 1. Metal's counterpart is the compute pipeline state's make of that - /// `stageInputDescriptor`. + /// (`MTLStepFunctionThreadPositionInGridXIndexed` or `...YIndexed`) at a step rate past 1, whose + /// Metal answer is not measured. Metal's counterpart is the compute pipeline state's make of + /// that `stageInputDescriptor`. IndexedStepRate, } diff --git a/docs/CONFORMANCE-COVERAGE.md b/docs/CONFORMANCE-COVERAGE.md index 9f4cf9d5b..6a0e2f5ff 100644 --- a/docs/CONFORMANCE-COVERAGE.md +++ b/docs/CONFORMANCE-COVERAGE.md @@ -42,7 +42,7 @@ Its limits, measured rather than asserted: | committed recordings | 1325 | | distinct SDK items the Metal leg reaches, of any status | 808 | | of those, reached only where this cannot name the family | 5 | -| ledger rows (a case whose gap is recorded) | 7943 | +| ledger rows (a case whose gap is recorded) | 7953 | | 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 | @@ -10007,4 +10007,14 @@ A case whose difference from Metal is recorded rather than compared away. The le | `pixel-samplers-rgba16f-nearest-zero` | The device's own answer (rule 1): `norm` differs from Metal's (`arg`, `const` and `slot` read Metal's answer). The device's nearest filter at the normalized coo… | | `pixel-samplers-rgba16f-nearest-zero` | The device's own answer (rule 1): `norm` differs from Metal's (`arg`, `const` and `slot` read Metal's answer). The device's nearest filter at the normalized coo… | | `stage-in-region-clamps` | refused: no stream uses it yet (four-case census, m3-max-62954..62957: 35 streams, no setStageInRegionWithIndirectBuffer:indirectBufferOffset:). rt refuses the … | +| `attribute-format-fetches` | The device's own answer (rule 1): a NaN of a `half` or `RG11B10` stage-in attribute widened by the shader's fetch on the device keeps its payload where Metal re… | +| `attribute-format-fetches` | The device's own answer (rule 1): a NaN of a `half` or `RG11B10` stage-in attribute widened by the shader's fetch on the device keeps its payload where Metal re… | +| `attribute-format-fetches` | The device's own answer (rule 1): a NaN of a `half` or `RG11B10` stage-in attribute widened by the shader's fetch on the device keeps its payload where Metal re… | +| `attribute-format-fetches` | The device's own answer (rule 1): a NaN of a `half` or `RG11B10` stage-in attribute widened by the shader's fetch on the device keeps its payload where Metal re… | +| `attribute-format-fetches` | The device's own answer (rule 1): a NaN of a `half` or `RG11B10` stage-in attribute widened by the shader's fetch on the device keeps its payload where Metal re… | +| `attribute-format-fetches` | A conversion answer (rule 1) under its static note: the pulled fetch's own product of the code and its maximum's reciprocal, rounded once, which the note's reco… | +| `attribute-format-fetches` | A conversion answer (rule 1) under its static note: the pulled fetch's own product of the code and its maximum's reciprocal, rounded once, which the note's reco… | +| `attribute-format-fetches` | A conversion answer (rule 1) under its static note: the pulled fetch's own product of the code and its maximum's reciprocal, rounded once, which the note's reco… | +| `attribute-format-fetches` | A conversion answer (rule 1) under its static note: the pulled fetch's own product of the code and its maximum's reciprocal, rounded once, which the note's reco… | +| `attribute-format-fetches` | A conversion answer (rule 1) under its static note: the pulled fetch's own product of the code and its maximum's reciprocal, rounded once, which the note's reco… |