8 GB VRAM / 16 GB RAM: E_OUTOFMEMORY in the prologue; texture eviction ignores WDDM shared memory #3914

Open
opened 2026-11-30 20:56:25 +00:00 by litiumx · 1 comment
litiumx commented 2026-11-30 20:56:25 +00:00 (Migrated from github.com)
Contributor

Imported from Marvisak/VIctory. Originally posted by litiumx on 2026-11-30T20:56:25Z.


Summary

On an 8 GB card with 16 GB of system RAM the game dies with 0x8007000E (E_OUTOFMEMORY) 1–3 minutes into the prologue. Dedicated VRAM is not exhausted when it happens — the WDDM shared/system pool is. Reading crates/victory-gpu/src/resource.rs, texture eviction only looks at the card's own budget, never at the shared one, so nothing evicts for the pool that actually overflows.

This is reported against the NVIDIA build v2026.11.30.03 (a fork ahead of this tree), but the eviction code below is from this repository and I believe it is the shared root cause.

Environment

  • GPU: NVIDIA RTX 3070, 8192 MB, driver 621.40
  • CPU: Intel Core i5-11600KF (6C/12T), 16 GB DDR4, Windows 10 Pro 19045
  • HAGS enabled (HwSchMode=2)
  • Build: victory.exe v2026.11.30.03 (SHA-256 d178c927...fea3711), shader preload completed
  • Profile: Series S; tested SERIES S PICTURE 720 / 626 / 540, DLSS quality / balanced / performance, FRAME GENERATION off and x2 (FSR 3 and DLSS via MFG Unlocker), window 1920x1080, VICTORY_LEVELS_ON_DEMAND=1, VICTORY_RESIDENCY_PRIORITY=1, VICTORY_TEXTURE_BUDGET_MB=3000..4000

Symptom

Every configuration crashes in the prologue, including frame generation fully off and MFG Unlocker disabled:

memory now: committed 21959 MB, the card's own 6426 MB in use of a budget of 6978 MB,
            the PC's shared with the card 7717 MB in use
ERROR victory_gpu::host: a host state prelude did not record
      (0x8007000E)
ERROR victory_gpu::host: a host command list did not close (0x8007000E)
WARN  victory_gpu::host: no upload buffer error=... (0x8007000E) size=26214

The card sits at ~92% of its budget while the shared pool (~half of system RAM on a 16 GB machine) is full. System commit was 21.9 GB of a 34.5 GB limit, so paging is not the constraint.

Observation from source

evict_unused() (crates/victory-gpu/src/resource.rs) computes the eviction amount from the first pair of video_memory() only:

let over = crate::host::video_memory().map_or(0, |[(used, budget), _]| {
    let used = used - crate::placement::free_bytes() as f64 / 1e6;
    if used > BUDGET_HIGH * budget { ((used - BUDGET_LOW * budget) * 1e6) as u64 } else { 0 }
});

with BUDGET_HIGH = 0.90, BUDGET_LOW = 0.85, IDLE_MS = 120_000, IDLE_FRAMES = 300. The second pair (system/shared memory) is ignored. The VIctory-LITE fork adds exactly this guard (WDDM shared at 80% / 88%).

Request

Consider a shared-memory guard, or making the eviction threshold account for the shared pool, so 8 GB cards do not fail at ~92% of the card budget while shared memory is full.

Things that did not help

  • VICTORY_CARD_ROOM_FOR_TARGETS_MB=1500, VICTORY_CARD_BUFFERS_MB=800, VICTORY_CARD_WINDOWS_MB=400 — flood of 0x8007000E, crash.
  • VICTORY_TEXTURE_BUDGET_MB=4000 — lowered commit from ~22 GB to ~16 GB and let the prologue load once (~8 fps with heavy swapping), but did not prevent the crash.
  • Lowering the render resolution (720 → 540) alone did not change the failure.
<!-- greyfinch-sync:Marvisak/VIctory:issue:6706064425 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/3914). Originally posted by [litiumx](https://github.com/litiumx) on 2026-11-30T20:56:25Z. --- ## Summary On an 8 GB card with 16 GB of system RAM the game dies with `0x8007000E` (E_OUTOFMEMORY) 1–3 minutes into the prologue. Dedicated VRAM is not exhausted when it happens — the WDDM **shared/system** pool is. Reading `crates/victory-gpu/src/resource.rs`, texture eviction only looks at the card's own budget, never at the shared one, so nothing evicts for the pool that actually overflows. This is reported against the NVIDIA build `v2026.11.30.03` (a fork ahead of this tree), but the eviction code below is from this repository and I believe it is the shared root cause. ## Environment - GPU: NVIDIA RTX 3070, 8192 MB, driver 621.40 - CPU: Intel Core i5-11600KF (6C/12T), 16 GB DDR4, Windows 10 Pro 19045 - HAGS enabled (`HwSchMode=2`) - Build: `victory.exe` v2026.11.30.03 (SHA-256 `d178c927...fea3711`), shader preload completed - Profile: Series S; tested `SERIES S PICTURE` 720 / 626 / 540, `DLSS` quality / balanced / performance, `FRAME GENERATION` off and x2 (FSR 3 and DLSS via MFG Unlocker), window 1920x1080, `VICTORY_LEVELS_ON_DEMAND=1`, `VICTORY_RESIDENCY_PRIORITY=1`, `VICTORY_TEXTURE_BUDGET_MB=3000..4000` ## Symptom Every configuration crashes in the prologue, including **frame generation fully off and MFG Unlocker disabled**: ``` memory now: committed 21959 MB, the card's own 6426 MB in use of a budget of 6978 MB, the PC's shared with the card 7717 MB in use ERROR victory_gpu::host: a host state prelude did not record (0x8007000E) ERROR victory_gpu::host: a host command list did not close (0x8007000E) WARN victory_gpu::host: no upload buffer error=... (0x8007000E) size=26214 ``` The card sits at ~92% of its budget while the shared pool (~half of system RAM on a 16 GB machine) is full. System commit was 21.9 GB of a 34.5 GB limit, so paging is not the constraint. ## Observation from source `evict_unused()` (crates/victory-gpu/src/resource.rs) computes the eviction amount from the **first** pair of `video_memory()` only: ```rust let over = crate::host::video_memory().map_or(0, |[(used, budget), _]| { let used = used - crate::placement::free_bytes() as f64 / 1e6; if used > BUDGET_HIGH * budget { ((used - BUDGET_LOW * budget) * 1e6) as u64 } else { 0 } }); ``` with `BUDGET_HIGH = 0.90`, `BUDGET_LOW = 0.85`, `IDLE_MS = 120_000`, `IDLE_FRAMES = 300`. The second pair (system/shared memory) is ignored. The `VIctory-LITE` fork adds exactly this guard (WDDM shared at 80% / 88%). ## Request Consider a shared-memory guard, or making the eviction threshold account for the shared pool, so 8 GB cards do not fail at ~92% of the card budget while shared memory is full. ## Things that did not help - `VICTORY_CARD_ROOM_FOR_TARGETS_MB=1500`, `VICTORY_CARD_BUFFERS_MB=800`, `VICTORY_CARD_WINDOWS_MB=400` — flood of `0x8007000E`, crash. - `VICTORY_TEXTURE_BUDGET_MB=4000` — lowered commit from ~22 GB to ~16 GB and let the prologue load once (~8 fps with heavy swapping), but did not prevent the crash. - Lowering the render resolution (720 → 540) alone did not change the failure.
KainanP commented 2026-12-01 08:40:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by KainanP on 2026-12-01T08:40:06Z.


I measured which memory group each kind of D3D12 allocation counts in. I used a standalone D3D12 program, not the game, on an RTX 4060 Laptop 8 GB with 32 GB of RAM. Its local budget is 7,188 MB and its non-local budget is 15,483 MB.

Allocation Local use Non-local use
256 MB UPLOAD buffer +0 +256
256 MB custom heap, WRITE_BACK / L0 (what Host::shared_buffer makes) +0 +256
DEFAULT buffers up to 8,192 MB, about 1 GB past the local budget +8,192 +0

What this means for the request:

  • Textures live in DEFAULT heaps, so they count only in the local group, even past the budget.
  • So giving up host textures cannot lower the "shared" number in your log. A shared-memory term in evict_unused() would throw textures away while the pool that fails stays just as full.
  • On this tree the local check also already fires at 6,426 of 6,978 MB. That is over 90 % unless the placement heaps hold 146 MB or more free.

What fills the shared group on this tree:

  • Copies of title memory made by shared_buffer:
    • shadow::find: one copy the size of each title buffer, kept until the title releases it.
    • shadow::loose: 4 MiB windows, never freed.
  • List uploads and scratch.

With 16 GB of RAM the non-local budget is about half of it, which fits your 7,717 MB. #2875 measured the same failure: the non-local group pinned at 103-104 %, Close() returning E_OUTOFMEMORY, and loose windows making up 3.9 GB of it. Three open PRs target it:

  • #3078 frees idle windows.
  • #2875 moves windows to video memory (VICTORY_LOOSE_IN_GPU_UPLOAD=1).
  • #3067 caps them under a RAM budget.

How to confirm it (on a build with diagnostics):

  • Set VICTORY_LOG=victory_gpu::shadow=debug,info. Count the loose memory copied to the host lines (4 MiB each) and add up len across the large buffer copied to the host lines. Compare both with the video memory: … MB of … MB in system memory line every 5 s. If they rise with the shared number up to the crash, the copies are the cause.
  • Run an A/B with #3078 (VICTORY_WINDOW_IDLE_SECS=30) or #2875 (VICTORY_LOOSE_IN_GPU_UPLOAD=1), with the texture settings unchanged. The shared number should level off and the 0x8007000E errors should stop.

Your fork may name these differently. The question is the same: what grows in the non-local group until the crash.

AI use: written with Claude Code; the table comes from the program above, run on the 4060 Laptop.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7305620893 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/3914#issuecomment-7305620893). Originally posted by [KainanP](https://github.com/KainanP) on 2026-12-01T08:40:06Z. --- I measured which memory group each kind of D3D12 allocation counts in. I used a standalone D3D12 program, not the game, on an RTX 4060 Laptop 8 GB with 32 GB of RAM. Its local budget is 7,188 MB and its non-local budget is 15,483 MB. | Allocation | Local use | Non-local use | |---|---|---| | 256 MB UPLOAD buffer | +0 | +256 | | 256 MB custom heap, WRITE_BACK / L0 (what `Host::shared_buffer` makes) | +0 | +256 | | DEFAULT buffers up to 8,192 MB, about 1 GB past the local budget | +8,192 | +0 | **What this means for the request:** - Textures live in DEFAULT heaps, so they count only in the local group, even past the budget. - So giving up host textures cannot lower the "shared" number in your log. A shared-memory term in `evict_unused()` would throw textures away while the pool that fails stays just as full. - On this tree the local check also already fires at 6,426 of 6,978 MB. That is over 90 % unless the placement heaps hold 146 MB or more free. **What fills the shared group on this tree:** - Copies of title memory made by `shared_buffer`: - `shadow::find`: one copy the size of each title buffer, kept until the title releases it. - `shadow::loose`: 4 MiB windows, never freed. - List uploads and scratch. With 16 GB of RAM the non-local budget is about half of it, which fits your 7,717 MB. #2875 measured the same failure: the non-local group pinned at 103-104 %, `Close()` returning E_OUTOFMEMORY, and loose windows making up 3.9 GB of it. Three open PRs target it: - #3078 frees idle windows. - #2875 moves windows to video memory (`VICTORY_LOOSE_IN_GPU_UPLOAD=1`). - #3067 caps them under a RAM budget. **How to confirm it (on a build with `diagnostics`):** - Set `VICTORY_LOG=victory_gpu::shadow=debug,info`. Count the `loose memory copied to the host` lines (4 MiB each) and add up `len` across the `large buffer copied to the host` lines. Compare both with the `video memory: … MB of … MB in system memory` line every 5 s. If they rise with the shared number up to the crash, the copies are the cause. - Run an A/B with #3078 (`VICTORY_WINDOW_IDLE_SECS=30`) or #2875 (`VICTORY_LOOSE_IN_GPU_UPLOAD=1`), with the texture settings unchanged. The shared number should level off and the 0x8007000E errors should stop. Your fork may name these differently. The question is the same: what grows in the non-local group until the crash. _AI use: written with Claude Code; the table comes from the program above, run on the 4060 Laptop._
Sign in to join this conversation.
No labels
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.

Reference
Marvisak/VIctory#3914
No description provided.