From 45430366b12acf29f452dae3860cf50e8db86b72 Mon Sep 17 00:00:00 2001 From: Chris Koos Date: Sat, 31 Oct 2026 15:01:08 -0700 Subject: [PATCH] Return 0 from storage_rewritten when write tracking is unavailable --- runtime/vk_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/vk_texture.c b/runtime/vk_texture.c index c43b13dc..34080da9 100644 --- a/runtime/vk_texture.c +++ b/runtime/vk_texture.c @@ -751,7 +751,7 @@ static int storage_rewritten(const Tex *e, uint32_t since, uint32_t *now) { uint64_t lo = (e->pub.addr + 0xfff) & ~0xfffull, hi = (e->pub.addr + e->t.L.size) & ~0xfffull; if (hi <= lo) lo = e->pub.addr, hi = e->pub.addr + e->t.L.size; int ch = vk_mem_changed(lo, hi - lo, since, now); - if (ch != 1 || !since || !e->snap || memcmp(e->snap, (const void *)(uintptr_t)e->pub.addr, e->t.L.size)) return ch; + if (ch != 1 || !since || !e->snap || memcmp(e->snap, (const void *)(uintptr_t)e->pub.addr, e->t.L.size)) return ch == 1; log_limited(&n_kept, "write-back of %#llx kept: fmt %#x %ux%u, %llu bytes; a neighbour wrote its page", (unsigned long long)e->pub.addr, e->t.d.format, e->t.d.width, e->t.d.height, (unsigned long long)e->t.L.size);