mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 13:09:57 -04:00
Check the texture pool's set against the device's descriptor limits, and name the slot a carried translation reads.
The larger pool asks for 655,360 sampled images in one set where 524,288 were asked before. The start now logs the device's limits for one set and one stage next to that count, warns when the count is over them, and a refused layout ends the start with the limits named instead of a bare failure. The log line for a slot registered past the pool names both slots a shader reads instead: the pool's last entry, and the last of the old length for a translation carried over from the translator before. The comments say what they say without an issue number. The translator's identity changes with this pool size: after the update every install translates its shaders again in the background, the earlier translations serve meanwhile, and a shader gets the ground fix once it is translated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4454,11 +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
|
||||
if (id >= VK_POOL_TEX) { // the translator clamps pool handles to the pool's last entry: shaders cannot reach it
|
||||
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);
|
||||
"reads slot %d instead (%d for a translation carried over from the translator before)", id,
|
||||
VK_POOL_TEX, VK_POOL_TEX - 1, VK_POOL_TEX_CARRIED - 1);
|
||||
}
|
||||
lock();
|
||||
if (id >= ntslots) {
|
||||
|
||||
Reference in New Issue
Block a user