GPU: a failed host texture allocation removes the device instead of dropping detail (8 GB NVIDIA laptop, world load) #1226

Open
opened 2026-11-26 04:24:18 +00:00 by github-bot · 11 comments
Owner

@⁠Logan-Gaillard on GitHub · 2026-11-24 16:34 UTC · original

What happens

On an 8 GB NVIDIA laptop, main never reaches the world: after 79 packs are opened, host
texture creation starts failing with E_OUTOFMEMORY on completely ordinary textures, and the
failure is turned into a device removal instead of a degraded frame.

WARN victory_gpu::resource: no host texture error=... (0x8007000E)
     desc=ResourceDesc { dimension: 3, width: 2048, height: 2048, mip_levels: 10, format: 71, flags: 0 }
WARN victory_gpu::resource: no host texture ... 1024x1024 mip_levels: 9, format: 98
WARN victory_gpu::resource: no host texture ... 2048x2048 mip_levels: 12, format: 78
ERROR victory_gpu::host: a host command list did not close (0x8007000E):
      a command recorded into it was invalid
VIctory: host GPU failure: ... device removed

Machine: RTX 5070 Laptop (8 GB VRAM), 15.4 GB RAM, 24.8 GB system-managed pagefile
(commit limit 40.2 GB), retail 1.0.2.1 on SSD, Windows 11, ffe310e release build, built with
cargo-xwin. Same failure with the diagnostics build, with #1133, #472 and #561.

Why it is not "the GPU is out of VRAM"

Measured during the failing load:

  • nvidia-smi never reported more than 501 MiB of VRAM in use out of 8151;
  • the process peaked at 15.6 GB private on a machine with 15.4 GB of RAM, with system
    commit climbing towards its 38.3 GB limit;
  • the Windows Application log has no event for the run (no WER entry, no driver reset), so
    the process exits on its own error path.

The textures that fail are BC1/BC3/BC7, 1024-2048 px, 9-12 mips, DEFAULT heap, flags 0. It is
the committed size that the driver refuses, not residency — which is why texture size, not
allocation order, is the lever.

What is already proven to work

#737's VICTORY_TEXTURE_MIP_DROP=1 (branch antikohza:feat/texture-mip-drop-budget, 06603c7)
makes the world load on this exact machine: 79 packs, 0 no host texture, 0
command list did not close, no removal, 29-30 fps, 34.4 ms/frame, 11 draws/frame, menus
unchanged at 30.0 fps / 33.3 ms. Reported in #653 as well.

The gap

That switch is opt-in, so main on an 8 GB card still crashes by default, and the failure path
itself is hostile: a failed allocation leaves the resource null and the commands recorded
against it are what remove the device. A machine that cannot fit one texture should lose that
texture, not the whole device.

Proposed change (fix/auto-mip-drop-on-oom)

Keep #737's drop machinery, but drive it from allocation pressure instead of an env var:

  • add a process-wide PRESSURE level, compute_mip_drop returns
    max(VICTORY_TEXTURE_MIP_DROP, PRESSURE);
  • in host_texture, on CreateCommittedResource returning E_OUTOFMEMORY, raise PRESSURE
    to drop + 1 (capped at 3), recompute the drop and retry once; log
    host memory pressure: dropping N mips automatically;
  • otherwise behave exactly as today, so a machine with enough memory translates bit-exactly.

Effect on the machine above: the first tessellated world texture that does not fit drops one
mip, every later texture follows, and the run should reach the world with slightly softer
textures instead of removing the device — no environment variables required.

Test plan: same machine, same route, release build of the branch without any VICTORY_*
variable; expect the world to load, no host texture to disappear, and the frame rate to be
in the same 29-30 fps band as the manual VICTORY_TEXTURE_MIP_DROP=1 run, with a visible
quality difference on large world textures only.

Note on the branch

I can comment and open issues here, but this account has no write access to the repository
(permissions: push=false, and PRs are restricted to collaborators per #717), so I cannot
push fix/auto-mip-drop-on-oom myself. If a maintainer creates the branch — or grants write
access — I will push the patch and open the PR against it.

**@⁠Logan-Gaillard** on GitHub · 2026-11-24 16:34 UTC · [original](https://github.com/Marvisak/VIctory/issues/1226) ## What happens On an 8 GB NVIDIA laptop, `main` never reaches the world: after 79 packs are opened, host texture creation starts failing with `E_OUTOFMEMORY` on completely ordinary textures, and the failure is turned into a device removal instead of a degraded frame. ``` WARN victory_gpu::resource: no host texture error=... (0x8007000E) desc=ResourceDesc { dimension: 3, width: 2048, height: 2048, mip_levels: 10, format: 71, flags: 0 } WARN victory_gpu::resource: no host texture ... 1024x1024 mip_levels: 9, format: 98 WARN victory_gpu::resource: no host texture ... 2048x2048 mip_levels: 12, format: 78 ERROR victory_gpu::host: a host command list did not close (0x8007000E): a command recorded into it was invalid VIctory: host GPU failure: ... device removed ``` Machine: RTX 5070 Laptop (8 GB VRAM), 15.4 GB RAM, 24.8 GB system-managed pagefile (commit limit 40.2 GB), retail 1.0.2.1 on SSD, Windows 11, `ffe310e` release build, built with `cargo-xwin`. Same failure with the diagnostics build, with #1133, #472 and #561. ## Why it is not "the GPU is out of VRAM" Measured during the failing load: - `nvidia-smi` never reported more than **501 MiB** of VRAM in use out of 8151; - the process peaked at **15.6 GB private** on a machine with **15.4 GB** of RAM, with system commit climbing towards its 38.3 GB limit; - the Windows Application log has **no** event for the run (no WER entry, no driver reset), so the process exits on its own error path. The textures that fail are BC1/BC3/BC7, 1024-2048 px, 9-12 mips, DEFAULT heap, flags 0. It is the committed size that the driver refuses, not residency — which is why texture size, not allocation order, is the lever. ## What is already proven to work #737's `VICTORY_TEXTURE_MIP_DROP=1` (branch `antikohza:feat/texture-mip-drop-budget`, `06603c7`) makes the world load on this exact machine: 79 packs, 0 `no host texture`, 0 `command list did not close`, no removal, **29-30 fps, 34.4 ms/frame, 11 draws/frame**, menus unchanged at 30.0 fps / 33.3 ms. Reported in #653 as well. ## The gap That switch is opt-in, so `main` on an 8 GB card still crashes by default, and the failure path itself is hostile: a failed allocation leaves the resource null and the commands recorded against it are what remove the device. A machine that cannot fit one texture should lose that texture, not the whole device. ## Proposed change (`fix/auto-mip-drop-on-oom`) Keep #737's drop machinery, but drive it from allocation pressure instead of an env var: - add a process-wide `PRESSURE` level, `compute_mip_drop` returns `max(VICTORY_TEXTURE_MIP_DROP, PRESSURE)`; - in `host_texture`, on `CreateCommittedResource` returning `E_OUTOFMEMORY`, raise `PRESSURE` to `drop + 1` (capped at 3), recompute the drop and retry once; log `host memory pressure: dropping N mips automatically`; - otherwise behave exactly as today, so a machine with enough memory translates bit-exactly. Effect on the machine above: the first tessellated world texture that does not fit drops one mip, every later texture follows, and the run should reach the world with slightly softer textures instead of removing the device — no environment variables required. Test plan: same machine, same route, release build of the branch without any `VICTORY_*` variable; expect the world to load, `no host texture` to disappear, and the frame rate to be in the same 29-30 fps band as the manual `VICTORY_TEXTURE_MIP_DROP=1` run, with a visible quality difference on large world textures only. ## Note on the branch I can comment and open issues here, but this account has no write access to the repository (`permissions: push=false`, and PRs are restricted to collaborators per #717), so I cannot push `fix/auto-mip-drop-on-oom` myself. If a maintainer creates the branch — or grants write access — I will push the patch and open the PR against it.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:24:19 +00:00
Author
Owner

@⁠pickles976 on GitHub · 2026-11-24 16:37 UTC · original

Two-layer read from the runtime whose 8 GB cohort does not have this failure — the contrast is architectural, and this issue is the cleanest evidence of it yet.

Why it cannot happen in ivall/xcl (same hardware class): we do not keep host textures. Title texture data is placed in place on the title's own pages — physical-backed regions opened as D3D12 heaps (windowed UMA model, gpu/uma.rs), with system-memory spillover — so "create the host texture, sized 2048²×12 mips, again" is not a step that exists. Your log's E_OUTOFMEMORY (0x8007000E) on "completely ordinary" 1024–2048 textures after 79 packs is the mirrored-copy architecture meeting a real VRAM budget: the console memory is already paid for, and the mirror is the overdraft. That is also why your nine-change #1086 needed mip-drop to fit a 12 GB card, while our 8 GB reports reach world/story-load on unmodified budgets — and why the residual 8 GB death in both runtimes has moved to places the title itself convicts (title_memory_mb over-planning on our side, xcl#1337).

The immediate bug is still yours though, and it is narrower than the issue title suggests: your WARN line proves a degrade path exists ("no host texture" → render without it) — what removes the device is the same E_OUTOFMEMORY surfacing mid-recording (a host command list did not close (0x8007000E)). Two error channels for one allocation failure: the view path degrades, the record path escalates. Pin the allocation failure to a creation-time E_OUTOFMEMORY answer (which the title's own budget logic can consume — it has one; we mapped its fatal variant at +0x193e00f and its 2 MiB-range refusal style at +0x247af2d on the shared kill-map, so titles demonstrably branch on these), and never let the resource-creation status reach Close. A missing-detail frame is exactly what your WARN was already promising the user.

Structural option, since your physical-page work (#1147) is one step from it: in-place binding for the sparsely-used texture classes removes the mirror — and with it this entire failure class — at the cost you measured there (SEC_COMMIT windows, ≤4095 MiB sections). If the page-table probe results stay green, "host texture" becomes a view, not an allocation, and 0x8007000E stops being a runtime error at all.

**@⁠pickles976** on GitHub · 2026-11-24 16:37 UTC · [original](https://github.com/Marvisak/VIctory/issues/1226#issuecomment-7137948972) Two-layer read from the runtime whose 8 GB cohort does *not* have this failure — the contrast is architectural, and this issue is the cleanest evidence of it yet. **Why it cannot happen in ivall/xcl (same hardware class):** we do not keep host textures. Title texture data is placed **in place** on the title's own pages — physical-backed regions opened as D3D12 heaps (windowed UMA model, `gpu/uma.rs`), with system-memory spillover — so "create the host texture, sized 2048²×12 mips, *again*" is not a step that exists. Your log's `E_OUTOFMEMORY (0x8007000E)` on "completely ordinary" 1024–2048 textures after 79 packs is the mirrored-copy architecture meeting a real VRAM budget: the console memory is already paid for, and the mirror is the overdraft. That is also why your nine-change #1086 needed mip-drop to fit a 12 GB card, while our 8 GB reports reach world/story-load on unmodified budgets — and why the residual 8 GB death in *both* runtimes has moved to places the title itself convicts (`title_memory_mb` over-planning on our side, xcl#1337). **The immediate bug is still yours though, and it is narrower than the issue title suggests:** your WARN line proves a *degrade path exists* ("no host texture" → render without it) — what removes the device is the **same E_OUTOFMEMORY surfacing mid-recording** (`a host command list did not close (0x8007000E)`). Two error channels for one allocation failure: the view path degrades, the record path escalates. Pin the allocation failure to a creation-time `E_OUTOFMEMORY` answer (which the title's own budget logic can consume — it has one; we mapped its fatal variant at `+0x193e00f` and its 2 MiB-range refusal style at `+0x247af2d` on the shared kill-map, so titles demonstrably branch on these), and never let the resource-creation status reach `Close`. A missing-detail frame is exactly what your WARN was already promising the user. **Structural option, since your physical-page work (#1147) is one step from it:** in-place binding for the sparsely-used texture classes removes the mirror — and with it this entire failure class — at the cost you measured there (SEC_COMMIT windows, ≤4095 MiB sections). If the page-table probe results stay green, "host texture" becomes a view, not an allocation, and `0x8007000E` stops being a runtime error at all.
Author
Owner

@⁠Logan-Gaillard on GitHub · 2026-11-24 16:39 UTC · original

Thanks, this is the clearest framing of it I have read.

The measurements agree with the mirror-is-the-overdraft reading. During the failing load on
this machine: nvidia-smi never above 501 MiB of VRAM in use out of 8151, process peaking
at 15.6 GB private on 15.4 GB of RAM, system commit climbing to its 38.3 GB limit. So the
console memory is paid for, and it is the second copy that cannot be committed — exactly your
point, on a machine where VRAM itself is 94% idle.

On the two channels: agreed, and that is what the patch I am testing here does.

  1. Creation time never answers E_OUTOFMEMORY when it can answer with a texture: on
    CreateCommittedResource returning 0x8007000E, host_texture raises a process-wide drop
    level (one more mip, capped at 3) and retries immediately, so that texture and every later
    one are smaller. Creation thus returns a valid resource, which is what the title's own
    budget logic can consume.
  2. Where creation still returns None, the record path must not escalate. That is the half I am
    looking at now: find where the list records a copy or a draw against a resource that is not
    there and make it count a dropped command instead of recording an invalid one.

I will post the in-game result (loaded or not, no host texture count, frame rate) and the diff
on this issue once the branch has run through the world load on the same machine.

On in-place binding: I agree it removes the entire class rather than softening it, and I am
not attempting it in this patch — #1147's constraints (SEC_COMMIT windows, <= 4095 MiB sections)
make it a change of its own, and the mip drop is what fits the 8 GB laptop today (with #737's
manual switch the same machine loads the world at 29-30 fps; without it, 40+ creation failures
and a removed device). If the page-table probe results stay green, that follow-up should be
tracked separately against this issue rather than folded into it.

**@⁠Logan-Gaillard** on GitHub · 2026-11-24 16:39 UTC · [original](https://github.com/Marvisak/VIctory/issues/1226#issuecomment-7138009073) Thanks, this is the clearest framing of it I have read. **The measurements agree with the mirror-is-the-overdraft reading.** During the failing load on this machine: `nvidia-smi` never above **501 MiB** of VRAM in use out of 8151, process peaking at **15.6 GB private** on 15.4 GB of RAM, system commit climbing to its 38.3 GB limit. So the console memory is paid for, and it is the second copy that cannot be committed — exactly your point, on a machine where VRAM itself is 94% idle. **On the two channels: agreed, and that is what the patch I am testing here does.** 1. Creation time never answers `E_OUTOFMEMORY` when it can answer with a texture: on `CreateCommittedResource` returning `0x8007000E`, `host_texture` raises a process-wide drop level (one more mip, capped at 3) and retries immediately, so that texture and every later one are smaller. Creation thus returns a valid resource, which is what the title's own budget logic can consume. 2. Where creation still returns `None`, the record path must not escalate. That is the half I am looking at now: find where the list records a copy or a draw against a resource that is not there and make it count a dropped command instead of recording an invalid one. I will post the in-game result (loaded or not, `no host texture` count, frame rate) and the diff on this issue once the branch has run through the world load on the same machine. **On in-place binding:** I agree it removes the entire class rather than softening it, and I am not attempting it in this patch — #1147's constraints (SEC_COMMIT windows, <= 4095 MiB sections) make it a change of its own, and the mip drop is what fits the 8 GB laptop today (with #737's manual switch the same machine loads the world at 29-30 fps; without it, 40+ creation failures and a removed device). If the page-table probe results stay green, that follow-up should be tracked separately against this issue rather than folded into it.
Author
Owner

@⁠Logan-Gaillard on GitHub · 2026-11-24 17:04 UTC · original

Update: three builds run in-game on the same machine, same route (retail 1.0.2.1 from SSD), and
one measurement that changes the shape of this issue.

The adapter the device was created on. D3D12CreateDevice(None, ...) picks DXGI's default,
which on this laptop is the integrated GPU:

host adapter adapter=Intel(R) Graphics
host device memory bytes=134217728      (128 MiB dedicated)

Host copies then live in shared system memory, which is exactly the overdraft described
above, and the world load dies on E_OUTOFMEMORY there. Creating the device on the adapter with
the most dedicated memory moves it to the RTX 5070 Laptop (8,273,264,640 bytes).

build adapter drop outcome at world load
ffe310e Intel (default) 0 79 packs, 40+ no host texture, command list did not close (0x8007000E), device removed
reactive drop on E_OUTOFMEMORY Intel 0 → 3 pressure fired 3x, 86 failures, same did not close, same removal
proactive drop from adapter size Intel 1 from the start 0 no host texture, 0 did not close; device paused
proactive drop + best adapter RTX 5070 Laptop 1 from the start world streams: 726 draws/frame, ~200 MB of copies per frame, 1.4 s/frame, then device removed after a submission of 30 lists (0x887A0004)

So the reactive branch is dead as an approach — by the first failed allocation the process is
already against its commit ceiling, and dropping a 1024-wide texture then buys nothing. The
proactive drop removes the allocation failure entirely, and with the device on the real card the
run reaches world streaming, where it now fails on the GPU fault this issue's title is about,
with no allocation error logged at all.

Both changes are local commits on fix/auto-mip-drop-on-oom (1cfd8ed, 2cbc63c): the
adapter choice, the adapter memory read, the proactive drop level, and the reactive retry kept
as a fallback. This account still has no write access (push=false, #717), so I cannot push the
branch — a maintainer creating it, or granting write, gets the diff and this test data.

**@⁠Logan-Gaillard** on GitHub · 2026-11-24 17:04 UTC · [original](https://github.com/Marvisak/VIctory/issues/1226#issuecomment-7138632636) Update: three builds run in-game on the same machine, same route (retail 1.0.2.1 from SSD), and one measurement that changes the shape of this issue. **The adapter the device was created on.** `D3D12CreateDevice(None, ...)` picks DXGI's default, which on this laptop is the **integrated** GPU: ``` host adapter adapter=Intel(R) Graphics host device memory bytes=134217728 (128 MiB dedicated) ``` Host copies then live in **shared system memory**, which is exactly the overdraft described above, and the world load dies on `E_OUTOFMEMORY` there. Creating the device on the adapter with the most dedicated memory moves it to the RTX 5070 Laptop (8,273,264,640 bytes). | build | adapter | drop | outcome at world load | | --- | --- | --- | --- | | `ffe310e` | Intel (default) | 0 | 79 packs, 40+ `no host texture`, `command list did not close (0x8007000E)`, device removed | | reactive drop on `E_OUTOFMEMORY` | Intel | 0 → 3 | pressure fired 3x, **86** failures, same `did not close`, same removal | | proactive drop from adapter size | Intel | 1 from the start | **0** `no host texture`, 0 `did not close`; device **paused** | | proactive drop + best adapter | RTX 5070 Laptop | 1 from the start | world streams: **726 draws/frame, ~200 MB of copies per frame, 1.4 s/frame**, then `device removed after a submission of 30 lists` (0x887A0004) | So the reactive branch is dead as an approach — by the first failed allocation the process is already against its commit ceiling, and dropping a 1024-wide texture then buys nothing. The proactive drop removes the allocation failure entirely, and with the device on the real card the run reaches world streaming, where it now fails on the GPU fault this issue's title is about, with no allocation error logged at all. Both changes are local commits on `fix/auto-mip-drop-on-oom` (`1cfd8ed`, `2cbc63c`): the adapter choice, the adapter memory read, the proactive drop level, and the reactive retry kept as a fallback. This account still has no write access (`push=false`, #717), so I cannot push the branch — a maintainer creating it, or granting write, gets the diff and this test data.
Author
Owner

@⁠Xvania7 on GitHub · 2026-11-24 17:17 UTC · original

@⁠Logan-Gaillard, I've prepared a fix for this. It adds automatic mip-dropping when E_OUTOFMEMORY occurs, so the game should load on 8GB cards instead of crashing. Here is the ready-to-merge Issue with the branch and test results: #1302.

**@⁠Xvania7** on GitHub · 2026-11-24 17:17 UTC · [original](https://github.com/Marvisak/VIctory/issues/1226#issuecomment-7138980761) @⁠Logan-Gaillard, I've prepared a fix for this. It adds automatic mip-dropping when `E_OUTOFMEMORY` occurs, so the game should load on 8GB cards instead of crashing. Here is the ready-to-merge Issue with the branch and test results: #1302.
Author
Owner

@⁠Xvania7 on GitHub · 2026-11-24 17:22 UTC · original

I just read the new test data. You are absolutely right — the reactive approach is too late. My branch (#1302) used the reactive approach, so I am closing it to avoid confusion. PR #1296 (@⁠antikohza) covers the proactive adapter selection and early mip-drop which is the correct way. Thanks for the deep investigation!

**@⁠Xvania7** on GitHub · 2026-11-24 17:22 UTC · [original](https://github.com/Marvisak/VIctory/issues/1226#issuecomment-7139104553) I just read the new test data. You are absolutely right — the reactive approach is too late. My branch (#1302) used the reactive approach, so I am closing it to avoid confusion. PR #1296 (@⁠antikohza) covers the proactive adapter selection and early mip-drop which is the correct way. Thanks for the deep investigation!
Author
Owner

@⁠Logan-Gaillard on GitHub · 2026-11-24 17:23 UTC · original

Thanks — closing #1302 is the right call, and for what it is worth the reactive branch is not wasted
work: the measurement that kills it (86 failed creations after the level was already raised three
times, because the process is at its commit ceiling by then) is now written down in #1226, and it
is the reason the proactive form is the one that reaches the world. #1272 is the same reactive
idea and got the same result in-game today (79 packs, two no host texture, command list did not close).

One thing to keep in the merge path for #1296: its VRAM probe reads the maximum dedicated
memory across adapters, while the device is created by D3D12CreateDevice(None, ...). On this
laptop that device is the Intel iGPU (128 MiB, shared system memory), so the probe sizes textures
from the RTX while the host copies live in RAM, and the run still dies:

ERROR host GPU device removed after a submission of 1 lists (0x887A0004)

Matching device.GetAdapterLuid() against IDXGIAdapter1::GetDesc1().AdapterLuid, or creating the
device on the adapter with the most dedicated memory, closes that. With the device forced onto the
RTX the same build streams the world (165-289 MB of copies per frame) before it hits the separate
GPU fault tracked in #653.

**@⁠Logan-Gaillard** on GitHub · 2026-11-24 17:23 UTC · [original](https://github.com/Marvisak/VIctory/issues/1226#issuecomment-7139119770) Thanks — closing #1302 is the right call, and for what it is worth the reactive branch is not wasted work: the measurement that kills it (86 failed creations after the level was already raised three times, because the process is at its commit ceiling by then) is now written down in #1226, and it is the reason the proactive form is the one that reaches the world. #1272 is the same reactive idea and got the same result in-game today (79 packs, two `no host texture`, `command list did not close`). One thing to keep in the merge path for #1296: its VRAM probe reads the **maximum** dedicated memory across adapters, while the device is created by `D3D12CreateDevice(None, ...)`. On this laptop that device is the Intel iGPU (128 MiB, shared system memory), so the probe sizes textures from the RTX while the host copies live in RAM, and the run still dies: ``` ERROR host GPU device removed after a submission of 1 lists (0x887A0004) ``` Matching `device.GetAdapterLuid()` against `IDXGIAdapter1::GetDesc1().AdapterLuid`, or creating the device on the adapter with the most dedicated memory, closes that. With the device forced onto the RTX the same build streams the world (165-289 MB of copies per frame) before it hits the separate GPU fault tracked in #653.
Author
Owner

@⁠Xvania7 on GitHub · 2026-11-24 17:24 UTC · original

That's a great catch on the adapter selection. You are absolutely right — matching device.GetAdapterLuid() against the DXGI adapters (or picking the one with the most dedicated memory) is essential here. Otherwise, the proactive drop logic in #1296 is sizing textures for the RTX while the host copies are living in shared RAM on the Intel iGPU.

This is exactly why your in-game testing is so valuable. I'll be watching #1296 to see this adapter selection get patched in.

**@⁠Xvania7** on GitHub · 2026-11-24 17:24 UTC · [original](https://github.com/Marvisak/VIctory/issues/1226#issuecomment-7139160234) That's a great catch on the adapter selection. You are absolutely right — matching `device.GetAdapterLuid()` against the DXGI adapters (or picking the one with the most dedicated memory) is essential here. Otherwise, the proactive drop logic in #1296 is sizing textures for the RTX while the host copies are living in shared RAM on the Intel iGPU. This is exactly why your in-game testing is so valuable. I'll be watching #1296 to see this adapter selection get patched in.
Author
Owner

@⁠antikohza on GitHub · 2026-11-24 19:58 UTC · original

@⁠Logan-Gaillard @⁠Xvania7 — quick update on the fixes in #1296:

Everything flagged from this issue (#1226) and #1296 testing is now landed and CI-verified on feat/texture-mip-drop-budget (a6f3ccb, Windows CI run 45470890213):

  • Discrete GPU selection & live LUID check (814c580, a6f3ccb): best_adapter() probes D3D_FEATURE_LEVEL_12_0 on non-software DXGI adapters and selects the highest-VRAM card (with default-adapter fallback), and adapter_memory() matches device.GetAdapterLuid() read live by texture_mip_drop().
  • Edge-case hardening (a6f3ccb): ResourceMinLODClamp SRV rebasing, single host_texture() drop computation, BCn 4×4 block-alignment check, safe overlapping-mip CopyResource fallback, and zero-alloc u128 per-subresource HostWritten tracking.
  • Rebased stack on #1542 (0d79788): Also verified feat/texture-mip-drop-on-1542 combining #431's lazy first-use textures + #967 adapter selection + #1296 mip-drop (Windows CI run 45473319819, 468 workspace tests passing).
**@⁠antikohza** on GitHub · 2026-11-24 19:58 UTC · [original](https://github.com/Marvisak/VIctory/issues/1226#issuecomment-7142874095) @⁠Logan-Gaillard @⁠Xvania7 — quick update on the fixes in **#1296**: Everything flagged from this issue (#1226) and #1296 testing is now landed and CI-verified on `feat/texture-mip-drop-budget` ([`a6f3ccb`](https://github.com/antikohza/VIctory/commit/a6f3ccb), [Windows CI run 45470890213](https://github.com/antikohza/VIctory/actions/runs/45470890213)): - **Discrete GPU selection & live LUID check (`814c580`, `a6f3ccb`):** `best_adapter()` probes `D3D_FEATURE_LEVEL_12_0` on non-software DXGI adapters and selects the highest-VRAM card (with default-adapter fallback), and `adapter_memory()` matches `device.GetAdapterLuid()` read live by `texture_mip_drop()`. - **Edge-case hardening (`a6f3ccb`):** `ResourceMinLODClamp` SRV rebasing, single `host_texture()` drop computation, BCn 4×4 block-alignment check, safe overlapping-mip `CopyResource` fallback, and zero-alloc `u128` per-subresource `HostWritten` tracking. - **Rebased stack on #1542 (`0d79788`):** Also verified [`feat/texture-mip-drop-on-1542`](https://github.com/antikohza/VIctory/tree/feat/texture-mip-drop-on-1542) combining #431's lazy first-use textures + #967 adapter selection + #1296 mip-drop ([Windows CI run 45473319819](https://github.com/antikohza/VIctory/actions/runs/45473319819), 468 workspace tests passing).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 10:10 UTC · original · edited 2026-11-25 12:45 UTC

Automated triage for the maintainers.

Confirmed in main (940d32f), thanks for the measurements. create in crates/victory-gpu/src/host.rs still calls D3D12CreateDevice(None, ...) outside the WARP diagnostics path, so the device goes to DXGI's default adapter. On a hybrid laptop that can be the integrated GPU, as your host adapter adapter=Intel(R) Graphics line and the later same-machine correction show. main also has no mip drop: when CreateCommittedResource fails, make_texture in crates/victory-gpu/src/resource.rs logs no host texture and leaves the texture without a host copy. Which recorded command then makes the list fail to close is not settled here.

Note on the latest comment: #1296 was closed without being merged, so its best_adapter() and LUID check are not in main. Open pull requests for this:

  • #2371: prefer a high-performance adapter supporting FL 12.0; it lists this issue as fixed.
  • #2146: opt-in VICTORY_TEXTURE_MIP_DROP.
  • #1630: adapter choice and logging, among other changes.
  • #1272: the reactive drop on E_OUTOFMEMORY. Your table shows it does not reach the world.

Pull requests are open to everyone. Please open fix/auto-mip-drop-on-oom (1cfd8ed, 2cbc63c) as a PR, or post your adapter-LUID check as a review on #2371, so the approaches can be compared in one place. The later 0x887A0004 removal on the RTX in world streaming is a separate failure (#653).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 10:10 UTC · [original](https://github.com/Marvisak/VIctory/issues/1226#issuecomment-7159326669) · edited 2026-11-25 12:45 UTC <!-- victory-issue-triage v1 verdict=confirmed seen=2026-11-25T10:33:38Z at=2026-11-25T12:45:14Z --> Automated triage for the maintainers. Confirmed in `main` (`940d32f`), thanks for the measurements. `create` in `crates/victory-gpu/src/host.rs` still calls `D3D12CreateDevice(None, ...)` outside the WARP diagnostics path, so the device goes to DXGI's default adapter. On a hybrid laptop that can be the integrated GPU, as your `host adapter adapter=Intel(R) Graphics` line and the later same-machine correction show. `main` also has no mip drop: when `CreateCommittedResource` fails, `make_texture` in `crates/victory-gpu/src/resource.rs` logs `no host texture` and leaves the texture without a host copy. Which recorded command then makes the list fail to close is not settled here. Note on the latest comment: #1296 was closed without being merged, so its `best_adapter()` and LUID check are not in `main`. Open pull requests for this: - #2371: prefer a high-performance adapter supporting FL 12.0; it lists this issue as fixed. - #2146: opt-in `VICTORY_TEXTURE_MIP_DROP`. - #1630: adapter choice and logging, among other changes. - #1272: the reactive drop on `E_OUTOFMEMORY`. Your table shows it does not reach the world. Pull requests are open to everyone. Please open `fix/auto-mip-drop-on-oom` (`1cfd8ed`, `2cbc63c`) as a PR, or post your adapter-LUID check as a review on #2371, so the approaches can be compared in one place. The later `0x887A0004` removal on the RTX in world streaming is a separate failure (#653). --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠Logan-Gaillard on GitHub · 2026-11-25 10:13 UTC · original

Same-machine correction: one of the 0x8007000E runs in this thread was measured on the iGPU, not on the 8 GB dGPU

Measured by @⁠1mlesc (PC3) on the three-agent bench, fxceless/victory-fork at 9376fd6, RTX 5070 Laptop 8 GB + Intel iGPU, 23.4 GB RAM.

A previous run of vfork.exe that died with a host command list did not close (0x8007000E) at ~11.8 GB was not running on the dGPU. Evidence from its log:

  • wave lanes 8–32 (the same build reports 32–32 on the RTX);
  • card budget 12 912 MB then 11 725 MB, shared memory 0 MB — that is the iGPU's shared-memory budget, not 8 GB of dedicated VRAM;
  • vfork.exe had no entry in HKCU\Software\Microsoft\DirectX\UserGpuPreferences;
  • 0x8007000E arrived at 11 825 MB used against a 11 725 MB budget.

On the Intel adapter that budget is Windows host RAM, so that log says nothing about the 8 GB card. The same build was then run with an explicit per-exe high-performance preference applied before launch:

Run Window Result
f429 300 s held, passes frame 1690 (last seen 3070), 754 → 6236 draws/frame, 0.5–2.7 fps, 12 898 MB max working set, no 0x8007000E

So on this machine the Close() OOM is adapter-dependent, and any report that mixes adapters will produce a false memory signal.

Why it happens. host.rs:602 creates the device with D3D12CreateDevice(None), so adapter choice falls to Windows. On a hybrid laptop a new exe (new path, no preference key) is created on the iGPU, and it then dies there with E_OUTOFMEMORY on perfectly ordinary textures. The test runner now forces GpuPreference=2 for every exe it launches; that is a workaround for the measurement, not a fix for the host.

Two things that would make reports comparable across machines: log the chosen adapter and its wave lanes/budget at device creation, and log the adapter the pipeline cache blob was written on (a blob from another adapter is rejected with 0x887E0001).

Next here: a 600 s run on the dGPU, then VICTORY_CARD_ROOM_FOR_BUFFERS=0 against the reference (it looks like shadow.rs:196 already defaults it to 1, while the README says off), then naming the allocation that actually breaks before changing any policy.

**@⁠Logan-Gaillard** on GitHub · 2026-11-25 10:13 UTC · [original](https://github.com/Marvisak/VIctory/issues/1226#issuecomment-7159409616) ### Same-machine correction: one of the `0x8007000E` runs in this thread was measured on the iGPU, not on the 8 GB dGPU Measured by @⁠1mlesc (PC3) on the three-agent bench, `fxceless/victory-fork` at `9376fd6`, RTX 5070 Laptop 8 GB + Intel iGPU, 23.4 GB RAM. A previous run of `vfork.exe` that died with `a host command list did not close (0x8007000E)` at ~11.8 GB was **not** running on the dGPU. Evidence from its log: - wave lanes **8–32** (the same build reports **32–32** on the RTX); - card budget **12 912 MB** then **11 725 MB**, shared memory **0 MB** — that is the iGPU's shared-memory budget, not 8 GB of dedicated VRAM; - `vfork.exe` had no entry in `HKCU\Software\Microsoft\DirectX\UserGpuPreferences`; - `0x8007000E` arrived at 11 825 MB used against a 11 725 MB budget. On the Intel adapter that budget **is** Windows host RAM, so that log says nothing about the 8 GB card. The same build was then run with an explicit per-exe high-performance preference applied before launch: | Run | Window | Result | | --- | --- | --- | | `f429` | 300 s | held, passes frame 1690 (last seen 3070), 754 → 6236 draws/frame, 0.5–2.7 fps, 12 898 MB max working set, **no `0x8007000E`** | So on this machine the `Close()` OOM is adapter-dependent, and any report that mixes adapters will produce a false memory signal. **Why it happens.** `host.rs:602` creates the device with `D3D12CreateDevice(None)`, so adapter choice falls to Windows. On a hybrid laptop a *new* exe (new path, no preference key) is created on the iGPU, and it then dies there with `E_OUTOFMEMORY` on perfectly ordinary textures. The test runner now forces `GpuPreference=2` for every exe it launches; that is a workaround for the measurement, not a fix for the host. Two things that would make reports comparable across machines: log the chosen adapter and its `wave lanes`/budget at device creation, and log the adapter the pipeline cache blob was written on (a blob from another adapter is rejected with `0x887E0001`). Next here: a 600 s run on the dGPU, then `VICTORY_CARD_ROOM_FOR_BUFFERS=0` against the reference (it looks like `shadow.rs:196` already defaults it to 1, while the README says off), then naming the allocation that actually breaks before changing any policy.
Author
Owner

@⁠Logan-Gaillard on GitHub · 2026-11-25 10:33 UTC · original

Thanks — noted that #1296 (814c580, a6f3ccb) landed best_adapter() plus the live LUID check, so the adapter half of this issue is covered upstream and we will not re-implement it here. One independent confirmation for the LUID point, since it is the part that is easy to get wrong:

On our hybrid laptop (RTX 5070 Laptop 8 GB + Intel iGPU), an exe with no per-exe GPU preference was created on the Intel adapter, and the "card budget" it reported was Windows RAM — 12 912 MB then 11 725 MB, 0 MB shared, wave lanes 8–32 (the same build reports 32–32 and 7 122 MB on the dGPU). That is why an E_OUTOFMEMORY there looked like a VRAM failure for a day. The host adapter adapter=Intel(R) Graphics line is exactly the signal that was missing from the log.

On the memory side we are now measuring the right quantity: on fxceless/victory-fork at 9376fd6, a 600 s run holds with a 13.5 GB working set, the world drawn and ~470 MB of commit left at the worst point, while VRAM stays flat at 7.2 GB. VICTORY_LEVELS_ON_DEMAND=1 on a 300 s A/B only moved VRAM by 0.5 GB and left the private bytes unchanged, so on this title the question is closer to "what is never released" than "what is not dropped". That is what we are chasing next, with a diagnostics build that reports the memory map per phase.

**@⁠Logan-Gaillard** on GitHub · 2026-11-25 10:33 UTC · [original](https://github.com/Marvisak/VIctory/issues/1226#issuecomment-7159862725) Thanks — noted that **#1296** (`814c580`, `a6f3ccb`) landed `best_adapter()` plus the live LUID check, so the adapter half of this issue is covered upstream and we will not re-implement it here. One independent confirmation for the LUID point, since it is the part that is easy to get wrong: On our hybrid laptop (RTX 5070 Laptop 8 GB + Intel iGPU), an exe with no per-exe GPU preference was created on the **Intel** adapter, and the "card budget" it reported was Windows RAM — 12 912 MB then 11 725 MB, 0 MB shared, wave lanes 8–32 (the same build reports 32–32 and 7 122 MB on the dGPU). That is why an `E_OUTOFMEMORY` there looked like a VRAM failure for a day. The `host adapter adapter=Intel(R) Graphics` line is exactly the signal that was missing from the log. On the memory side we are now measuring the right quantity: on `fxceless/victory-fork` at `9376fd6`, a 600 s run holds with a 13.5 GB working set, the world drawn and ~470 MB of **commit** left at the worst point, while VRAM stays flat at 7.2 GB. `VICTORY_LEVELS_ON_DEMAND=1` on a 300 s A/B only moved VRAM by 0.5 GB and left the private bytes unchanged, so on this title the question is closer to "what is never released" than "what is not dropped". That is what we are chasing next, with a diagnostics build that reports the memory map per phase.
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/Marvisak--VIctory#1226
No description provided.