Feature/Optimization: Budget-Aware Split Memory Residency (4 GB VRAM + High System RAM) with Selective Mip-Drop #2021

Closed
opened 2026-11-29 07:43:03 +00:00 by github-bot · 4 comments
Owner

@⁠syedaslam7774-pixel on GitHub · 2026-11-29 07:40 UTC · original

Problem

Current VRAM allocation does not strictly prioritize resources by rendering urgency or camera proximity. As a result, high-end GPUs (12–16 GB) hit premature texture budget exhaustion and suffer traversal stutters from shared-memory spillover, while 4–8 GB GPUs hit E_OUTOFMEMORY or severe PCIe thrashing unless global mip-dropping blurs the entire scene.

Proposed Architecture: Budget-Aware Tiered Memory Residency

Query IDXGIAdapter3::QueryVideoMemoryInfo dynamically and split resource placement (D3D12_HEAP_TYPE_DEFAULT vs. host-visible system memory fallback) based on asset priority across all VRAM tiers:

  1. Pin High-Priority Render & Foreground Assets to Local VRAM:

    • Keep Render Targets, Depth-Stencil surfaces, UAVs, UI/HUD, and active near-camera/hero textures in fast local VRAM (DEVICE_LOCAL) across all GPUs so 3D shading and close-up details stay at full quality.
    • Exempt UI, LUTs, and near-field textures from aggressive mip-dropping.
  2. Spill Distant / Low-Priority Streaming Assets to System RAM Under Budget Pressure:

    • When local VRAM usage reaches ~80–85% of the adapter's available budget (whether that is ~3.3 GB on a 4 GB card or ~10–13 GB on a 12–16 GB card), route distant terrain, background LODs, and non-urgent streaming packs to system RAM pools instead of evicting active render targets.
    • Apply progressive mip-dropping (VICTORY_TEXTURE_MIP_DROP) only to distant/background textures under memory pressure so close-up visuals remain sharp.
  3. Graceful OOM Fallback Instead of Device Removal:

    • If CreateCommittedResource returns E_OUTOFMEMORY, automatically step down the mip level or fall back to a system-memory heap placement for that resource instead of triggering device removal.

Expected Outcome

  • High-end GPUs (12–16+ GB): Eliminates texture-budget stalls and shared-memory spikes during fast world traversal while keeping full 4K foreground detail.
  • Low/Mid-range GPUs (4–8 GB): Prevents E_OUTOFMEMORY crashes and preserves crisp close-up character/vehicle detail by offloading background world streaming to system RAM.
**@⁠syedaslam7774-pixel** on GitHub · 2026-11-29 07:40 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2021) ### Problem Current VRAM allocation does not strictly prioritize resources by rendering urgency or camera proximity. As a result, high-end GPUs (12–16 GB) hit premature texture budget exhaustion and suffer traversal stutters from shared-memory spillover, while 4–8 GB GPUs hit `E_OUTOFMEMORY` or severe PCIe thrashing unless global mip-dropping blurs the entire scene. ### Proposed Architecture: Budget-Aware Tiered Memory Residency Query `IDXGIAdapter3::QueryVideoMemoryInfo` dynamically and split resource placement (`D3D12_HEAP_TYPE_DEFAULT` vs. host-visible system memory fallback) based on asset priority across all VRAM tiers: 1. **Pin High-Priority Render & Foreground Assets to Local VRAM:** - Keep Render Targets, Depth-Stencil surfaces, UAVs, UI/HUD, and active near-camera/hero textures in fast local VRAM (`DEVICE_LOCAL`) across all GPUs so 3D shading and close-up details stay at full quality. - Exempt UI, LUTs, and near-field textures from aggressive mip-dropping. 2. **Spill Distant / Low-Priority Streaming Assets to System RAM Under Budget Pressure:** - When local VRAM usage reaches ~80–85% of the adapter's available budget (whether that is ~3.3 GB on a 4 GB card or ~10–13 GB on a 12–16 GB card), route distant terrain, background LODs, and non-urgent streaming packs to system RAM pools instead of evicting active render targets. - Apply progressive mip-dropping (`VICTORY_TEXTURE_MIP_DROP`) only to distant/background textures under memory pressure so close-up visuals remain sharp. 3. **Graceful OOM Fallback Instead of Device Removal:** - If `CreateCommittedResource` returns `E_OUTOFMEMORY`, automatically step down the mip level or fall back to a system-memory heap placement for that resource instead of triggering device removal. ### Expected Outcome - **High-end GPUs (12–16+ GB):** Eliminates texture-budget stalls and shared-memory spikes during fast world traversal while keeping full 4K foreground detail. - **Low/Mid-range GPUs (4–8 GB):** Prevents `E_OUTOFMEMORY` crashes and preserves crisp close-up character/vehicle detail by offloading background world streaming to system RAM.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 07:43:03 +00:00
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-29 07:40 UTC · original

Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

**@⁠github-actions[bot]** on GitHub · 2026-11-29 07:40 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2021#issuecomment-7252619633) Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
Author
Owner

@⁠syedaslam7774-pixel on GitHub · 2026-11-29 07:42 UTC · original

N/A — Architectural / VRAM Memory-Tiering Enhancement Proposal (no crash log; see DXGI/D3D12 allocation design below).

**@⁠syedaslam7774-pixel** on GitHub · 2026-11-29 07:42 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2021#issuecomment-7252643237) N/A — Architectural / VRAM Memory-Tiering Enhancement Proposal (no crash log; see DXGI/D3D12 allocation design below).
Author
Owner

@⁠trustno1-coder on GitHub · 2026-11-30 15:37 UTC · original

Closing this because it was opened before v2026.11.29.01, and a great deal has changed since then. The latest release is v2026.11.30.01.

If this still happens, or still applies, on the latest release, please open a new issue. For a bug, attach both logs from that run:

  1. The play log: the newest victory-nvidia-play-<date>-<time>-<number>.log in %LOCALAPPDATA%\victory\logs\.
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, plus the newest .crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\ if there is one from that run.
**@⁠trustno1-coder** on GitHub · 2026-11-30 15:37 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2021#issuecomment-7283309528) Closing this because it was opened before v2026.11.29.01, and a great deal has changed since then. The latest release is [v2026.11.30.01](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.30.01). If this still happens, or still applies, on the latest release, please open a new issue. For a bug, attach both logs from that run: 1. The play log: the newest `victory-nvidia-play-<date>-<time>-<number>.log` in `%LOCALAPPDATA%\victory\logs\`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, plus the newest `.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\` if there is one from that run.
Author
Owner

@⁠shurhundo on GitHub · 2026-11-30 15:40 UTC · original

PR #3723 (open) adds victory-tiers: per-object heat tracking (last use, seconds used in the last 44), a budget type with hysteresis and cooldown, and a book of what got let go so a bad eviction shows up as a refault. Built to be reused past its first user (idle windows).

Two pieces look directly usable here instead of building parallel ones:

  • The ~80-85% threshold this issue proposes is Line::margin + Account::look: a tested begin/end hysteresis band with cooldown, so it doesn't flap at the edge.
  • Heat::seen already gives per-object last-use and a 44 s usage window as a priority proxy, instead of inventing a second tracking mechanism for "near-camera/hero" vs "distant".

Doesn't replace the camera-proximity priority logic itself, just the budget/pressure plumbing underneath it.

**@⁠shurhundo** on GitHub · 2026-11-30 15:40 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2021#issuecomment-7283397743) PR #3723 (open) adds `victory-tiers`: per-object heat tracking (last use, seconds used in the last 44), a budget type with hysteresis and cooldown, and a book of what got let go so a bad eviction shows up as a refault. Built to be reused past its first user (idle windows). Two pieces look directly usable here instead of building parallel ones: - The ~80-85% threshold this issue proposes is `Line::margin` + `Account::look`: a tested begin/end hysteresis band with cooldown, so it doesn't flap at the edge. - `Heat::seen` already gives per-object last-use and a 44 s usage window as a priority proxy, instead of inventing a second tracking mechanism for "near-camera/hero" vs "distant". Doesn't replace the camera-proximity priority logic itself, just the budget/pressure plumbing underneath it.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA#2021
No description provided.