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

Closed
github-bot wants to merge 2 commits from gh-pr/431/head into gh-pr/431/base
Owner

@⁠AntoninMichelq on GitHub · 2026-11-24 03:16 UTC · original
AntoninMichelq:up/lazy-host-textures → main · +103 −16 · 3 files · 2 commits · closed without merging

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

**@⁠AntoninMichelq** on GitHub · 2026-11-24 03:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/431) `AntoninMichelq:up/lazy-host-textures` → `main` · +103 −16 · 3 files · 2 commits · closed without merging <!-- 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
The title's descriptor writes and texture releases reach the host at
once, from its own threads, while the host runs a submission for most of
a second in the world. A descriptor slot rewritten then dropped the
resource it held, and a released title texture dropped its host copy,
while the running submission still read them: device-removed data showed
a page fault inside a freed 1024x1024 BC7 texture, about 65 s into the
world (DXGI_ERROR_DEVICE_HUNG, RX 7600).

Those objects now go to a retired list tagged with the submission count
and are dropped when that submission has been waited for (at once if
none is running).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AZ9pSD61BBk7E79WkryEQA
The world's peak counted 3,630 host textures, 8.9 GB, against a 7 GB
video memory budget on an 8 GB card: the driver moves the excess to
system memory, where it counts against the commit limit. A texture the
title makes and the GPU never uses (no view, target, copy or barrier)
now costs nothing; the creation state and clear value are kept for the
copy made on first use.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AZ9pSCvCZuokASx7f59sAG
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:03:40 +00:00
github-bot closed this pull request 2026-11-26 04:03:40 +00:00
Author
Owner

@⁠DaviTostes on GitHub · 2026-11-24 03:39 UTC · original

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.

**@⁠DaviTostes** on GitHub · 2026-11-24 03:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7121294865) 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.
Author
Owner

@⁠desplmfao on GitHub · 2026-11-24 04:45 UTC · original

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.

**@⁠desplmfao** on GitHub · 2026-11-24 04:45 UTC · [original](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7122316286) 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`.
Author
Owner

@⁠Mesrine67 on GitHub · 2026-11-24 06:42 UTC · original

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.

**@⁠Mesrine67** on GitHub · 2026-11-24 06:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7124213387) 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.
Author
Owner

@⁠SkillIssueXO on GitHub · 2026-11-24 09:26 UTC · original

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).

**@⁠SkillIssueXO** on GitHub · 2026-11-24 09:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7127426829) 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).
Author
Owner

@⁠d1ll3x3 on GitHub · 2026-11-24 09:49 UTC · original

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** on GitHub · 2026-11-24 09:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7127933398) 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).
Author
Owner

@⁠d1ll3x3 on GitHub · 2026-11-24 10:11 UTC · original

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).

**@⁠d1ll3x3** on GitHub · 2026-11-24 10:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7128437647) 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).
Author
Owner

@⁠rocobalt1 on GitHub · 2026-11-24 11:10 UTC · original

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.

**@⁠rocobalt1** on GitHub · 2026-11-24 11:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7129745920) 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.
Author
Owner

@⁠AntoninMichelq on GitHub · 2026-11-24 11:29 UTC · original

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.

**@⁠AntoninMichelq** on GitHub · 2026-11-24 11:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7130171704) 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.
Author
Owner

@⁠zGLados on GitHub · 2026-11-24 12:07 UTC · original

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.

**@⁠zGLados** on GitHub · 2026-11-24 12:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7130987548) 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.
Author
Owner

@⁠erLCoder on GitHub · 2026-11-24 13:10 UTC · original

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.

**@⁠erLCoder** on GitHub · 2026-11-24 13:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7132446065) 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.
Author
Owner

@⁠EgoraWyn on GitHub · 2026-11-24 14:26 UTC · original

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.

**@⁠EgoraWyn** on GitHub · 2026-11-24 14:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7134388793) **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.*
Author
Owner

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

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.

**@⁠AgneyaK** on GitHub · 2026-11-24 17:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7139562765) 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.
Author
Owner

@⁠Daniel333313131 on GitHub · 2026-11-24 20:02 UTC · original

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 #400.

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.

**@⁠Daniel333313131** on GitHub · 2026-11-24 20:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7142957823) 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://git.gtahub.st/github/Marvisak--VIctory/issues/400. | | 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.
Author
Owner

@⁠some-du6e on GitHub · 2026-11-24 22:22 UTC · original

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).

**@⁠some-du6e** on GitHub · 2026-11-24 22:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7146153405) 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).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:02 UTC · original

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.

**@⁠Marvisak** on GitHub · 2026-11-25 00:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7148076164) 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.
Author
Owner

@⁠AgneyaK on GitHub · 2026-11-25 01:44 UTC · original

@⁠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.

**@⁠AgneyaK** on GitHub · 2026-11-25 01:44 UTC · [original](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7149904933) @⁠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://git.gtahub.st/github/Marvisak--VIctory/pulls/1526)). 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.
Author
Owner

@⁠AgneyaK on GitHub · 2026-11-25 01:56 UTC · original

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.

**@⁠AgneyaK** on GitHub · 2026-11-25 01:56 UTC · [original](https://github.com/Marvisak/VIctory/pull/431#issuecomment-7150134064) 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

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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!431
No description provided.