Expand description
A mesh program on the CPU: a thread group that writes one meshlet. MeshShader::draw runs the thread groups of a
dispatch one after another and returns the meshlet each wrote: its vertices (one register per output varying, as a
geometry program’s emitted vertices are, MeshShader::outputs names them) and its primitives (the indices of their
vertices). What the rasterizer does with them is the pipeline’s.
The program is the entry point of iridia::build::Builder::finish_mesh: the group’s invocations run in lockstep
like a compute program’s, and what they write is the module’s output variable, thread-group memory that is read when
the group has finished. The counts the program set are the group’s (D3D requires every invocation to set the same),
and a count past the most the program declares, or an index past the vertices it counted, is an error of the run:
D3D leaves both undefined.
Structs§
- Mesh
Shader - A mesh program ready to run.
- Meshlet
- What one thread group wrote.