mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-11 01:41:02 +00:00
The paths that give memory back under pressure (headroom's spare block, released textures, pool mirrors) watched the Vulkan heap budget only. On a UMA GPU that budget is gigabytes of the same RAM the game runs in, and on Windows the AMD driver charges device-local allocations to the process commit one to one (RX 9070: VRAM use and private bytes grew by the same 1164, 256 and 256 MiB). Crash logs show the result: the process at 4.4-10.5 GB of commit, 16 GB machines at 80-94% RAM, std::bad_alloc inside amdvlk64.dll (#285), allocation failures on Intel UHD. vk_mem_host_room (vk_memory.c) is what the system can still give beyond a reserve (TOTK_MEM_RESERVE_MIB, 1536): commit, and on a UMA GPU physical memory too; Linux overcommits, so there only a UMA GPU's available memory counts. NVIDIA is left out, not measured. vk_mem_vram caps the budget at use plus that room, and headroom keeps its spare block only while four blocks fit in it. RX 9070, field save, 60 s with the room near zero from the start (TOTK_MEM_RESERVE_MIB=21000): commit 7124 MB instead of 8965, VRAM 2631 MiB instead of 3781, released textures 153 instead of 1866; mirrors refused for 423 MiB of pools, GPU 4.45 ms a frame instead of 3.34 ms, 60 fps either way. Without pressure nothing changes. The census logs the room, the device class line the mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>