mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 23:19:57 -04:00
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:
@@ -28,6 +28,8 @@ typedef struct MeshEmuInfo {
|
||||
int task; // 1 TaskEXT, 0 MeshEXT
|
||||
uint32_t threads; // LocalSize x
|
||||
uint32_t max_v, max_p; // mesh: OutputVertices, OutputPrimitivesEXT
|
||||
uint32_t prim; // mesh: 3 triangles, 2 lines, 1 points (triangles and points are emulated)
|
||||
uint32_t psize_slot; // mesh: the slot holding the point size (x), 0 without one
|
||||
uint32_t payload_words; // the task payload's size (mesh: what it reads, 0 without a task stage)
|
||||
uint32_t max_mesh; // task: the most mesh workgroups one task workgroup launches (dispatch width)
|
||||
uint32_t slots; // mesh: 16-byte slots per vertex: position and each generic output
|
||||
@@ -39,4 +41,9 @@ typedef struct MeshEmuInfo {
|
||||
// one the converter knows (it then stays unemulated: its draws are skipped as before).
|
||||
uint32_t *mesh_emu_compute(const uint32_t *w, size_t n, MeshEmuInfo *info, size_t *out_n, const char **why);
|
||||
|
||||
// The vertex shader of an emulated mesh pipeline: position and the generic outputs from the vertex slots, as types[l]
|
||||
// The vertex shader of an emulated mesh pipeline: position and the generic outputs from the vertex slots, as types[l]
|
||||
// (0 float, 1 signed, 2 unsigned) with comps[l] components for every location l in need (the fragment stage's
|
||||
// inputs); a location the mesh stage does not write is zero. malloc'd, *out_n words.
|
||||
// A task or mesh module's output primitive: 3 triangles, 2 lines, 1 points, 0 not a mesh module.
|
||||
int mesh_emu_prim(const uint32_t *w, size_t n);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user