mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 21:09:57 -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:
@@ -4454,6 +4454,12 @@ void vk_texture_range_gone(uint64_t lo, uint64_t size, VmaAllocation alloc) {
|
||||
// ---------------------------------------------------------------- descriptor slots
|
||||
void vk_texture_register(int id, const tex_t *t, const view_t *v) {
|
||||
if (id < 0 || id >= (1 << 20)) rt_fatal("vk: texture slot %d out of range", id);
|
||||
if (id >= VK_POOL_TEX) { // the translator clamps pool handles to VK_POOL_TEX - 1: shaders cannot reach this slot
|
||||
static int said;
|
||||
if (!__atomic_exchange_n(&said, 1, __ATOMIC_RELAXED))
|
||||
rt_log("vk: texture slot %d registered, past the %d the shaders index (VK_POOL_TEX): a shader that samples it "
|
||||
"reads slot %d instead", id, VK_POOL_TEX, VK_POOL_TEX - 1);
|
||||
}
|
||||
lock();
|
||||
if (id >= ntslots) {
|
||||
int n = ntslots ? ntslots : 1024;
|
||||
|
||||
Reference in New Issue
Block a user