mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 15:59:59 -04:00
Each draw's indices are now a range of its own and its task records too, reserved by an allocation shader (one invocation, mesh_emu_alloc_spirv) for the run of draw records queued: before the task stages the task records and the index ranges of draws without a task stage, after them the index ranges of the others (mesh workgroups with output, which the task stage now counts in the record, times OutputPrimitives x vertices per primitive). The mesh stage takes its indices from the draw's range with an atomic in its record; vertex slots stay the arena's, as the indices name them. So no draw's stages need another's, and the queue (MEQ) records the fills as the draws come, then at the pre-pass command buffer's end (vk_sync.c pre_end -> vk_exec_mesh_flush): allocation, every task stage, allocation, every mesh stage, a barrier between each. One by one each draw took three barriers and copied the arena's counters after the draw before it: an RX 580 spent 5.5 ms of a frame's GPU time on 69 draws' stages in Kokiri Forest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
61 KiB
61 KiB