mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-13 14:48:32 +09:00
Sizing backings by their defined mip level count gave every level-0-only texture a single-level image, and left growing it to the recreate-and-preserve path: the new image is created and the old contents are carried over by a vkCmdCopyImage that PreserveTextureContentsOnRecreate submits on its own command buffer and waits on straight away. Whatever the frame has already recorded into the old image has not been submitted yet at that point, so that copy reads the texture as it stood before this frame's writes. GenerateMipmap then descends the whole chain from a stale level 0, and the composite pass that samples it renders a washed-out frame - minecraft-1.21.4-fabric-iris-iterationt-in-world (Iris's mipmapped colour target, the one texture in the trace that grows 1 -> 10 levels) came back at ssim 0.5699 against a 0.99 threshold. This is the hazard the storage-usage upgrade already flushes for before its own preserve-copy; growing the mip chain is simply the second trigger of that same recreate, and it was added without the same ordering guarantee. Flush there too, gated on a texture whose live image really does carry a short chain, so the submit happens once per texture and only when a recreate is actually coming. Keeps the single-level backing and its memory saving; ssim goes back to 0.9992.