A mesh program's header lists the components of each output vector it has; the fragment stage may read the others.
The native mesh entry function never wrote them, so they read as whatever the output held, and the fallback's vertex
stage wrote 0 for all of them, w included. Maxwell gives an unwritten component (0, 0, 0, 1), as the pipeline code
already pads a missing vertex output. Both paths now write that default: MeshSpirv.cs after copying each vertex's lines,
mesh_fb.c meshfb_vs with w as the bits of 1.0f whatever the type.
Checked: all 520 task and mesh programs of an installed shader cache translate and pass spirv-val (vulkan1.3); 500
mesh modules gained about 730 bytes each on average, so many of the game's mesh programs have partly listed vectors.
--probe-meshfb passes (fallback pictures equal the mesh pipeline's), and its module part converts all 520 new
translations with 0 failures, all 1,020 modules pass spirv-val and their compute pipelines build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a GPU without mesh shaders the fallback replaces the translated module's entry function with its own, which cleared
only the primitive count and then copied the whole slot (vertex lines, count, index bytes) out of workgroup memory to
be drawn. Lines and index bytes the program did not write kept what an earlier workgroup left there and were drawn as
vertices and primitives. The fallback's entry function now sets every word of the slot to zero in a loop over the
workgroup's threads before the payload copy and the barrier, as the translator's own entry function does.
Checked: --probe-meshfb passes before and after (the fallback's pictures match the mesh pipeline's texel for texel on
an RTX GPU); its module part converts all 520 task and mesh programs of an installed shader cache with 0 failures, all
1,020 resulting modules pass spirv-val (vulkan1.3) and their 520 compute pipelines build on the device.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A translated task or mesh module is the program as a compute function over shared memory plus an entry function
that hands that memory to the mesh pipeline. mesh_fb.c replaces the entry function by one that copies the memory
into a storage buffer, and generates the vertex stage that draws from that buffer. The translator and its identity
are not touched, so no install translates a shader again.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>