mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 01:49:58 -04:00
Do not count a stale texture pool slot as left for later.
A slot whose storage is unmapped has nothing to make, but with the creation budget at 0 the lookup noted it as left before asking whether its storage can be read. In a busy frame, once the frame's creation time was spent, about a thousand stale slots were noted at once, and the pool refresh took that for an area load: up to 274 times a minute in one session's log, each time lifting the count budget and the frame's creation time for the rest of the frame. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -2693,8 +2693,13 @@ static Tex *slot_resolve(TexSlot *s, view_t *view, int *has_view) {
|
||||
// evicted by disuse: the pool refresh keeps the stand-in, without spending the creation budget on it
|
||||
if (pool_ctx && holds.n && nvn_hm_get(&holds, &k)) resolve_held = 1;
|
||||
else if (create_budget < 0) e = entry_of(&s->t);
|
||||
// Unmapped storage first: such a slot has nothing to make, now or later. Asked after the budget, every stale
|
||||
// slot a refresh met with the budget at 0 was noted as left: in a busy frame (its creation time spent) that
|
||||
// was about a thousand slots at once, which vk_exec_draw.c pool_sync_entries took for an area load, several
|
||||
// times a second in some places, and each time lifted the count budget and the frame's creation time.
|
||||
else if (!mem_readable((uint64_t)(uintptr_t)s->t.mem, s->t.L.size)) e = NULL;
|
||||
else if (!create_budget && !(s->cwant && want_take())) create_deferred = 1;
|
||||
else if (mem_readable((uint64_t)(uintptr_t)s->t.mem, s->t.L.size)) {
|
||||
else {
|
||||
e = entry_of(&s->t);
|
||||
if (create_budget > 0) create_budget--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user