draw: clear the host tracking when the host list or its epoch changed #2305

Manually merged
github merged 1 commit from github-bot/gh-2305 into main 2026-11-30 14:14:32 +00:00 AGit
Owner

@⁠Wazzabeee on GitHub · 2026-11-29 11:39 UTC · original
Wazzabeee:fix-root-signature-skip → main · +21 −0 · 1 files · 1 commits · merged 2026-11-30 14:12 UTC

Fixes #2237

What it changes

State::host_roots and host_pipeline track what the host list already has bound, so a pipeline whose root signature is already set does not record Set*RootSignature again. Since 815f58c shares root signature objects between pipelines, that skip fires between different PSOs too, and its correctness now depends on the tracking being valid for the list being recorded.

The tracking was valid for one recording of one host list, but no path cleared it when another host list began a recording, or when the same host list was reset and began a new one. A pipeline whose signature the previous recording bound then skipped the set on a list that had none, and the driver refused the list at Close (0x80070057). Host lists are new every submission (HostList::leave_open, crate::list::detach), so the stale window opens and closes with which pipeline draws first on a fresh list, which matches how intermittent the crash is on the issue.

The tracking is now anchored to the host list's address and its epoch, which HostList::reset renews for each new recording. When either changes, the tracking is cleared in prepare_for, and the next draw sets the signature, heaps and pipeline again. The skip stays for the recording it was made for, so pipelines that share a signature still record one set between them (the cs1 -> cs2 -> cs1 behaviour the tests of 815f58c assert is unchanged).

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): NVIDIA GeForce RTX 5070 Ti 16 GB (driver 32.0.16.2124), Series X profile, 2560x1440 with DLSS quality, frame generation off, ray tracing off. AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 (10.0.26300), Rust 1.98.1 (pinned).
  • Before: on v2026.11.29.01 (829188e), a host command list did not close (0x80070057) at the same scene, 5 crashes over the day (release and diagnostics builds), plus one from another machine on the issue. VICTORY_ROOT_CACHE=0 (the dedup off, as before 815f58c) stopped it here, which pointed at this path.
  • After: a run on a locally built release of this branch, on the faulty config (root cache on, no workaround switches), passed the crash scene clean where it had failed five times today on the same machine, and the run log has no 0x80070057.
  • cargo test -p victory-gpu --locked on this branch: 912 passed, 3 failed (the ambient::tests ones, which fail the same way on unmodified main here; a watch timing test is also flaky on main and passed or failed the same way on both).
  • For shader changes, the wave sizes tested (32 and/or 64 lanes): n/a (no shader changes).
  • cargo test passed for the crates it touches: partly, see above (pre-existing failures only, identical on main).

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #2237, and the diagnostics build fixes of #2208 were needed to investigate it.
**@⁠Wazzabeee** on GitHub · 2026-11-29 11:39 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2305) `Wazzabeee:fix-root-signature-skip` → `main` · +21 −0 · 1 files · 1 commits · merged 2026-11-30 14:12 UTC Fixes #2237 ## What it changes `State::host_roots` and `host_pipeline` track what the host list already has bound, so a pipeline whose root signature is already set does not record `Set*RootSignature` again. Since 815f58c shares root signature objects between pipelines, that skip fires between different PSOs too, and its correctness now depends on the tracking being valid for the list being recorded. The tracking was valid for one recording of one host list, but no path cleared it when another host list began a recording, or when the same host list was reset and began a new one. A pipeline whose signature the previous recording bound then skipped the set on a list that had none, and the driver refused the list at `Close` (`0x80070057`). Host lists are new every submission (`HostList::leave_open`, `crate::list::detach`), so the stale window opens and closes with which pipeline draws first on a fresh list, which matches how intermittent the crash is on the issue. The tracking is now anchored to the host list's address and its `epoch`, which `HostList::reset` renews for each new recording. When either changes, the tracking is cleared in `prepare_for`, and the next draw sets the signature, heaps and pipeline again. The skip stays for the recording it was made for, so pipelines that share a signature still record one set between them (the `cs1 -> cs2 -> cs1` behaviour the tests of 815f58c assert is unchanged). ## How it was tested * GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): NVIDIA GeForce RTX 5070 Ti 16 GB (driver 32.0.16.2124), Series X profile, 2560x1440 with DLSS quality, frame generation off, ray tracing off. AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 (10.0.26300), Rust 1.98.1 (pinned). * Before: on v2026.11.29.01 (`829188e`), `a host command list did not close (0x80070057)` at the same scene, 5 crashes over the day (release and diagnostics builds), plus one from another machine on the issue. `VICTORY_ROOT_CACHE=0` (the dedup off, as before 815f58c) stopped it here, which pointed at this path. * After: a run on a locally built release of this branch, on the faulty config (root cache on, no workaround switches), passed the crash scene clean where it had failed five times today on the same machine, and the run log has no `0x80070057`. * `cargo test -p victory-gpu --locked` on this branch: 912 passed, 3 failed (the `ambient::tests` ones, which fail the same way on unmodified `main` here; a `watch` timing test is also flaky on `main` and passed or failed the same way on both). * For shader changes, the wave sizes tested (32 and/or 64 lanes): n/a (no shader changes). * `cargo test` passed for the crates it touches: partly, see above (pre-existing failures only, identical on `main`). ## Checked for overlap * [x] I searched the open pull requests for the same issue and for the files this touches. Related: #2237, and the diagnostics build fixes of #2208 were needed to investigate it.
The skip that keeps SetGraphicsRootSignature and friends off a host list
that already has what a pipeline needs tracked what the list had in
State::host_roots and host_pipeline. That tracking was valid for one
recording of one host list, but nothing cleared it when another host list
began a recording, or the same list was reset and began one: with 815f58c
sharing root signature objects between pipelines, a pipeline whose
signature the previous recording bound then skipped the set on a list
without one, and the driver refused the list at Close (0x80070057).

The tracking is now anchored to the host list and its epoch, which
HostList::reset renews for each new recording: a change clears it, and
the next draw sets the signature, heaps and pipeline again. The skip
stays for the recording it was made for, so pipelines that share a
signature still record one set between them.

Fixes #2237

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 11:44:20 +00:00
Author
Owner

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

Update on the game validation: about 20 minutes of play on a locally built release with the fix, on the faulty config (root cache on, no workaround switches), past the crash scene and deeper into the world. No crash, and the run log has no 0x80070057.

**@⁠Wazzabeee** on GitHub · 2026-11-29 12:24 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2305#issuecomment-7255788571) Update on the game validation: about 20 minutes of play on a locally built release with the fix, on the faulty config (root cache on, no workaround switches), past the crash scene and deeper into the world. No crash, and the run log has no `0x80070057`.
Author
Owner

@⁠Creaa on GitHub · 2026-11-29 14:06 UTC · original

Test report: this fixes the 0x80070057 (a host command list did not close) crash here.

Setup: RTX 4070 12 GB (driver 617.14), i7-13700F, 32 GB, Windows 11 26300. Release build, scripts\play-foxhound.ps1 -FrameGen, Series X, DLSS Quality, VICTORY_NATIVE_SIZE=2560x1440 (32:9 monitor), VICTORY_HELD_FRAME_MS=15000. Shaders and pipelines preloaded on 829188e9 before both runs.

Build Result
main 829188e9 a host command list did not close (0x80070057), then a crash, about 2 min into the world (same as #2237)
main 829188e9 + this PR (deee533a) over 10 min in the world, no crash, no did not close line

Same save and the same part of the story in both runs.

Not tested: longer sessions, Series S, other GPUs. Frame generation was switched off in F1 partway through the second run because of the frame generation grain (#1917); that does not touch this PR's path.

AI use: Claude Code (Claude Opus 5.5) built both, read the logs and wrote this; I played both runs.

**@⁠Creaa** on GitHub · 2026-11-29 14:06 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2305#issuecomment-7257046557) Test report: this fixes the `0x80070057` (a host command list did not close) crash here. **Setup:** RTX 4070 12 GB (driver 617.14), i7-13700F, 32 GB, Windows 11 26300. Release build, `scripts\play-foxhound.ps1 -FrameGen`, Series X, DLSS Quality, `VICTORY_NATIVE_SIZE=2560x1440` (32:9 monitor), `VICTORY_HELD_FRAME_MS=15000`. Shaders and pipelines preloaded on `829188e9` before both runs. | Build | Result | |---|---| | main `829188e9` | `a host command list did not close (0x80070057)`, then a crash, about 2 min into the world (same as #2237) | | main `829188e9` + this PR (`deee533a`) | over 10 min in the world, no crash, no `did not close` line | Same save and the same part of the story in both runs. **Not tested:** longer sessions, Series S, other GPUs. Frame generation was switched off in F1 partway through the second run because of the frame generation grain (#1917); that does not touch this PR's path. AI use: Claude Code (Claude Opus 5.5) built both, read the logs and wrote this; I played both runs.
Author
Owner

@⁠grosterr on GitHub · 2026-11-29 16:12 UTC · original

Another confirmation, on an RTX 3060 12 GB (Ampere, 32-lane waves), Ryzen 7 5700X, 32 GB, Windows 11.

Build: 829188e plus this PR, plus local changes away from the list path (the loader without console_insn, #961 VICTORY_AMBIENT_LEAN, and a change of ours to two texture lookups). Series S, DLSS Quality preset K, FSR 3 frame generation 2x, RT off, root cache on (no VICTORY_ROOT_CACHE=0).

  • Without the fix (the same base and settings, without our texture change): a host command list did not close (0x80070057) about 25 minutes in, during the boat mission (log details in #2237).
  • With the fix: about 46 minutes of play with no crash, through the rest of that mission, a night drive into town and the house. No 0x80070057 in the log.

Posted by Claude Code on behalf of the machine's owner.

**@⁠grosterr** on GitHub · 2026-11-29 16:12 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2305#issuecomment-7258704438) Another confirmation, on an RTX 3060 12 GB (Ampere, 32-lane waves), Ryzen 7 5700X, 32 GB, Windows 11. Build: `829188e` plus this PR, plus local changes away from the list path (the loader without `console_insn`, #961 `VICTORY_AMBIENT_LEAN`, and a change of ours to two texture lookups). Series S, DLSS Quality preset K, FSR 3 frame generation 2x, RT off, root cache on (no `VICTORY_ROOT_CACHE=0`). - Without the fix (the same base and settings, without our texture change): `a host command list did not close (0x80070057)` about 25 minutes in, during the boat mission (log details in #2237). - With the fix: about 46 minutes of play with no crash, through the rest of that mission, a night drive into town and the house. No `0x80070057` in the log. Posted by Claude Code on behalf of the machine's owner.
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-30 05:16 UTC · original · approved these changes

Tested locally merged onto main (41adb551).

  • Merge: Clean 21-line merge in crates/victory-gpu/src/draw.rs.
  • Tests (RTX 5090): cargo test -p victory-gpu --lib draw:: passed (25 passed; 0 failed; 2 ignored) with 0 new warnings.

Clean guard clearing cached host-list state tracking when the underlying host list or epoch changes. LGTM.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

**@⁠Dukestar69** on GitHub · 2026-11-30 05:16 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2305#pullrequestreview-6107190494) · **approved these changes** Tested locally merged onto `main` (`41adb551`). - **Merge**: Clean 21-line merge in `crates/victory-gpu/src/draw.rs`. - **Tests (RTX 5090)**: `cargo test -p victory-gpu --lib draw::` passed (`25 passed; 0 failed; 2 ignored`) with 0 new warnings. Clean guard clearing cached host-list state tracking when the underlying host list or epoch changes. LGTM. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Author
Owner

@⁠tillo88 on GitHub · 2026-11-30 12:44 UTC · original

Tested on top of v2026.11.29.05 (merges cleanly, builds) against #2237's crash, on an unattended replay bench: same save restored before every run, controller input played back with VICTORY_INPUT_REPLAY, release build, Series X 1440p, DLSS Quality, FG off, RT off, Ryzen 7 9800X3D + RTX 5070 Ti 16 GB (driver 621.40), 32 GB RAM, Windows 11.

v2026.11.29.05 Runs stopped at the prison → plane cut (+2:13 to +2:17) at +2:37 at +6:00 other passed
as released 41 8 (5 list close, 3 device lost) 6 1 1 (device lost at +1:43) 25
with this PR 36 7 (6 list close, 1 device lost) 1 3 2 (device lost at +1:30; one game access violation) 23

"list close" is a host command list did not close (0x80070057), "device lost" is relay: the device was lost. Runs include the warm-up runs, as only crashes are counted here; one #3792 launch that ended after 3 s is left out.

Most of the crashes, with and without it, come at the same second, about one second after the masked twin [mesh 480d53fc48107a50, pixel f41ec9d9437c021c-mask] is made at the prison -> plane cutscene cut. At the cut and at +2:37 it is 8 of 36 runs with this PR and 14 of 41 without; with these counts that difference is within chance. So on this route it doesn't make the crash go away. That doesn't say the tracking fix is wrong, only that something else also produces the invalid command there. The +6:00 stops may come from runs where the replay had left the route. Details and timings in #2237.

Measured unattended on a replay bench (same save, recorded controller input via VICTORY_INPUT_REPLAY); numbers and text prepared with Claude.

**@⁠tillo88** on GitHub · 2026-11-30 12:44 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2305#issuecomment-7278864514) Tested on top of **v2026.11.29.05** (merges cleanly, builds) against #2237's crash, on an unattended replay bench: same save restored before every run, controller input played back with `VICTORY_INPUT_REPLAY`, release build, Series X 1440p, DLSS Quality, FG off, RT off, Ryzen 7 9800X3D + RTX 5070 Ti 16 GB (driver 621.40), 32 GB RAM, Windows 11. | v2026.11.29.05 | Runs | stopped at the prison → plane cut (+2:13 to +2:17) | at +2:37 | at +6:00 | other | passed | |---|---|---|---|---|---|---| | as released | 41 | 8 (5 list close, 3 device lost) | 6 | 1 | 1 (device lost at +1:43) | 25 | | with this PR | 36 | 7 (6 list close, 1 device lost) | 1 | 3 | 2 (device lost at +1:30; one game access violation) | 23 | "list close" is `a host command list did not close (0x80070057)`, "device lost" is `relay: the device was lost`. Runs include the warm-up runs, as only crashes are counted here; one #3792 launch that ended after 3 s is left out. Most of the crashes, with and without it, come at the same second, about one second after the masked twin `[mesh 480d53fc48107a50, pixel f41ec9d9437c021c-mask]` is made at the prison -> plane cutscene cut. At the cut and at +2:37 it is 8 of 36 runs with this PR and 14 of 41 without; with these counts that difference is within chance. So on this route it doesn't make the crash go away. That doesn't say the tracking fix is wrong, only that something else also produces the invalid command there. The +6:00 stops may come from runs where the replay had left the route. Details and timings in #2237. Measured unattended on a replay bench (same save, recorded controller input via VICTORY_INPUT_REPLAY); numbers and text prepared with Claude.
github manually merged commit ae53fb15a0 into main 2026-11-30 14:14:32 +00:00
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/trustno1-coder--VIctory-NVIDIA!2305
No description provided.