mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 17:59:58 -04:00
Vulkan leaves workgroup memory undefined, and a mesh program need not write every vertex it has room for or every index byte. The mesh entry function copies all of them into the outputs, so what an earlier workgroup left in shared memory became vertices and primitives: on AMD, long thin triangles across the foliage's shadow map. The entry function now sets the vertex lines, the primitive count and the index bytes to zero in a loop over the workgroup's threads before the payload copy and the barrier. Task programs keep clearing only their mesh count. Checked by translating all 520 task and mesh programs an installed shader cache stores with the translator before and after the change: every one translates and passes spirv-val (vulkan1.3) both times; each mesh module grows by about 88 bytes, task modules are unchanged. tools/xlate_smoke.py passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>