mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 09:39:58 -04:00
An NVN2 compute program's control section gives its local memory in bytes a thread at +0x68, beside the shared memory size at +0x64 that the job already carried. Without it the translator declared its default of 0x1000 bytes: one of the game's compute programs needs 4,752 bytes a thread, and its translation declared a 1,024-word local array that it indexed up to word 1,187, outside the array. The job now carries "local_mem" from +0x68, and the lowering starts a compute program's spill area after its own local memory (at least 0x1000 bytes) instead of always at 0x1000, where a larger program's own memory would have overlapped it. Checked: that program's translation now declares 1,188 words (indices up to 1,187) and passes spirv-val; two programs of 3,456 bytes a thread translate as before. All 266 compute programs whose stored input id starts with 0 in an installed shader cache translate and pass spirv-val (vulkan1.3), and tools/xlate_smoke.py passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 KiB
28 KiB