Finalize only the slots a texture object registered itself, so a finalize no longer touches another live texture's slots at the same storage, and drop the early return that skipped the whole release when such a texture was live, which also kept textures the game expected released (Kakariko fog lines).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Martin
2026-11-11 09:30:37 -03:00
parent 1096efef12
commit 2765a752b0
6 changed files with 23 additions and 50 deletions

View File

@@ -98,10 +98,9 @@ keeps per-core data without locks and relies on that, so the host models it (`ru
(`vk_exec_draw.c pool_sync`); slots that resolve alike share one lookup.
Finalization is retained on registered slots independently of image-cache eviction: a stale CPU-backed descriptor
cannot recreate an image from freed storage or follow newly reused CPU bytes. Registration makes it current again;
finalized descriptors may still follow live GPU-owned content. A finalize marks none while another texture with the
same parameters is live at the storage, as the game reuses terrain heightmap storage that way
(`vk_backend.c vk_be_texture_release`), and only the slots registered before it (the asynchronous replay applies
releases late, registrations at once).
finalized descriptors may still follow live GPU-owned content. A finalize marks only the slots its own texture
object registered (by initialization serial): the game initializes and registers the next terrain heightmap at the
storage of the previous one before it finalizes that one (`vk_texture.c vk_texture_release`).
- Shaders: Ampere (SM86) code is lowered to Maxwell (`tools/xlate/AmpereLowering.cs`) and translated to SPIR-V by the
pinned shader translator (`tools/vendor/ryujinx`, 1.3.2) with our patches (`tools/xlate/patches/`), built with .NET 10 NativeAOT as
`nx2navi_xlate.exe` and run as separate processes. Translations are cached on disk; shaders and pipelines seen in