mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 15:59:59 -04:00
A shader whose texture pool array has 32768 entries reads slot 32767 for every texture the game numbers from 32768 up (Ocarina's pool has 33068), but nothing in the log said such a shader was in use: vk_texture_register warned only for slots past VK_POOL_TEX (40960), which Ocarina never registers, and vk_pipeline.c spirv_pool_rebind accepts the shorter arrays silently. gfx_shader.c pool_short_note now counts the shaders entering the memory cache with such an array (carry_usable keeps carried ones out, so these come from a translator older than the runtime) and logs the first; vk_texture_register logs once, with that count, when a slot between 32768 and 40959 is registered while one is in use. The count is kept per shader in gfx_shader.c (gfx_shader_pool_short_seen) rather than per pipeline stage in spirv_pool_rebind, which runs once per module built. Diagnostics only. tests/carry_pool_check.py now also checks that pool_short_note counts only shaders of the earlier length and logs once; every runtime file compiles, with no new warnings in gfx_shader.c and vk_texture.c. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
408 KiB
408 KiB