Mesh emulation: point meshes too, and a warning for draws from a nonzero workgroup.

The 8 point-list mesh programs of Ocarina 1.1.1 (32 points, position and point size) were left unemulated. Their
indices are single uints and the point size goes to an extra vertex slot, which the generated vertex shader writes to
PointSize; the draw asks for a point list (the pipeline key's topology class follows the draw's primitive for mesh
draws), chosen from the mesh stage's OutputPoints. A mesh draw from a nonzero first workgroup is drawn from 0 as
before, now with a warning in the emulated path too. All 1016 programs convert and pass spirv-val.

(cherry picked from commit 8900aeaffa3264e4cc655ffd487cb2d2f3e3dd17)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Tobim6
2026-11-12 16:22:07 +01:00
parent 1534dc570a
commit 8b78e64539
4 changed files with 91 additions and 2 deletions

View File

@@ -3091,7 +3091,8 @@ static void gkey_fill(const VkPipeState *s, GKey *k) {
o[3] = (uint8_t)blend_factor(b->src_a), o[4] = (uint8_t)blend_factor(b->dst_a), o[5] = (uint8_t)blend_op(b->eq_a);
}
}
if (is_mesh(s)) k->topo_class = 2; // mesh draws: no vertex input, the mesh stage declares its primitives
// mesh draws: no vertex input, the mesh stage declares its primitives (emulated point meshes draw point lists)
if (is_mesh(s)) k->topo_class = s->prim == NVN_DRAW_PRIMITIVE_POINTS ? 0 : 2;
if (!P.dyn_vi && !is_mesh(s)) {
VtxInput v;
vertex_input(s, &v);