<feed xmlns='http://www.w3.org/2005/Atom'>
<title>eglantine-cirakg/src/shader_recompiler/backend/spirv/emit_spirv_mesh.cpp, branch nx2</title>
<subtitle>Mirror of github.com/cira0100/Eglantine-public nx2, a fork of Djihads80/Eglantine.</subtitle>
<id>https://git.cirakg.xyz/eglantine-cirakg/atom?h=nx2</id>
<link rel='self' href='https://git.cirakg.xyz/eglantine-cirakg/atom?h=nx2'/>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/'/>
<updated>2026-11-01T16:29:29+00:00</updated>
<entry>
<title>shader_recompiler: translate Switch 2 task and mesh programs</title>
<updated>2026-11-01T16:29:29+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-30T09:02:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=310dd596d0f6d48de3517cfb1bdc90a366817405'/>
<id>urn:sha1:310dd596d0f6d48de3517cfb1bdc90a366817405</id>
<content type='text'>
Mario Kart World draws some of its geometry with NVN task and mesh programs
(the task program culls and writes the mesh workgroup count and a payload
to its stage buffer; each mesh workgroup reads it back and writes vertices
and primitives). Add Task and Mesh stages and translate them for
VK_EXT_mesh_shader:

- the ISBE pseudo instruction from the lowering becomes reads and writes
  of an emulated stage buffer: the task's output region is the task
  payload, the mesh output regions live in workgroup memory
- every EXIT of these stages jumps to one final return, so all
  invocations reach the epilogue: a barrier, then OpEmitMeshTasksEXT, or
  OpSetMeshOutputsEXT and a copy of the 32-element vertex and primitive
  groups (lines named by the mesh header's and the pass-through geometry
  header's output maps) to arrayed and per-primitive outputs
- Sirit lacks the two mesh instructions: they are emitted as OpStore
  markers and replaced after assembly
- fragment inputs a mesh program writes per primitive get PerPrimitiveEXT

The captured task and mesh programs of the title translate to SPIR-V that
spirv-val accepts.
</content>
</entry>
</feed>
