Give the texture pool room for Ocarina's 33068 descriptors instead of 32768.

The game makes a texture pool of 33068 descriptors, and the translator clamped every pool handle to 32767, so the textures registered from 32768 up were drawn with whatever slot 32767 held, often an empty image: ground went see-through after an area load until the area was loaded again. VK_POOL_TEX and the translator's TexturePoolLength go to 40960, and a slot registered past it is logged once.
This commit is contained in:
Leyukaka
2026-11-11 22:34:21 +01:00
committed by chrg6
parent 3e323d1f94
commit 2388f1f581
4 changed files with 15 additions and 3 deletions

View File

@@ -54,7 +54,8 @@ static class SwshXlate
// GenerateBindlessAccess): arrays of TexturePoolLength textures (handle bits 0-19) and SamplerPoolLength samplers
// (bits 20-31; NVN sampler ids are below 4096). res.json marks them "pool": 1 (textures) / 2 (samplers); the
// runtime binds them from its global pool set (vk_exec_draw.c, texture and sampler pools).
public const int TexturePoolLength = 32768, SamplerPoolLength = 4096;
// TexturePoolLength: the runtime's VK_POOL_TEX (vk.h), past Ocarina's pool of 33068 descriptors (#569).
public const int TexturePoolLength = 40960, SamplerPoolLength = 4096;
public int QuerySamplerArrayLengthFromPool() => SamplerPoolLength;
public int QueryTextureArrayLengthFromBuffer(int slot) => 32;
public int QueryTextureArrayLengthFromPool() => TexturePoolLength;