mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 15:59:59 -04:00
A device lost seen on RTX 4090, 5090 and 5070 Ti cards in 0.5.0 and 0.6.0 (#177, #61, and a 0.6.0 test run): a "read invalid" at the start of a 128x128 scene capture pass, re-rendered at area loads. destroy_tex purged the views of the image and deferred the image, then freed its record at once, on whichever thread released the texture. The replay keeps &e->pub as a render target for the rest of a command buffer (vk_exec.c resolve_target) and DLSS for the frame: a pass that began again (each indirect mesh draw ends the pass) read the freed record and cached a view of the dead image, which nothing removed. Vulkan gives a destroyed image's handle to a later image, which then got that view, and the pass loaded its attachments from freed memory. - destroy_tex marks the record gone and frees it through the deferred destruction (vk_defer_free, a host kind stamped with the submission being recorded, as the image is). - A gone texture's attachment view is made per command buffer (vk_exec.c view_of) or deferred with it (vk_exec_target_view, for DLSS and the contact shadows), never cached. - A new image drops any view still cached under its handle, and the log counts it ("cached views of a destroyed image"). No rendering changes: the views and images live exactly as long as before, the records slightly longer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
60 KiB
60 KiB