Files
metal2vulkan/crates/metal2vulkan-validation/src/executor_contract
Anees Iqbal ae42a1acfc Census: a mesh function that sets no vertex or primitive and writes nothing needs no fragment stage
The census held five mesh rows unresolved under mesh_companion, each missing a fragment stage:
icb_object_threadgroup_mesh, mesh_partial_barrier_mesh (empty bodies), mesh_object_grid_mesh,
mesh_pipeline_limits_mesh_alone (a constant zero primitive count) and mesh_pipeline_limits_mesh
(a count read from its payload). None sets a vertex or primitive and none writes device memory;
they exist so their modules' object functions can be drawn. The row rule fell through to "needs
a fragment stage" for any mesh function writing neither memory nor its position, although a
fragment stage observes nothing such a function defines: it emits no primitive, or primitives
over vertices it never wrote.

Such a function has no effect a stage observes, so it draws with rasterization off and an empty
observation (OutputSelection::None), as a kernel that writes nothing does: both executors already
draw a mesh pipeline with rasterization off into a one-pixel sink, and the checker accepts an
empty observation where nothing is writable. A mesh function that sets vertices or primitives
without their position, and writes nothing, still needs a fragment stage nothing supplies
(sets_mesh_outputs decides it from the entry's `air.set_*_mesh` calls through the AIR front end's
intrinsic table, never a name).

The five rows' first unresolved commits are their fixtures' add commits (97d01927cb, 1d494932f7,
0f289cdac4); the rule predates them (0175289314).

Tests: the mesh contract's row test holds the three fixtures' effect-free mesh functions to no
missing stage and no call that sets an output; a triage test classifies all five public rows to
no requirement and no missing stage. Both fail without the change. The census test's synthetic
mesh row now sets its primitive's ID without a position, so it stays the gap it demonstrates.
The validation README says what an effect-free mesh row draws with. The classifier version is
structural-triage-v82.

(cherry picked from commit 68d4bbb9b67a72bfcce4d0c6069f1579da43ef04)
2026-11-08 20:03:19 -08:00
..