Mesh emulation: size the task records from the arena, and log what each submission asked for.

The task records were a fixed 4096 per submission (3 KiB each): a dense patch of grass that launches more task
workgroups in one submission lost the rest silently. Their count is now a push constant (NX2NAVI_MESH_EMU_TASKS,
default 16384) and the arena defaults to 256 MiB. The header counts what the stages asked for past the capacities too;
before the counters start over they go to a readback ring, and the perf line reports the most one submission used of
the vertex slots, indices and task records, and the mesh workgroups that did not fit. The first draws the emulation
skips are logged with the reason.

(cherry picked from commit 81cfd91bf468f13e4debf287d080f96637a4c382)

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

View File

@@ -15,8 +15,13 @@
#define MESH_EMU_DWORDS 16u
#define MESH_EMU_DRECS 4096u
#define MESH_EMU_TOFF (MESH_EMU_DOFF + MESH_EMU_DRECS * MESH_EMU_DWORDS * 4u)
// task records: as many as the push constants say (the replay sizes them, NX2NAVI_MESH_EMU_TASKS); the index area
// follows them
// Push constants of every emulation stage (compute and the vertex shader), 32 bytes:
// u64 arena address; uint draw record (word index); uint index area (word index); uint index capacity;
// uint vertex area (16-byte slot index); uint vertex capacity (slots); uint task record capacity
// Header words 0-2 count what the stages asked for, beyond the capacities too (the replay logs the most per
// submission); word 3 counts mesh workgroups that did not fit.
#define MESH_EMU_PC_BYTES 32u
typedef struct MeshEmuInfo {