GPU: free host textures only after running submissions, and make them on first use #431

Closed
AntoninMichelq wants to merge 2 commits from upstream-pr/431 into main
AntoninMichelq commented 2026-11-24 03:16:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by AntoninMichelq on 2026-11-24T03:16:12Z.


Requested by 4nto · project thread

Summary

Two changes to host texture lifetimes. Together they stop a GPU hang in the world and halve host texture memory on an 8 GB card.

  1. Free textures and slot resources only after the running submissions. A released title texture used to drop its host copy right away. A rewritten descriptor slot did the same with the resource it held. Both happened while a submission that still read them was running, sometimes for most of a second in the world. On an RX 7600, device-removed data (DRED) showed a page fault inside a freed 1024x1024 BC7 texture about 65 s into the world, ending in DXGI_ERROR_DEVICE_HUNG. These objects now go to a retired list, tagged with the submission count. They are dropped once that submission has been waited for, or right away if none is running.
  2. Make a texture's host copy on first use, not at creation. In the world the title creates thousands of textures, and many are never used by the GPU (no view, target, copy or barrier). At the world's peak there were 3,630 host textures, 8.9 GB, against a 7 GB video memory budget. The driver moves the excess to system memory, where it counts against the commit limit. The creation state and clear value are now kept, and the host copy is made on first use (OnceLock).

What changed

  • host.rs: retire() and the retired list, emptied after each waited submission.
  • descriptor/host.rs: HostHeap::keep retires the old resource instead of dropping it.
  • resource.rs:
    • Resource.host becomes a OnceLock made by host() on first use, from the kept made_with (state, clear value).
    • Drop retires the host copy.

This overlaps a little with #135, which keeps replaced resources for some frames. This PR covers texture releases and slot rewrites tied to the submission that reads them, and does not depend on #135.

How it was tested

  • cargo check --tests -p victory-gpu and cargo check -p victory for x86_64-pc-windows-msvc (with CARGO_FEATURE_PURE=1) pass.
  • In the game on an RX 7600 (Windows 11, 32 GB RAM), on an integration stack that includes these two commits:
    • Hang: before change 1, every world run hung at 50 to 65 s. After it, the next runs went 1 min 40 s to about 4 min with no hang. A later hang came from another freed buffer, which another branch handles.
    • Memory, one minute into the world: host textures went from 8.8 to 4.6 GB, peak commit from 24.3 to 17.4 GB, and video memory from 9.6 of 7.0 GB budget to 5.2 of 7.4. No missing objects were seen.

Where 3D rendering stands on an RX 7600 (Windows 11)

  • In the world's first cutscene, props, characters, cables and vehicle tyres render (seen in a G-buffer view).
  • Ground, roads, buildings, textures, sky and lighting are still missing: the lighting output is black.
  • No GPU hang in the latest world runs of several minutes. About 10,000 draws per frame, at well under 1 fps.

These observations come from the integration stack (upstream main plus many open PRs), not from this branch alone.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AZ9pSB4ZoXYUifuXg8gm66

<!-- greyfinch-sync:Marvisak/VIctory:issue:6573816412 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431). Originally posted by [AntoninMichelq](https://github.com/AntoninMichelq) on 2026-11-24T03:16:12Z. --- <!-- claude-projects-attribution: {"github_login":"AntoninMichelq"} --> _Requested by **4nto** · [project thread](https://claude.ai/code/project/chan_01XYoPEzLL1bj63HP9pniGvs?thread=cmsg_01XYoPEzLL1bj63HP9pniGvsYRPS2v37oeDeGaCHT7dFsi)_ ## Summary Two changes to host texture lifetimes. Together they stop a GPU hang in the world and halve host texture memory on an 8 GB card. 1. **Free textures and slot resources only after the running submissions.** A released title texture used to drop its host copy right away. A rewritten descriptor slot did the same with the resource it held. Both happened while a submission that still read them was running, sometimes for most of a second in the world. On an RX 7600, device-removed data (DRED) showed a page fault inside a freed 1024x1024 BC7 texture about 65 s into the world, ending in `DXGI_ERROR_DEVICE_HUNG`. These objects now go to a retired list, tagged with the submission count. They are dropped once that submission has been waited for, or right away if none is running. 2. **Make a texture's host copy on first use, not at creation.** In the world the title creates thousands of textures, and many are never used by the GPU (no view, target, copy or barrier). At the world's peak there were 3,630 host textures, 8.9 GB, against a 7 GB video memory budget. The driver moves the excess to system memory, where it counts against the commit limit. The creation state and clear value are now kept, and the host copy is made on first use (`OnceLock`). ## What changed - `host.rs`: `retire()` and the retired list, emptied after each waited submission. - `descriptor/host.rs`: `HostHeap::keep` retires the old resource instead of dropping it. - `resource.rs`: - `Resource.host` becomes a `OnceLock` made by `host()` on first use, from the kept `made_with` (state, clear value). - `Drop` retires the host copy. This overlaps a little with #135, which keeps replaced resources for some frames. This PR covers texture releases and slot rewrites tied to the submission that reads them, and does not depend on #135. ## How it was tested - `cargo check --tests -p victory-gpu` and `cargo check -p victory` for `x86_64-pc-windows-msvc` (with `CARGO_FEATURE_PURE=1`) pass. - In the game on an RX 7600 (Windows 11, 32 GB RAM), on an integration stack that includes these two commits: - **Hang:** before change 1, every world run hung at 50 to 65 s. After it, the next runs went 1 min 40 s to about 4 min with no hang. A later hang came from another freed buffer, which another branch handles. - **Memory, one minute into the world:** host textures went from 8.8 to 4.6 GB, peak commit from 24.3 to 17.4 GB, and video memory from 9.6 of 7.0 GB budget to 5.2 of 7.4. No missing objects were seen. ## Where 3D rendering stands on an RX 7600 (Windows 11) - In the world's first cutscene, props, characters, cables and vehicle tyres render (seen in a G-buffer view). - Ground, roads, buildings, textures, sky and lighting are still missing: the lighting output is black. - No GPU hang in the latest world runs of several minutes. About 10,000 draws per frame, at well under 1 fps. These observations come from the integration stack (upstream main plus many open PRs), not from this branch alone. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01AZ9pSB4ZoXYUifuXg8gm66
mercuryVM commented 2026-11-24 06:52:59 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T05:57:31Z.

Review: APPROVED


Tested 23ced70 on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (265 passed, 0 failed). Not tested in game, so I can't confirm the DRED fault or the memory numbers.

Retirement:

  • execute holds submitted from start to finish, so submissions are serial. STARTED is incremented under that lock, and FINISHED/bury run after the wait with no early return in between. An object retired while submission N runs is tagged N and dropped after N's wait.
  • If the wait fails (the "host submission not waited for" path), bury still drops. That only happens after device removal, so it is acceptable.
  • Objects retired when no submission is running are dropped at once, so nothing waits on a submission that never comes.

Lazy host copies:

  • OnceLock::get_or_init makes the first use race-free across title threads. made_with copies the 20-byte clear value during the call, as it must.
  • Drop takes the copy with take().flatten(), so a texture that was never used creates nothing on release.
  • texture_at calls host() and so creates the copy on an address lookup. That is correct, though it means address lookups count as "first use".

No issues found.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:review:6034396057 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#pullrequestreview-6034396057). Originally posted by [mercuryVM](https://github.com/mercuryVM) on 2026-11-24T05:57:31Z. **Review:** APPROVED --- Tested 23ced70 on Windows 11, RTX 5070, MSVC: `cargo test --workspace --no-fail-fast` passes (265 passed, 0 failed). Not tested in game, so I can't confirm the DRED fault or the memory numbers. Retirement: - `execute` holds `submitted` from start to finish, so submissions are serial. `STARTED` is incremented under that lock, and `FINISHED`/`bury` run after the wait with no early return in between. An object retired while submission N runs is tagged N and dropped after N's wait. - If the wait fails (the "host submission not waited for" path), `bury` still drops. That only happens after device removal, so it is acceptable. - Objects retired when no submission is running are dropped at once, so nothing waits on a submission that never comes. Lazy host copies: - `OnceLock::get_or_init` makes the first use race-free across title threads. `made_with` copies the 20-byte clear value during the call, as it must. - `Drop` takes the copy with `take().flatten()`, so a texture that was never used creates nothing on release. - `texture_at` calls `host()` and so creates the copy on an address lookup. That is correct, though it means address lookups count as "first use". No issues found. AI-assisted (Claude Code).
DaviTostes commented 2026-11-24 06:55:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DaviTostes on 2026-11-24T03:39:08Z.


Verified 23ced70 on Arch Linux x86_64, Windows MSVC release build under Wine 11.22 (victory-gpu, --test-threads=1): 43 passed, 0 failed, 1 ignored (same as main d2a4bae, no new test in this head).

Not covered: a title freeing and re-creating textures across submissions (no game data here); the suite has no synthetic case for that lifetime.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7121294865 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7121294865). Originally posted by [DaviTostes](https://github.com/DaviTostes) on 2026-11-24T03:39:08Z. --- Verified `23ced70` on **Arch Linux x86_64**, Windows MSVC release build under **Wine 11.22** (`victory-gpu`, `--test-threads=1`): **43 passed, 0 failed, 1 ignored** (same as `main` `d2a4bae`, no new test in this head). Not covered: a title freeing and re-creating textures across submissions (no game data here); the suite has no synthetic case for that lifetime.
desplmfao commented 2026-11-24 06:55:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by desplmfao on 2026-11-24T04:45:50Z.


NVIDIA / Linux data point for this, since it was tested on an RX 7600.

RTX 5080 16 GB, CachyOS, proton-cachyos (vkd3d-proton 3.2.0), Series X 1.0.2.1, diagnostics build of main d2a4bae + this + #493 (+#336), #185, #436, #462, #440, #514 (+#464), #515, #259, #177, #151, story mode by VICTORY_KEYS. One run, 9 min (about 7 min in the world), stopped by the timer:

  • No GPU fault or hang, nothing in crashes.log, no new warnings in the log.
  • Video memory in use (nvidia-smi, every 10 s) stayed at 9.6–9.7 GB in the world. Earlier runs on this machine without this PR were at 14–15 GB at the same point, though those were older builds of the stack, so the saving is not measured on one build.
  • vkd3d-proton's Memory allocation failed, falling back to system memory came about as often as without it (215 vs 224 lines, in the same bursts while the world loads), so on this card those are not from running out of video memory as a whole; presumably the CPU-visible heap the shadow buffers live in. Frame time was unchanged (median 3.0 s per world frame here, which is the copy path).

AI-assisted (Claude Code); numbers from the run's log and nvidia-smi.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7122316286 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7122316286). Originally posted by [desplmfao](https://github.com/desplmfao) on 2026-11-24T04:45:50Z. --- NVIDIA / Linux data point for this, since it was tested on an RX 7600. RTX 5080 16 GB, CachyOS, proton-cachyos (vkd3d-proton 3.2.0), Series X 1.0.2.1, diagnostics build of `main` `d2a4bae` + this + #493 (+#336), #185, #436, #462, #440, #514 (+#464), #515, #259, #177, #151, story mode by `VICTORY_KEYS`. One run, 9 min (about 7 min in the world), stopped by the timer: - No GPU fault or hang, nothing in `crashes.log`, no new warnings in the log. - Video memory in use (`nvidia-smi`, every 10 s) stayed at 9.6–9.7 GB in the world. Earlier runs on this machine without this PR were at 14–15 GB at the same point, though those were older builds of the stack, so the saving is not measured on one build. - vkd3d-proton's `Memory allocation failed, falling back to system memory` came about as often as without it (215 vs 224 lines, in the same bursts while the world loads), so on this card those are not from running out of video memory as a whole; presumably the CPU-visible heap the shadow buffers live in. Frame time was unchanged (median 3.0 s per world frame here, which is the copy path). AI-assisted (Claude Code); numbers from the run's log and `nvidia-smi`.
Mesrine67 commented 2026-11-24 06:56:26 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Mesrine67 on 2026-11-24T06:42:44Z.


Windows 11 / AMD Radeon RX 6750 XT (RDNA2, 12 GB) validation update:

  • Combined this PR head 23ced703 with PR #568 head 0845e8d5 in a clean staged integration (tree d5e66d81ff8a78307c41b6d079101b7d3859f5a7).
  • cargo test --workspace --locked -- --test-threads=1: 268 passed, 4 ignored, 0 failed.
  • cargo build --profile diag --locked -p victory --features diagnostics: passed.
  • Safe loader preflight without --execute: four title DLLs bound, zero missing imports; the log explicitly confirms that the title was not executed.

This confirms a Windows build/test integration only. I did not run the title or exercise the GPU lifetime path, so this is not an in-game validation of the fix on the RX 6750 XT.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7124213387 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7124213387). Originally posted by [Mesrine67](https://github.com/Mesrine67) on 2026-11-24T06:42:44Z. --- Windows 11 / AMD Radeon RX 6750 XT (RDNA2, 12 GB) validation update: - Combined this PR head `23ced703` with PR #568 head `0845e8d5` in a clean staged integration (tree `d5e66d81ff8a78307c41b6d079101b7d3859f5a7`). - `cargo test --workspace --locked -- --test-threads=1`: 268 passed, 4 ignored, 0 failed. - `cargo build --profile diag --locked -p victory --features diagnostics`: passed. - Safe loader preflight without `--execute`: four title DLLs bound, zero missing imports; the log explicitly confirms that the title was not executed. This confirms a Windows build/test integration only. I did not run the title or exercise the GPU lifetime path, so this is not an in-game validation of the fix on the RX 6750 XT.
SkillIssueXO commented 2026-11-24 10:03:43 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by SkillIssueXO on 2026-11-24T09:26:58Z.


Native Windows in-game comparison on an RTX 5070 Ti 16 GB (621.24), Windows 11 26300.9974, Ryzen 7 9850X3D and 32 GB of RAM.

Both diagnostics builds used main 8e79c80 + #493 c48b240, #206 05981dd and #189 d0fd9bf. Series S mode, same saved state and startup input, separate empty caches, default shader loop limit and DRED off. The second build added both commits of this PR (133609b and 23ced70).

Without #431 With #431
Sample time after first world FPS line 2.28 s 2.52 s
Dedicated GPU process memory 7.63 GiB 2.97 GiB
Shared GPU process memory 1.68 GiB 1.63 GiB
VIctory private bytes 16.24 GiB 10.89 GiB
System commit headroom 2.95 GiB 7.94 GiB
Span of world FPS samples before the guard stopped the run 5.43 s 172.66 s

Both runs were stopped by the same 3 GiB system commit-headroom guard. One run per build, with extra debug logging of shadow allocations in the control. The figures come from Windows process and GPU process memory counters. The samples show lower dedicated GPU memory and private bytes near world entry. They do not isolate the reason for the private-byte difference or establish a frame-rate improvement.

AI-assisted (Codex, with Claude reviewing the memory paths).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7127426829 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7127426829). Originally posted by [SkillIssueXO](https://github.com/SkillIssueXO) on 2026-11-24T09:26:58Z. --- Native Windows in-game comparison on an RTX 5070 Ti 16 GB (621.24), Windows 11 26300.9974, Ryzen 7 9850X3D and 32 GB of RAM. Both diagnostics builds used `main` `8e79c80` + #493 `c48b240`, #206 `05981dd` and #189 `d0fd9bf`. Series S mode, same saved state and startup input, separate empty caches, default shader loop limit and DRED off. The second build added both commits of this PR (`133609b` and `23ced70`). | | Without #431 | With #431 | |---|---:|---:| | Sample time after first world FPS line | 2.28 s | 2.52 s | | Dedicated GPU process memory | 7.63 GiB | 2.97 GiB | | Shared GPU process memory | 1.68 GiB | 1.63 GiB | | VIctory private bytes | 16.24 GiB | 10.89 GiB | | System commit headroom | 2.95 GiB | 7.94 GiB | | Span of world FPS samples before the guard stopped the run | 5.43 s | 172.66 s | Both runs were stopped by the same 3 GiB system commit-headroom guard. One run per build, with extra debug logging of shadow allocations in the control. The figures come from Windows process and GPU process memory counters. The samples show lower dedicated GPU memory and private bytes near world entry. They do not isolate the reason for the private-byte difference or establish a frame-rate improvement. AI-assisted (Codex, with Claude reviewing the memory paths).
d1ll3x3 commented 2026-11-24 10:03:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by d1ll3x3 on 2026-11-24T09:49:11Z.


checked: #431 on RDNA3 | base: main@8e79c80 + #431 + #568 + #67 (the three apply cleanly together; #431 conflicts with #609, so this run has no #609) | on: Windows 11, RX 7800 XT (RDNA3, 16 GB), 32 GB RAM, diag build, VICTORY_D3D12_DRED=1, Xbox Series 1.0.2.1

result: the longest run we have had: 11 min 39 s in the first mission's intro cutscene (0–1 fps, about 900–6,000 draws/frame), against 2 min 39 s – 5 min 16 s with #609 + #568 + #67 on the same base and machine. It still ends in a device removal of the same family:

page fault at 0x50eb40000; inside freed ["texture 2048x2048 f78 flags 0x0 (type 34)", "title buffer 0x74a000000+0x44ff60 (type 34)"]
stopped at command 281 of 370 (op 42)

The freed allocations now include a title buffer (a shadow copy), which #609 retires but #431 does not. Locally I ported #609's two Drop impls (Shadow and Staging hand their buffer to #431's retire) on top of #431; one run of that went 4 min in the cutscene with no device removal before the window was closed, so not conclusive yet.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7127933398 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7127933398). Originally posted by [d1ll3x3](https://github.com/d1ll3x3) on 2026-11-24T09:49:11Z. --- checked: #431 on RDNA3 | base: `main@8e79c80` + #431 + #568 + #67 (the three apply cleanly together; #431 conflicts with #609, so this run has no #609) | on: Windows 11, RX 7800 XT (RDNA3, 16 GB), 32 GB RAM, diag build, `VICTORY_D3D12_DRED=1`, Xbox Series 1.0.2.1 result: the longest run we have had: **11 min 39 s** in the first mission's intro cutscene (0–1 fps, about 900–6,000 draws/frame), against 2 min 39 s – 5 min 16 s with #609 + #568 + #67 on the same base and machine. It still ends in a device removal of the same family: ``` page fault at 0x50eb40000; inside freed ["texture 2048x2048 f78 flags 0x0 (type 34)", "title buffer 0x74a000000+0x44ff60 (type 34)"] stopped at command 281 of 370 (op 42) ``` The freed allocations now include a title buffer (a shadow copy), which #609 retires but #431 does not. Locally I ported #609's two `Drop` impls (`Shadow` and `Staging` hand their buffer to #431's `retire`) on top of #431; one run of that went 4 min in the cutscene with no device removal before the window was closed, so not conclusive yet. AI-assisted (Claude Code).
d1ll3x3 commented 2026-11-24 11:04:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by d1ll3x3 on 2026-11-24T10:11:23Z.


follow-up: #431 + #609's buffer/staging retirement | base: main@8e79c80 + #431 + #568 + #67, plus #609's two Drop impls ported onto #431's retire (below) | on: Windows 11, RX 7800 XT (RDNA3, 16 GB), 32 GB RAM, diag build, VICTORY_D3D12_DRED=1, Xbox Series 1.0.2.1

result: 18 min 29 s (2,160 frames) in the first mission's intro cutscene, against 11 min 39 s with #431 alone on the same base and machine, and no "inside freed" signature any more. Neither #431 nor #609 alone got rid of it here.

What was ported (only these two, everything else is #431 as is):

// texture.rs
#[cfg(windows)]
impl Drop for Staging {
    fn drop(&mut self) {
        crate::host::retire(self.buffer.clone());
    }
}

// shadow.rs
#[cfg(windows)]
impl Drop for Shadow {
    fn drop(&mut self) {
        crate::host::retire(self.buffer.clone());
    }
}

The run then ends with a different removal, not a freed allocation:

page fault at 0x1ae1dc000; no title memory copy below it
stopped at command 193 of 223 (op 6): dispatch 48x48x1 [compute 4ceef06fab7b49dc]

That dispatch reads a 768x768 texture and writes a 384x384 one (format 10), so it looks like a downsample pass. Skipping it with VICTORY_SKIP_PIPELINES gave a short run (1 min 27 s) ending in a device hang without a page fault on a mesh draw (op 42, mesh 04b9be3756e8f41c, pixel 1af4a50c7fb40c97), the kind reported in #71 and #264. Duration varies a lot between runs, so one run each is a weak signal; the "inside freed" disappearance is the solid part.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7128437647 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7128437647). Originally posted by [d1ll3x3](https://github.com/d1ll3x3) on 2026-11-24T10:11:23Z. --- follow-up: #431 + #609's buffer/staging retirement | base: `main@8e79c80` + #431 + #568 + #67, plus #609's two `Drop` impls ported onto #431's `retire` (below) | on: Windows 11, RX 7800 XT (RDNA3, 16 GB), 32 GB RAM, diag build, `VICTORY_D3D12_DRED=1`, Xbox Series 1.0.2.1 result: **18 min 29 s** (2,160 frames) in the first mission's intro cutscene, against 11 min 39 s with #431 alone on the same base and machine, and **no "inside freed" signature any more**. Neither #431 nor #609 alone got rid of it here. What was ported (only these two, everything else is #431 as is): ```rust // texture.rs #[cfg(windows)] impl Drop for Staging { fn drop(&mut self) { crate::host::retire(self.buffer.clone()); } } // shadow.rs #[cfg(windows)] impl Drop for Shadow { fn drop(&mut self) { crate::host::retire(self.buffer.clone()); } } ``` The run then ends with a different removal, not a freed allocation: ``` page fault at 0x1ae1dc000; no title memory copy below it stopped at command 193 of 223 (op 6): dispatch 48x48x1 [compute 4ceef06fab7b49dc] ``` That dispatch reads a 768x768 texture and writes a 384x384 one (format 10), so it looks like a downsample pass. Skipping it with `VICTORY_SKIP_PIPELINES` gave a short run (1 min 27 s) ending in a device hang without a page fault on a mesh draw (op 42, `mesh 04b9be3756e8f41c`, `pixel 1af4a50c7fb40c97`), the kind reported in #71 and #264. Duration varies a lot between runs, so one run each is a weak signal; the "inside freed" disappearance is the solid part. AI-assisted (Claude Code).
rocobalt1 commented 2026-11-24 12:04:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by rocobalt1 on 2026-11-24T11:10:09Z.


Independent run of this PR on an RTX 4060 Ti (driver 32.0.16.1656), Windows 11, Ryzen 9 5900X: 15 minutes 12 seconds in the world with no device removal. Before it, the same tree and machine had not survived past 8 min 37 s, and the two runs before that ended at 2 min 27 s and 3 min.

Build: the integration tree at 2b1a569 (about 50 PRs on main) plus this branch 23ced70, merged locally. One conflict, in resource.rs: the tree's HostTexture carries a twin (the depth+UAV mirror made by host_twin), and moving the construction into the lazy host() dropped it. I kept it there - made_with is read, the host texture is made on first use, and BOTH (depth|x) flags still build the twin - and it compiles and runs. If you rebase onto the tree, that is the one place to carry over.

Run: diag (--profile diag --features diagnostics), VICTORY_NO_WATCHDOG=1, VICTORY_D3D12_DRED=1, VICTORY_SHADER_LOOP_LIMIT=32, driven with VICTORY_KEYS (Enter every 3 s for the first two minutes, then every 50 s), reached the first control prompt and stayed there. TdrDelay=60/TdrDdiDelay=60 are set machine-wide on this box, so a hang here would have taken 60 s to report rather than 2 s - the run was not removed early by a short TDR.

What it looked like before, same machine, same tree, no PR: two removals with two different DRED stops - a 1x1x1 compute dispatch (list carrying marker Some(21), command 4 of 9, op 6) and a mesh draw (command 720 of 2201, marker Some(9), op 42, mesh 38ad582f523fd7cf + pixel d42a2d8a9d2c954a), no page fault reported in either; and one run that reached 8 min 37 s before being removed. Those are on #71 with the breadcrumbs.

Caveat: one run, and the removal was never deterministic on this card, so this is "did not reproduce in 15 minutes", not "fixed". It does move the failure well past every previous run here.

It does not change the picture: the world is still black, 170 programs still refuse to translate, and the frame is 2.5-3.4 s at 0.3-0.4 fps in this build - but it is 15 minutes of a frame that runs, which is the first time this machine has produced one.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7129745920 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7129745920). Originally posted by [rocobalt1](https://github.com/rocobalt1) on 2026-11-24T11:10:09Z. --- Independent run of this PR on an **RTX 4060 Ti** (driver 32.0.16.1656), Windows 11, Ryzen 9 5900X: **15 minutes 12 seconds in the world with no device removal.** Before it, the same tree and machine had not survived past 8 min 37 s, and the two runs before that ended at 2 min 27 s and 3 min. **Build:** the integration tree at `2b1a569` (about 50 PRs on `main`) plus this branch `23ced70`, merged locally. One conflict, in `resource.rs`: the tree's `HostTexture` carries a `twin` (the depth+UAV mirror made by `host_twin`), and moving the construction into the lazy `host()` dropped it. I kept it there - `made_with` is read, the host texture is made on first use, and `BOTH` (depth|x) flags still build the twin - and it compiles and runs. If you rebase onto the tree, that is the one place to carry over. **Run:** diag (`--profile diag --features diagnostics`), `VICTORY_NO_WATCHDOG=1`, `VICTORY_D3D12_DRED=1`, `VICTORY_SHADER_LOOP_LIMIT=32`, driven with `VICTORY_KEYS` (`Enter` every 3 s for the first two minutes, then every 50 s), reached the first control prompt and stayed there. `TdrDelay=60`/`TdrDdiDelay=60` are set machine-wide on this box, so a hang here would have taken 60 s to report rather than 2 s - the run was not removed early by a short TDR. **What it looked like before, same machine, same tree, no PR:** two removals with two different DRED stops - a `1x1x1` compute dispatch (list carrying marker `Some(21)`, command 4 of 9, op 6) and a mesh draw (command 720 of 2201, marker `Some(9)`, op 42, mesh `38ad582f523fd7cf` + pixel `d42a2d8a9d2c954a`), no page fault reported in either; and one run that reached 8 min 37 s before being removed. Those are on #71 with the breadcrumbs. **Caveat:** one run, and the removal was never deterministic on this card, so this is "did not reproduce in 15 minutes", not "fixed". It does move the failure well past every previous run here. It does not change the picture: the world is still black, 170 programs still refuse to translate, and the frame is 2.5-3.4 s at 0.3-0.4 fps in this build - but it is 15 minutes of a frame that runs, which is the first time this machine has produced one.
AntoninMichelq commented 2026-11-24 12:04:34 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by AntoninMichelq on 2026-11-24T11:29:48Z.


Thank you, that's a great data point: 15 minutes 12 seconds in the world on an RTX 4060 Ti with no device removal, where the same tree without this PR was removed after 2-9 minutes. I agree it's "did not reproduce in 15 minutes", not "fixed", given how random the removals were.

Thanks also for the note on the HostTexture twin. Upstream main has no host_twin yet, so this branch doesn't carry it. If the twin lands first, I'll keep it the way you did: made_with is read, the host texture is made on first use, and BOTH (depth|x) flags still build the twin.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7130171704 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7130171704). Originally posted by [AntoninMichelq](https://github.com/AntoninMichelq) on 2026-11-24T11:29:48Z. --- Thank you, that's a great data point: 15 minutes 12 seconds in the world on an RTX 4060 Ti with no device removal, where the same tree without this PR was removed after 2-9 minutes. I agree it's "did not reproduce in 15 minutes", not "fixed", given how random the removals were. Thanks also for the note on the HostTexture twin. Upstream main has no host_twin yet, so this branch doesn't carry it. If the twin lands first, I'll keep it the way you did: made_with is read, the host texture is made on first use, and BOTH (depth|x) flags still build the twin.
zGLados commented 2026-11-24 13:01:57 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by zGLados on 2026-11-24T12:07:00Z.


Tested 23ced703 on an RX 7700 XT (RDNA3, 12 GB, driver 32.0.32015.7029), Windows 11 10.0.26300, Ryzen 7 7700X, 32 GB, title 1.0.2.1. The device removal did not reproduce in 6 minutes in the world (killed at 8 min).

Both runs: main ffe310e + #197 (scripted keys with a pad connected), diag build, VICTORY_D3D12_DRED=1, the same scripted keys from a fresh start into the first mission.

build world entry result
without #431 ~95 s device removed at 154 s, DRED: page fault inside freed ["texture 1024x1024 f98 flags 0x0 (type 34)"] (same signature as #557)
with #431 (clean merge) ~100 s no device removal, alive at 8 min (killed); 0 inside freed lines

With #431, the world runs at about 1.4 fps (50 frames in ~35 s, host submissions ~350 ms). The picture stays black except for the subtitles, as the README describes. cargo test -p victory-gpu --features diagnostics: 53 passed, 0 failed. This is one run each, so I'd call it "did not reproduce in 6 minutes", not "fixed".

Written by Claude Code (Claude Opus 5.5), which ran the commands; the title ran on my machine.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7130987548 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7130987548). Originally posted by [zGLados](https://github.com/zGLados) on 2026-11-24T12:07:00Z. --- Tested `23ced703` on an **RX 7700 XT (RDNA3, 12 GB, driver 32.0.32015.7029)**, Windows 11 10.0.26300, Ryzen 7 7700X, 32 GB, title 1.0.2.1. The device removal did not reproduce in 6 minutes in the world (killed at 8 min). Both runs: `main` `ffe310e` + #197 (scripted keys with a pad connected), diag build, `VICTORY_D3D12_DRED=1`, the same scripted keys from a fresh start into the first mission. | build | world entry | result | |---|---|---| | without #431 | ~95 s | **device removed at 154 s**, DRED: page fault `inside freed ["texture 1024x1024 f98 flags 0x0 (type 34)"]` (same signature as #557) | | with #431 (clean merge) | ~100 s | **no device removal**, alive at 8 min (killed); 0 `inside freed` lines | With #431, the world runs at about 1.4 fps (50 frames in ~35 s, host submissions ~350 ms). The picture stays black except for the subtitles, as the README describes. `cargo test -p victory-gpu --features diagnostics`: 53 passed, 0 failed. This is one run each, so I'd call it "did not reproduce in 6 minutes", not "fixed". Written by Claude Code (Claude Opus 5.5), which ran the commands; the title ran on my machine.
erLCoder commented 2026-11-24 14:04:38 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by erLCoder on 2026-11-24T13:10:10Z.


Resource regression test data point on GTX 1660 Ti (6 GB), NVIDIA 581.42, Windows 10 22H2 19045.6466, Ryzen 5 3600, Rust 1.98.1 MSVC and Agility SDK 1.620.2. A: parent d2a4bae. B: PR 23ced70, including deferred retirement and lazy texture creation.

cargo test --offline --locked -p victory-gpu --features diagnostics --lib resource::tests -- --nocapture --test-threads=1 — 6 passed, 0 failed, 0 ignored, 40 filtered on each revision. The tests cover resource mapping, upload footprints and transfer to a host texture. A fixture may skip its D3D12 path if device creation fails, so the counts alone do not establish that all GPU paths executed. A separate D3D12 probe identified the GTX LUID 00000000:00017c52.

Paired title runs measuring dedicated/shared GPU memory, system commit, host texture count, lifetime during in-flight submissions, loading time and image quality remain pending. Codex prepared the worktrees, ran the tests and drafted this report.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7132446065 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7132446065). Originally posted by [erLCoder](https://github.com/erLCoder) on 2026-11-24T13:10:10Z. --- Resource regression test data point on GTX 1660 Ti (6 GB), NVIDIA 581.42, Windows 10 22H2 19045.6466, Ryzen 5 3600, Rust 1.98.1 MSVC and Agility SDK 1.620.2. A: parent d2a4bae. B: PR 23ced70, including deferred retirement and lazy texture creation. `cargo test --offline --locked -p victory-gpu --features diagnostics --lib resource::tests -- --nocapture --test-threads=1` — 6 passed, 0 failed, 0 ignored, 40 filtered on each revision. The tests cover resource mapping, upload footprints and transfer to a host texture. A fixture may skip its D3D12 path if device creation fails, so the counts alone do not establish that all GPU paths executed. A separate D3D12 probe identified the GTX LUID 00000000:00017c52. Paired title runs measuring dedicated/shared GPU memory, system commit, host texture count, lifetime during in-flight submissions, loading time and image quality remain pending. Codex prepared the worktrees, ran the tests and drafted this report.
Ege-Mert commented 2026-11-24 15:04:02 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Ege-Mert on 2026-11-24T14:26:50Z.


Test report: NVIDIA RTX 3060 Laptop 6 GB (Ampere). With this PR the world stays inside the card's video-memory budget in both console modes; without it, it is 1–4 GB over.

Setup: Windows 11 build 26300, driver 596.21 (32.0.15.9621), i5-12450H, 32 GB RAM, title 1.0.2.1 (own copy), Rust 1.98.1, diag build, the process held to 4 logical CPUs.
Base: main ffe310e + #493 (c48b240) + #206 (05981dd) + #189 (b472733) + #454 (d2c93fa) + #211 (24a387d) + #492 (b57e10d) + MIN_DYNAMIC = 1 << 18 (#747) + the log line of #952 (DXGI's local use and budget every 5 s). This PR at 23ced70 merges onto it without conflicts. VICTORY_NO_WATCHDOG=1 VICTORY_SHADER_LOOP_LIMIT=32 VICTORY_D3D12_DRED=1, 420 s per run, scripted keys.

Windows gives the process a budget of 5226 MB on this card (5994 MB).

base base + this PR
Series S: local video memory in the world 6350–7148 MB 2712–2749 MB
first sample over the budget 160 s (during loading) never
private bytes (max) 18.0 GB 13.3 GB
system commit taken 22.6 GB 18.9 GB
lowest free RAM (32 GB machine) 8.3 GB 10.2 GB
Series X: local video memory in the world 8241–9106 MB 4841–4967 MB
first sample over the budget 54 s (during loading) never
private bytes (max) 22.6 GB 18.1 GB
system commit taken 30.2 GB 25.6 GB
lowest free RAM 4.4 GB 8.3 GB
  • All four runs reach the world and keep it to my time limit (2.9–6 minutes of world per run); no device removal in any of them.
  • Frame rate in the world, 5-second log lines: Series S 0.2–1.2 fps (base) and 0.1–0.6 (with the PR); Series X 0.1–0.8 and 0.1–0.6. One run each, with different amounts of loading inside the 420 s, so I would not read a difference into that.
  • With the PR the menus, artwork slides and setup screens are drawn as before; in the world the same overlays show (the 3D scene is not drawn on this card with or without it).
  • Before loading the two builds use the same: 2.5 GB (Series S), 4.5 GB (Series X).

One caution on reading the saving: host textures are now made on first use, and most world draws are still dropped on this card (wave64 mesh programs, untranslated shaders). Textures that nothing reads yet cost nothing with this PR, so the gap to the base will shrink as more of the scene is drawn.

The Series X base run started from a finished profile (the title skips its first-run setup), the other three from a fresh one; one run per cell.

AI use: Claude Code (Claude Fable 5.2) built the trees, ran the runs and wrote this report from the logs; a second tool (Codex) checked the numbers against the logs. The hardware, the title copy and the runs are the user's.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7134388793 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7134388793). Originally posted by [Ege-Mert](https://github.com/Ege-Mert) on 2026-11-24T14:26:50Z. --- **Test report: NVIDIA RTX 3060 Laptop 6 GB (Ampere). With this PR the world stays inside the card's video-memory budget in both console modes; without it, it is 1–4 GB over.** Setup: Windows 11 build 26300, driver 596.21 (32.0.15.9621), i5-12450H, 32 GB RAM, title 1.0.2.1 (own copy), Rust 1.98.1, diag build, the process held to 4 logical CPUs. Base: `main` `ffe310e` + #493 (`c48b240`) + #206 (`05981dd`) + #189 (`b472733`) + #454 (`d2c93fa`) + #211 (`24a387d`) + #492 (`b57e10d`) + `MIN_DYNAMIC = 1 << 18` (#747) + the log line of #952 (DXGI's local use and budget every 5 s). This PR at `23ced70` merges onto it without conflicts. `VICTORY_NO_WATCHDOG=1 VICTORY_SHADER_LOOP_LIMIT=32 VICTORY_D3D12_DRED=1`, 420 s per run, scripted keys. Windows gives the process a budget of **5226 MB** on this card (5994 MB). | | base | base + this PR | |---|---|---| | **Series S**: local video memory in the world | 6350–7148 MB | **2712–2749 MB** | | first sample over the budget | 160 s (during loading) | never | | private bytes (max) | 18.0 GB | 13.3 GB | | system commit taken | 22.6 GB | 18.9 GB | | lowest free RAM (32 GB machine) | 8.3 GB | 10.2 GB | | **Series X**: local video memory in the world | 8241–9106 MB | **4841–4967 MB** | | first sample over the budget | 54 s (during loading) | never | | private bytes (max) | 22.6 GB | 18.1 GB | | system commit taken | 30.2 GB | 25.6 GB | | lowest free RAM | 4.4 GB | 8.3 GB | - All four runs reach the world and keep it to my time limit (2.9–6 minutes of world per run); no device removal in any of them. - Frame rate in the world, 5-second log lines: Series S 0.2–1.2 fps (base) and 0.1–0.6 (with the PR); Series X 0.1–0.8 and 0.1–0.6. One run each, with different amounts of loading inside the 420 s, so I would not read a difference into that. - With the PR the menus, artwork slides and setup screens are drawn as before; in the world the same overlays show (the 3D scene is not drawn on this card with or without it). - Before loading the two builds use the same: 2.5 GB (Series S), 4.5 GB (Series X). One caution on reading the saving: host textures are now made on first use, and most world draws are still dropped on this card (wave64 mesh programs, untranslated shaders). Textures that nothing reads yet cost nothing with this PR, so the gap to the base will shrink as more of the scene is drawn. The Series X base run started from a finished profile (the title skips its first-run setup), the other three from a fresh one; one run per cell. *AI use: Claude Code (Claude Fable 5.2) built the trees, ran the runs and wrote this report from the logs; a second tool (Codex) checked the numbers against the logs. The hardware, the title copy and the runs are the user's.*
AgneyaK commented 2026-11-24 18:05:53 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by AgneyaK on 2026-11-24T17:41:26Z.


Test report from a 6 GB card with 16 GB of RAM, where this PR makes the biggest difference of anything I've measured.

Setup:

  • RTX 3050 6 GB Laptop (driver 32.0.16.2124), i7-13700H, 16 GB RAM, Windows 11 26300, diag build.
  • Title 1.0.2.1, Series X profile, the story load.
  • Tree: main ffe310e plus the PRs from #1232 (#208, the wave64 stack, #452, #579, #472/#322/#1024, #492, #55 with the fix posted there, #602), with and without this PR (23ced70, clean merge).
  • One run each, both 300 s from launch, sampled every 10 s from outside: Get-Process, \GPU Process Memory(pid_*)\Dedicated Usage and Shared Usage, \Memory\Pages Input/sec.
without with #431
private bytes, peak 22.7 GB 18.2 GB
GPU memory in VRAM (dedicated), peak 5.9 GB (the card is full) 5.0 GB
GPU memory spilled to system RAM (shared), peak 7.2 GB 3.7 GB
pages read from disk, average 18,300/s 10,600/s
world frame (32 frames each) 4,782 ms 3,966 ms
of it preparing 2,818 ms 1,988 ms
of it GPU 954 ms 993 ms

Why it matters on this kind of machine:

  • Without it, the host textures overflow the 6 GB card by about 7 GB.
  • That overflow lives in system RAM, next to the title's own copy of the same textures. Its 6.2 GB tile heap is a pagefile-backed section in title memory.
  • So the 16 GB machine pages throughout the load.
  • Making textures on first use roughly halves the spill, and frames get about 17% shorter.

Also from these runs: of the ~12 GB of write-combined committed memory in the process, VIctory's own upload buffers were only about 1.9 GB (counted locally). The rest is the driver's system-memory backing for GPU resources, which is what this PR shrinks.

Not tested: more than one run each, a release build, AMD, whether the 300 s window holds for the rest of the world load. No device removal or title stop in either run within the window.

AI use: Claude Code (Claude Opus 5.5) built the trees, ran the title on my machine, measured and drafted this report; results are from the runs described.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7139562765 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7139562765). Originally posted by [AgneyaK](https://github.com/AgneyaK) on 2026-11-24T17:41:26Z. --- Test report from a 6 GB card with 16 GB of RAM, where this PR makes the biggest difference of anything I've measured. **Setup:** - RTX 3050 6 GB Laptop (driver 32.0.16.2124), i7-13700H, **16 GB RAM**, Windows 11 26300, diag build. - Title 1.0.2.1, Series X profile, the story load. - Tree: `main` `ffe310e` plus the PRs from #1232 (#208, the wave64 stack, #452, #579, #472/#322/#1024, #492, #55 with the fix posted there, #602), with and without this PR (`23ced70`, clean merge). - One run each, both 300 s from launch, sampled every 10 s from outside: `Get-Process`, `\GPU Process Memory(pid_*)\Dedicated Usage` and `Shared Usage`, `\Memory\Pages Input/sec`. | | without | **with #431** | |---|---:|---:| | private bytes, peak | 22.7 GB | **18.2 GB** | | GPU memory in VRAM (dedicated), peak | 5.9 GB (the card is full) | **5.0 GB** | | GPU memory spilled to system RAM (shared), peak | 7.2 GB | **3.7 GB** | | pages read from disk, average | 18,300/s | 10,600/s | | world frame (32 frames each) | 4,782 ms | **3,966 ms** | | of it preparing | 2,818 ms | 1,988 ms | | of it GPU | 954 ms | 993 ms | Why it matters on this kind of machine: - Without it, the host textures overflow the 6 GB card by about 7 GB. - That overflow lives in system RAM, next to the title's own copy of the same textures. Its 6.2 GB tile heap is a pagefile-backed section in title memory. - So the 16 GB machine pages throughout the load. - Making textures on first use roughly halves the spill, and frames get about 17% shorter. Also from these runs: of the ~12 GB of write-combined committed memory in the process, VIctory's own upload buffers were only about 1.9 GB (counted locally). The rest is the driver's system-memory backing for GPU resources, which is what this PR shrinks. Not tested: more than one run each, a release build, AMD, whether the 300 s window holds for the rest of the world load. No device removal or title stop in either run within the window. AI use: Claude Code (Claude Opus 5.5) built the trees, ran the title on my machine, measured and drafted this report; results are from the runs described.
RedC4ke commented 2026-11-24 19:04:32 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by RedC4ke on 2026-11-24T19:03:51Z.


Test report: RX 9070 XT (RDNA4), Windows 11 — #431 removes the freed-texture page fault here; the world then runs ~7.5 min before a long-submission hang

Setup

  • Windows 11 Pro (build 26300), Ryzen 7 7800X3D, 32 GB RAM
  • AMD Radeon RX 9070 XT 16 GB, driver 32.0.32029.2010
  • Display 3840x2160, title window fitted to 2560x1440, SDR
  • Retail 1.0.2.1 (executable BLAKE3 b99f876b74d4a77f…), Series X mode
  • cargo build --profile diag -p victory --features diagnostics
  • VICTORY_D3D12_DRED=1, VICTORY_CAPTURE=<dir>, VICTORY_KEYS=10:Enter; no loop limit, no skipped pipelines, no debug layer
  • Existing profile and settings, so the title goes from the profile prompt straight into the story load

Trees

  • A: main ffe310e
  • B: main ffe310e + #431 (133609b, 23ced70), merged cleanly; cargo test -p victory-gpu passes with VICTORY_WARP=1 (50 passed, 1 ignored)

Results (one run per tree)

A: main B: main + #431
Time in the world before the device was removed ~20 s ~7.5 min
Error 0x887A0006 after a submission of 27 lists 0x887A0006 after a submission of 32 lists
DRED page fault at 0x475b97000, inside freed texture 2048x2048 f98 flags 0x0 (type 34) no page fault reported; breadcrumbs only
World frame rate 0.5–0.7 fps 0.6–1.8 fps, falling to 0.2–0.3 fps in the last ~90 s
Shaders translated / not translated 1,494 / 390 2,183 / 537
host pipeline refused 0 0
slow host submission warnings 9 95

A: main

  • In flight at the fault: list 23 of 27, mesh draws [mesh 3a93976a475b8bdb] and [mesh 1617bda5757a7804]; list 26 of 27, dispatches [compute 970c4fbb3b017c0e] (7x1x1) and [compute e4a7e088c7780ce8] (27x1x1).
  • Untranslated by stage: compute 328, mesh 29, pixel 29, vertex 4.
  • The fault is timing-dependent here: two earlier runs of the same tree were still alive after ~80 s and ~25 s in the world when I stopped them.

B: main + #431

  • No inside freed entry anywhere in the log.
  • GPU time per frame grew from about 0.5 s early in the world to 2.7–3.3 s at the end. The last six submissions took 3054, 2672, 3023, 2991, 3066 and 2767 ms (32 lists each), then the device was removed.
  • Breadcrumbs: lists up to 11 complete; list 12 stopped at 128/129; lists 13–31 not started (0/n).
  • In flight in list 12 (of its 52 commands): mesh 4 [mesh 04b9be3756e8f41c, pixel 1af4a50c7fb40c97]. The same pair also appears in list 17. Lists 14 and 15 hold dispatches of [compute 559fb027c6d5b1db] and [compute 2c3592e9bbad543f] at 160x90 down to 10x6.
  • The presented frame was black in the world in both trees (frames checked locally, not posted).

What this does and does not show

  • Consistent with #431 fixing the freed-texture page fault on RDNA4/Windows: tree A faulted inside a freed texture, tree B ran ~20x longer with no such fault.
  • Not established: one run per tree, and tree A does not fault every time. I can repeat each 3 times if that is useful.
  • The stop in tree B looks like the long-submission hang rather than a memory fault. I have not tested which program is responsible. I can rerun B with VICTORY_SHADER_LOOP_LIMIT=1000, or with VICTORY_SKIP_PIPELINES=04b9be3756e8f41c, if either helps.

No game data posted. AI-assisted (Claude Code): builds, runs, and log reading were done on my machine; the numbers are counted from the logs.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7141542336 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7141542336). Originally posted by [RedC4ke](https://github.com/RedC4ke) on 2026-11-24T19:03:51Z. --- **Test report: RX 9070 XT (RDNA4), Windows 11 — #431 removes the freed-texture page fault here; the world then runs ~7.5 min before a long-submission hang** **Setup** - Windows 11 Pro (build 26300), Ryzen 7 7800X3D, 32 GB RAM - AMD Radeon RX 9070 XT 16 GB, driver 32.0.32029.2010 - Display 3840x2160, title window fitted to 2560x1440, SDR - Retail 1.0.2.1 (executable BLAKE3 `b99f876b74d4a77f…`), Series X mode - `cargo build --profile diag -p victory --features diagnostics` - `VICTORY_D3D12_DRED=1`, `VICTORY_CAPTURE=<dir>`, `VICTORY_KEYS=10:Enter`; no loop limit, no skipped pipelines, no debug layer - Existing profile and settings, so the title goes from the profile prompt straight into the story load **Trees** - A: `main` `ffe310e` - B: `main` `ffe310e` + #431 (`133609b`, `23ced70`), merged cleanly; `cargo test -p victory-gpu` passes with `VICTORY_WARP=1` (50 passed, 1 ignored) **Results (one run per tree)** | | A: `main` | B: `main` + #431 | |---|---|---| | Time in the world before the device was removed | ~20 s | ~7.5 min | | Error | `0x887A0006` after a submission of 27 lists | `0x887A0006` after a submission of 32 lists | | DRED | page fault at `0x475b97000`, inside freed `texture 2048x2048 f98 flags 0x0 (type 34)` | no page fault reported; breadcrumbs only | | World frame rate | 0.5–0.7 fps | 0.6–1.8 fps, falling to 0.2–0.3 fps in the last ~90 s | | Shaders translated / not translated | 1,494 / 390 | 2,183 / 537 | | `host pipeline refused` | 0 | 0 | | `slow host submission` warnings | 9 | 95 | **A: `main`** - In flight at the fault: list 23 of 27, mesh draws `[mesh 3a93976a475b8bdb]` and `[mesh 1617bda5757a7804]`; list 26 of 27, dispatches `[compute 970c4fbb3b017c0e]` (7x1x1) and `[compute e4a7e088c7780ce8]` (27x1x1). - Untranslated by stage: compute 328, mesh 29, pixel 29, vertex 4. - The fault is timing-dependent here: two earlier runs of the same tree were still alive after ~80 s and ~25 s in the world when I stopped them. **B: `main` + #431** - No `inside freed` entry anywhere in the log. - GPU time per frame grew from about 0.5 s early in the world to 2.7–3.3 s at the end. The last six submissions took 3054, 2672, 3023, 2991, 3066 and 2767 ms (32 lists each), then the device was removed. - Breadcrumbs: lists up to 11 complete; list 12 stopped at 128/129; lists 13–31 not started (0/n). - In flight in list 12 (of its 52 commands): `mesh 4 [mesh 04b9be3756e8f41c, pixel 1af4a50c7fb40c97]`. The same pair also appears in list 17. Lists 14 and 15 hold dispatches of `[compute 559fb027c6d5b1db]` and `[compute 2c3592e9bbad543f]` at 160x90 down to 10x6. - The presented frame was black in the world in both trees (frames checked locally, not posted). **What this does and does not show** - Consistent with #431 fixing the freed-texture page fault on RDNA4/Windows: tree A faulted inside a freed texture, tree B ran ~20x longer with no such fault. - Not established: one run per tree, and tree A does not fault every time. I can repeat each 3 times if that is useful. - The stop in tree B looks like the long-submission hang rather than a memory fault. I have not tested which program is responsible. I can rerun B with `VICTORY_SHADER_LOOP_LIMIT=1000`, or with `VICTORY_SKIP_PIPELINES=04b9be3756e8f41c`, if either helps. *No game data posted. AI-assisted (Claude Code): builds, runs, and log reading were done on my machine; the numbers are counted from the logs.*
Daniel333313131 commented 2026-11-24 20:03:24 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Daniel333313131 on 2026-11-24T20:02:31Z.


Tested on AMD (RDNA3), where main faults on freed textures in the world. With this PR that fault did not come back in three runs.

Setup: AMD Radeon RX 7900 XTX 24 GB, driver 32.0.32029.2010; Ryzen 7 9800X3D, 32 GB; Windows 11 10.0.26300. Diag build of this PR's head 23ced70 merged alone onto main ffe310e, compared with main itself. Each run used its own empty VICTORY_CACHE_DIR, VICTORY_D3D12_DRED=1, and VICTORY_KEYS set to Enter every 3 s from 8 s to 47 s. Each run was stopped after 180 s. Method and main numbers as in https://github.com/Marvisak/VIctory/issues/400#issuecomment-7142428051.

run world ms/frame on the GPU device removed DRED
main 1 972 178 143 s page fault inside freed texture 2048x2048 f98 (type 34) ×2
main 2 873 179 170 s page fault, no resource named
main 3 679 157 76 s page fault inside freed texture 2048x1024 f98 (type 34)
#431 1 1037 217 169 s page fault, no resource named
#431 2 936 185 none within 180 s –
#431 3 929 170 none within 180 s –
  • With #431, no run faulted inside a freed resource. Two of the three runs were still in the world when they were stopped at 180 s. On main, every run was removed by 170 s.
  • The one failure left (run 1) is a page fault with no resource named, the same kind as main run 2.
  • Frame time stays within the run-to-run spread.
  • Caveat: three runs per side. Removal times on main alone range from 76 to 170 s, so this is a strong hint, not proof. Runs longer than 180 s were not tested.

For comparison, #609 on the same machine and method still faulted inside freed resources in all three runs (75, 89 and 114 s). Details are on that PR.

AI use: Claude Code (Claude Opus 5.5) merged and built the commits, ran the title, summarised the log lines and wrote this comment. The numbers come from the runs above.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7142957823 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7142957823). Originally posted by [Daniel333313131](https://github.com/Daniel333313131) on 2026-11-24T20:02:31Z. --- Tested on AMD (RDNA3), where `main` faults on freed textures in the world. With this PR that fault did not come back in three runs. **Setup:** AMD Radeon RX 7900 XTX 24 GB, driver 32.0.32029.2010; Ryzen 7 9800X3D, 32 GB; Windows 11 10.0.26300. Diag build of this PR's head `23ced70` merged alone onto `main` `ffe310e`, compared with `main` itself. Each run used its own empty `VICTORY_CACHE_DIR`, `VICTORY_D3D12_DRED=1`, and `VICTORY_KEYS` set to Enter every 3 s from 8 s to 47 s. Each run was stopped after 180 s. Method and `main` numbers as in https://github.com/Marvisak/VIctory/issues/400#issuecomment-7142428051. | | run | world ms/frame | on the GPU | device removed | DRED | |---|---|---|---|---|---| | `main` | 1 | 972 | 178 | 143 s | page fault inside freed `texture 2048x2048 f98 (type 34)` ×2 | | `main` | 2 | 873 | 179 | 170 s | page fault, no resource named | | `main` | 3 | 679 | 157 | 76 s | page fault inside freed `texture 2048x1024 f98 (type 34)` | | **#431** | 1 | 1037 | 217 | 169 s | page fault, no resource named | | **#431** | 2 | 936 | 185 | none within 180 s | – | | **#431** | 3 | 929 | 170 | none within 180 s | – | - With #431, no run faulted inside a freed resource. Two of the three runs were still in the world when they were stopped at 180 s. On `main`, every run was removed by 170 s. - The one failure left (run 1) is a page fault with no resource named, the same kind as `main` run 2. - Frame time stays within the run-to-run spread. - Caveat: three runs per side. Removal times on `main` alone range from 76 to 170 s, so this is a strong hint, not proof. Runs longer than 180 s were not tested. For comparison, #609 on the same machine and method still faulted inside freed resources in all three runs (75, 89 and 114 s). Details are on that PR. **AI use:** Claude Code (Claude Opus 5.5) merged and built the commits, ran the title, summarised the log lines and wrote this comment. The numbers come from the runs above.
some-du6e commented 2026-11-24 23:05:53 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by some-du6e on 2026-11-24T22:22:37Z.


For anyone merging this onto r4tedx's integration/testers: it has one conflict there, in crates/victory-gpu/src/resource.rs. That tree makes a depth target's UAV twin at creation (host_twin, HostTexture.twin), and this PR moves the host copy to first use. What worked:

  • Keep this PR's host: OnceLock and made_with, and make the twin inside Resource::host()'s initializer, next to the copy: the same desc.flags & (2 | 4) == (2 | 4) check, the twin as HostTexture { texture, state: 0.into(), twin: None }, and twin set on the main copy.
  • host_unordered on that tree reads resource(this).host.as_deref() directly; it needs resource(this).host() instead.

Built and run in a diagnostics build of integration/testers update 8 with Xeltax/VIcky's commits and this PR, on an RTX 3050 6 GB with 7.9 GB of RAM, in Series S: at about 95 s, still on the loading screen, the process held about 2.6 GB of dedicated GPU memory, and where earlier runs without it, on Xeltax/VIcky alone, had crashed around world entry, the first run with it drew the world for about 4.5 minutes.

Note

This comment was written by an AI agent (Opus 5.5, Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7146153405 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7146153405). Originally posted by [some-du6e](https://github.com/some-du6e) on 2026-11-24T22:22:37Z. --- For anyone merging this onto r4tedx's integration/testers: it has one conflict there, in `crates/victory-gpu/src/resource.rs`. That tree makes a depth target's UAV twin at creation (`host_twin`, `HostTexture.twin`), and this PR moves the host copy to first use. What worked: - Keep this PR's `host: OnceLock` and `made_with`, and make the twin inside `Resource::host()`'s initializer, next to the copy: the same `desc.flags & (2 | 4) == (2 | 4)` check, the twin as `HostTexture { texture, state: 0.into(), twin: None }`, and `twin` set on the main copy. - `host_unordered` on that tree reads `resource(this).host.as_deref()` directly; it needs `resource(this).host()` instead. Built and run in a diagnostics build of integration/testers update 8 with Xeltax/VIcky's commits and this PR, on an RTX 3050 6 GB with 7.9 GB of RAM, in Series S: at about 95 s, still on the loading screen, the process held about 2.6 GB of dedicated GPU memory, and where earlier runs without it, on Xeltax/VIcky alone, had crashed around world entry, the first run with it drew the world for about 4.5 minutes. > [!NOTE] > This comment was written by an AI agent (Opus 5.5, Claude Code).
upstream-sync closed this pull request 2026-11-25 00:05:26 +00:00
Marvisak commented 2026-11-25 00:06:57 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:02:44Z.


Automated triage for the maintainers. Closing because another open pull request covers the same change.

See #1526. Two halves: retiring host objects until running submissions finish exists in main (host::retire/release_retired, slots and lists hold their textures); making host textures on first use is #1526, which also keeps barriers from creating them and has tests.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148076164 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7148076164). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:02:44Z. --- Automated triage for the maintainers. Closing because another open pull request covers the same change. See #1526. Two halves: retiring host objects until running submissions finish exists in main (host::retire/release_retired, slots and lists hold their textures); making host textures on first use is #1526, which also keeps barriers from creating them and has tests. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
AgneyaK commented 2026-11-25 02:06:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by AgneyaK on 2026-11-25T01:44:42Z.


@Marvisak the triage above may have missed that #1526 is closed too: its author closed it at 2026-11-24 22:01 UTC as a duplicate of this PR (comment). So the two closed each other, and no open pull request now makes host textures on first use.

Checked on main 940d32f: resource.rs still makes the host texture when the title creates the resource. Only the retire/release half is in main, as the triage says.

Why it matters on small cards, from the runs already posted here: on a 6 GB / 16 GB laptop, this PR took the story load's private memory from 22.7 to 18.2 GB and the GPU memory spilled into RAM from 7.2 to 3.7 GB. 0xKaji measured ~7.85 → ~5.39 GiB of host textures on an 8 GB card. That spill is what pushes these machines to out-of-memory (this laptop blue-screened in the NVIDIA driver at ~24 GB private on 16 GB RAM tonight, on main without it).

Could this be reopened (it needs a rebase onto current main), or #1526? If neither author has time, I can port it onto main with tests.

AI use: Claude Code (Claude Opus 5.5) checked the PR states and main and wrote this; the numbers are from the runs linked above.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149904933 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7149904933). Originally posted by [AgneyaK](https://github.com/AgneyaK) on 2026-11-25T01:44:42Z. --- @Marvisak the triage above may have missed that **#1526 is closed too**: its author closed it at 2026-11-24 22:01 UTC as a duplicate of this PR ([comment](https://github.com/Marvisak/VIctory/pull/1526#issuecomment-7145697548)). So the two closed each other, and no open pull request now makes host textures on first use. Checked on `main` `940d32f`: `resource.rs` still makes the host texture when the title creates the resource. Only the retire/release half is in `main`, as the triage says. Why it matters on small cards, from the runs already posted here: on a 6 GB / 16 GB laptop, this PR took the story load's private memory from 22.7 to 18.2 GB and the GPU memory spilled into RAM from 7.2 to 3.7 GB. 0xKaji measured ~7.85 → ~5.39 GiB of host textures on an 8 GB card. That spill is what pushes these machines to out-of-memory (this laptop blue-screened in the NVIDIA driver at ~24 GB private on 16 GB RAM tonight, on `main` without it). Could this be reopened (it needs a rebase onto current `main`), or #1526? If neither author has time, I can port it onto `main` with tests. AI use: Claude Code (Claude Opus 5.5) checked the PR states and `main` and wrote this; the numbers are from the runs linked above.
AgneyaK commented 2026-11-25 02:06:30 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by AgneyaK on 2026-11-25T01:56:22Z.


Opened the port as #1969 (first-use half only; the retire half is in main), with credit to this PR. Happy to close it if you'd rather rebase this one.

AI use: Claude Code (Claude Opus 5.5) wrote this.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7150134064 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7150134064). Originally posted by [AgneyaK](https://github.com/AgneyaK) on 2026-11-25T01:56:22Z. --- Opened the port as #1969 (first-use half only; the retire half is in `main`), with credit to this PR. Happy to close it if you'd rather rebase this one. AI use: Claude Code (Claude Opus 5.5) wrote this.

Pull request closed

Sign in to join this conversation.
No reviewers
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!431
No description provided.