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

Merged
Wazzabeee merged 1 commit from upstream-pr/2305 into main 2026-11-30 14:12:03 +00:00
Wazzabeee commented 2026-11-29 11:39:32 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Wazzabeee on 2026-11-29T11:39:32Z.


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.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5550338777 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2305). Originally posted by [Wazzabeee](https://github.com/Wazzabeee) on 2026-11-29T11:39:32Z. --- 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.
Wazzabeee commented 2026-11-29 12:24:22 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Wazzabeee on 2026-11-29T12:24:22Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7255788571 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2305#issuecomment-7255788571). Originally posted by [Wazzabeee](https://github.com/Wazzabeee) on 2026-11-29T12:24:22Z. --- 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`.
Creaa commented 2026-11-29 14:06:35 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Creaa on 2026-11-29T14:06:35Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7257046557 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2305#issuecomment-7257046557). Originally posted by [Creaa](https://github.com/Creaa) on 2026-11-29T14:06:35Z. --- 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.
grosterr commented 2026-11-29 16:12:37 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by grosterr on 2026-11-29T16:12:37Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7258704438 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2305#issuecomment-7258704438). Originally posted by [grosterr](https://github.com/grosterr) on 2026-11-29T16:12:37Z. --- 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.
Dukestar69 commented 2026-11-30 05:16:32 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Dukestar69 on 2026-11-30T05:16:32Z.

Review: APPROVED


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

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:review:6107190494 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2305#pullrequestreview-6107190494). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-30T05:16:32Z. **Review:** APPROVED --- 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).
tillo88 commented 2026-11-30 12:44:47 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tillo88 on 2026-11-30T12:44:47Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7278864514 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2305#issuecomment-7278864514). Originally posted by [tillo88](https://github.com/tillo88) on 2026-11-30T12:44:47Z. --- 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.
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
trustno1-coder/VIctory-NVIDIA!2305
No description provided.