PrecisionNote::VertexSimdgroupGrouping: a vertex function's simdgroup and quad operations run over the device's grouping

A vertex function that runs a simdgroup or quad operation (any group operation or AGX
multiply-add: the simd plan's observes_lanes) records PrecisionNote::VertexSimdgroupGrouping on
every device (lower::simd::finish). Metal's shading language defines its SIMD-group and
quad-group functions for kernel and fragment functions (MSL 4.1 sections 6.10.2 and 6.10.3) and
names no lane among a vertex function's inputs (Table 5.2), so in a vertex function the groups
are the device's own, as FragmentSimdgroupGrouping already says of fragment functions. Validation
takes the note as unbounded (a difference is a noted difference) and C3 defers its rows
(DEFERRED_NEAR_EQUIVALENTS), as it does the fragment note; conformance names it
metal2vulkan-degrade-vertex-simdgroup-grouping; docs/API.md's catalogue states it. SEMANTICS 2272.

Why: on the Iris Xe (RPL-P, Mesa 26.2.6) 8 authored vertex cases mismatched the M3 Max while the
Radeon 780M and the RTX 3090 matched. A raw Vulkan probe outside the runtime (a SPIR-V 1.5 vertex
shader over 64 rasterizer-discarded points, validation layer on, 0 messages; Iris Xe job
m3-max-66302, Radeon 780M m3-max-66303, RTX 3090 m3-max-66304) read SubgroupSize 32 in every
Iris vertex invocation with lane ids 0 to 7 only: 8 subgroups of 8, in each run of 16 vertices
the even ones in one and the odd ones in another, every vote, sum, shuffle and quad broadcast
exact over the driver's own groups. The 780M runs one 64-lane group in vertex order, the 3090
two 32-lane groups. Vulkan holds SubgroupSize to subgroupSize for a SPIR-V 1.5 module and
promises full subgroups only to stages with workgroups, so the driver answers per its
properties, and the translator's tier follows the stage's queries (Iris: vertex not in
requiredSubgroupSizeStages, Direct at the API size 32). The 8 cases' outputs on the Iris
(m3-max-66342) equal, word for word, Metal's semantics over the Iris's own groups with the
partly-live rule's own-value read for a lane that takes no part (0 differing words in each of
the 8; the grouping of the 40- and 42-point draws is inferred from the 64-point rule).
This commit is contained in:
Anees Iqbal committed 2026-11-22 00:57:02 -08:00
1 parent fd18d75085
commit e3fbf2ca99
12 files changed
+110 -3

No files matched your search

+10
View File
@@ -2197,6 +2197,16 @@ bound.
drops, where an Apple GPU's simdgroup counts the dropped quads of its 8x4 pixel block; the
device states one fragment subgroup size, so no required size widens it, and no exact form
exists there.
- `metal2vulkan-degrade-vertex-simdgroup-grouping` (precision).
`PrecisionNote::VertexSimdgroupGrouping`: A vertex function runs a simdgroup or quad operation
(a reduction, scan, vote, ballot, shuffle, broadcast or AGX multiply-add), on every device.
Metal's shading language defines its SIMD-group and quad-group functions for kernel and
fragment functions (MSL 4.1 sections 6.10.2 and 6.10.3); in a vertex function the groups are the
device's own. The operation runs over the vertices the device packs into a subgroup, in its
lane order, so a sum, a vote or a shuffle can combine other vertices than on the M3 Max, whose
answers group 32 consecutive vertices. Vulkan neither fills a vertex subgroup nor fixes which
vertices share one: an Iris Xe (Mesa 26.2.6) whose vertex subgroup size is 32 runs 8 of 64
points in each, the even or the odd vertices of a run of 16.
- `metal2vulkan-degrade-blended-write-rounding` (precision). `PrecisionNote::BlendedWriteRounding`:
A fragment function writes a float to a half-float color channel of a render pipeline under
`TextureWriteRoundingMode::NearestEven` that blends with factors other than one and zero