mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 21:39:58 -04:00
Add NX2NAVI_VRAM_BALLAST_MB, video memory taken for the session, to test a smaller card on a large one.
NX2NAVI_VRAM_BUDGET_MB changes only the number the decisions compare with. The ballast takes that much device-local memory right after the allocator is made, in dedicated buffers of 256 MiB, and holds it until the allocator goes, so the driver's own behaviour at its limit (slow allocations, memory moved to system RAM, refusals) shows as on an 8 GB card. Checked on an RTX 5090: 24000 of 24000 MiB taken and held; through eight reloads of Kakariko the use went past the card (32,218 MiB at the end) and Kakariko fell from 118-151 fps in the first four rounds to 10-24 fps in the last four. Texture detail was still chosen as full: the choice reads the driver's budget, which the ballast does not lower. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -394,6 +394,8 @@ uint64_t vk_headroom_release(void); // a refused allocation: the anchors go,
|
||||
// A refused allocation: the staging and snapshot buffers kept for reuse and the headroom's spare blocks go back to the
|
||||
// driver before the caller tries once more (vk_memory.c). Returns the bytes.
|
||||
uint64_t vk_mem_give_back(void);
|
||||
void vk_mem_ballast(VmaAllocator vma); // NX2NAVI_VRAM_BALLAST_MB (test): video memory taken for the session (vk_memory.c)
|
||||
void vk_mem_ballast_release(VmaAllocator vma);
|
||||
VkDeviceSize vk_vma_block_size(void); // VMA's block size on heaps over 1 GiB (NX2NAVI_VMA_BLOCK_MB)
|
||||
int vk_mem_resolve(uint64_t addr, uint64_t size, VkMemSpan *out); // 1 when all of [addr, addr+size) is backed
|
||||
// vk_mem_resolve for a caller that reads guest memory itself or only asks what backs it: with shadow storage the pool
|
||||
|
||||
Reference in New Issue
Block a user