Put textures and allocations past a full video memory heap only in another device-local heap, never in system memory.

On an RX 580 the second device-local heap (2 GiB) takes what the first has no room for. On a GPU with one device-local
heap (an RTX 3050 Laptop, 4 GiB, 16 GiB of RAM) the budget wrapper and the texture placement sent everything past the
heap's reserve to system memory instead: 4096 and more texture images and every other allocation, held in the
process's commit (21 GiB). The system's commit ran out (31730 of 32023 MB), host memory imports failed, a pool was
left without a GPU buffer and the GPU wrote through its address: device lost. Now an allocation leaves out a full heap
only when another device-local heap has room, and a texture's second step allocates as before, past the budget, where
the driver keeps it in video memory or moves it out itself, and NX2navi's own VRAM pressure drops textures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Tobim6
2026-11-12 19:07:38 +01:00
committed by chrg6
parent a7e79b3460
commit 1eadef609e
3 changed files with 22 additions and 12 deletions

View File

@@ -131,7 +131,8 @@ static const char *const text_en[UI_TEXT_COUNT] = {
[UI_MENU_LOWEND_RESERVE] = "Video memory kept free",
[UI_MENU_LOWEND_RESERVE_DESC] = "Room kept free in each video memory heap for what FidelityFX (FSR 3.1, frame generation) and the "
"driver allocate on their own: a heap with less than this left takes no new allocation while "
"another heap can. Off: video memory can fill up with frame generation on, and the game ends.",
"another video memory heap can (an RX 580 has two; cards with one are not affected). Off: video "
"memory can fill up with frame generation on, and the game ends.",
[UI_MENU_LOWEND_HEAP_LIMIT] = "Video memory heap limit",
[UI_MENU_LOWEND_HEAP_LIMIT_DESC] = "Auto: on GPUs with a second video memory heap (an RX 580 shows 6 GB and 2 GB), "
"each heap is filled only to its budget before the next one is used, so the "