mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 16:49:58 -04:00
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:
@@ -1712,7 +1712,7 @@ static uint32_t feedback_scan(VkExec *ex, const GfxShader *fs) {
|
||||
FmEnt *fm = ex->dc->fm;
|
||||
if (!fm && !(fm = ex->dc->fm = calloc(FM_N, sizeof *fm))) rt_fatal("vk: out of memory (feedback memo)");
|
||||
for (int r = 0; r < n; r++) {
|
||||
// Only bound slots (0..127) are looked at. The texture and sampler pool arrays (res.pool: 32768 and 4096
|
||||
// Only bound slots (0..127) are looked at. The texture and sampler pool arrays (res.pool: VK_POOL_TEX and 4096
|
||||
// descriptors, bindless handles) have slot -1: walking them ran up to about 100,000 empty iterations per scan,
|
||||
// about 3.6 ms of replay per frame in Kokiri Forest, and read tex[FS][0..127] for them by mistake.
|
||||
if (res[r].pool || res[r].slot < 0) continue;
|
||||
|
||||
Reference in New Issue
Block a user