RDNA 2: send the compare list in its own ExecuteCommandLists call (D3D12 ID 538, device removed) #53

Manually merged
github merged 1 commit from github-bot/gh-52 into main 2026-12-05 17:43:43 +00:00 AGit
Owner

@⁠YamoriCou on GitHub · 2026-12-04 19:25 UTC · original
YamoriCou:rdna2-compare-own-call → main · +13 −1 · 1 files · 1 commits · merged 2026-12-05 17:40 UTC

Follow-up to #19, reduced to the targeted split fix suggested there. No settings or launcher changes.

Problem: On RDNA 2 (RX 6800 XT) the device is removed (TDR) about 15 s into play. The D3D12 debug layer reports ID 538: a buffer that card.check reads as a root SRV has been promoted to COPY_DEST by an earlier list in the same ExecuteCommandLists call.

Fix: In execute_late, add a cut before the card.check list so it starts its own call. Implicit promotions decay between calls, so the buffer is back in COMMON when the compare runs. Only submissions that have a compare list are affected.

Testing: RX 6800 XT, ReVIctory 0.5.0 with this exact change: about 1 hour of play, no crash. Without it, the device is removed about 15 s in. This branch is based on the current main.

Note (not changed here): on this card VICTORY_JOIN_PARTS=8 and VICTORY_JOIN_SEND=1 still cause separate device removals (debug layer IDs 553/538), so my test ran with those off. I'll look into targeted fixes for them separately.

**@⁠YamoriCou** on GitHub · 2026-12-04 19:25 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52) `YamoriCou:rdna2-compare-own-call` → `main` · +13 −1 · 1 files · 1 commits · merged 2026-12-05 17:40 UTC Follow-up to #19, reduced to the targeted split fix suggested there. No settings or launcher changes. **Problem:** On RDNA 2 (RX 6800 XT) the device is removed (TDR) about 15 s into play. The D3D12 debug layer reports ID 538: a buffer that `card.check` reads as a root SRV has been promoted to COPY_DEST by an earlier list in the same `ExecuteCommandLists` call. **Fix:** In `execute_late`, add a cut before the `card.check` list so it starts its own call. Implicit promotions decay between calls, so the buffer is back in COMMON when the compare runs. Only submissions that have a compare list are affected. **Testing:** RX 6800 XT, ReVIctory 0.5.0 with this exact change: about 1 hour of play, no crash. Without it, the device is removed about 15 s in. This branch is based on the current main. **Note (not changed here):** on this card `VICTORY_JOIN_PARTS=8` and `VICTORY_JOIN_SEND=1` still cause separate device removals (debug layer IDs 553/538), so my test ran with those off. I'll look into targeted fixes for them separately.
On RDNA 2 (RX 6800 XT) the device is removed about 15 s into play. The
D3D12 debug layer reports ID 538: a buffer the card.check list reads as
a root SRV was promoted to COPY_DEST by an earlier list of the same
ExecuteCommandLists call. Cut before the compare list so it starts its
own call; implicit promotions decay between calls.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018SHrJTg8cp58siDybigfMw
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 19:28:44 +00:00
Author
Owner

@⁠scarlett7023 on GitHub · 2026-12-04 21:24 UTC · original

Data point for the same failure class on RDNA 3 (RX 7900 XT, Windows 11 23H2, 32 GB RAM).

ReVIctory v0.5.0 (build b99f876b), title 1.0.2.1: every single run dies 40-70 s in, at the same kind of frame, with

ERROR [gpu] a host command list did not close (0x80004005): a command recorded into it was invalid; a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command
VIctory: host GPU failure: a host command list did not close ...

The line right before it is always a [pipe] first bind pipeline=... from a burst of first-bind shaders (mesh/pixel pairs plus ~15 compute), e.g.

[pipe] first bind pipeline=0x1e30ea62280 frame=28524 stage="compute" size=1996 hash=93fb87bdc7295d2b

Excluded so far, all with identical results: v0.3.0 / v0.4.0 / v0.5.0; Adrenalin 26.11.1 and 26.11.2; FSR 4 Quality + frame gen vs FSR 3.1 Balanced, no FG, 60 fps cap; -Safe; VICTORY_PLANE_NOW=0; JOIN off; full warm (88,520 pipelines, 0 bad). No Display 4101 TDR, no WHEA, no WER dump, data/<title>/dumps empty, VRAM peak 22% of 19.6 GB.

So it does not look like a compile-in-flight or VRAM issue here - a command that was recorded is invalid when the list closes, which reads like the same state-promotion family as #19. Would a diagnostics build with VICTORY_D3D12_DEBUG=1 name the offending command? Happy to run it and report the output.

**@⁠scarlett7023** on GitHub · 2026-12-04 21:24 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7424651710) Data point for the same failure class on RDNA 3 (RX 7900 XT, Windows 11 23H2, 32 GB RAM). ReVIctory v0.5.0 (`build b99f876b`), title 1.0.2.1: every single run dies 40-70 s in, at the same kind of frame, with ``` ERROR [gpu] a host command list did not close (0x80004005): a command recorded into it was invalid; a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command VIctory: host GPU failure: a host command list did not close ... ``` The line right before it is always a `[pipe] first bind pipeline=...` from a burst of first-bind shaders (mesh/pixel pairs plus ~15 compute), e.g. ``` [pipe] first bind pipeline=0x1e30ea62280 frame=28524 stage="compute" size=1996 hash=93fb87bdc7295d2b ``` Excluded so far, all with identical results: v0.3.0 / v0.4.0 / v0.5.0; Adrenalin 26.11.1 and 26.11.2; FSR 4 Quality + frame gen vs FSR 3.1 Balanced, no FG, 60 fps cap; `-Safe`; `VICTORY_PLANE_NOW=0`; JOIN off; full `warm` (88,520 pipelines, 0 bad). No Display 4101 TDR, no WHEA, no WER dump, `data/<title>/dumps` empty, VRAM peak 22% of 19.6 GB. So it does not look like a compile-in-flight or VRAM issue here - a command that was recorded is invalid when the list closes, which reads like the same state-promotion family as #19. Would a diagnostics build with `VICTORY_D3D12_DEBUG=1` name the offending command? Happy to run it and report the output.
Author
Owner

@⁠YamoriCou on GitHub · 2026-12-05 03:45 UTC · original

This looks like a different class from #19: #19 was a device removal at execution time (ID 538 on RDNA 2), while yours is Close() rejecting the list, so an invalid command is caught at record time. The split fix here probably won't change it.

But yes, the failure path is made for this: in a diagnostics build with VICTORY_D3D12_DEBUG=1, the error line gets ; debug layer: … appended with the debug layer's first message, which names the command. Build with:
cargo build --locked --release -p victory --features diagnostics
then run with $env:VICTORY_D3D12_DEBUG='1' (expect it to be slow). Post the full error line plus the lines just before it.

Since other RDNA 3 cards seem to run v0.5.0, it may also be worth ruling out things specific to your machine: Windows 11 23H2 (most testers are probably on 24H2), and overlays/injectors (RTSS/Afterburner, ReShade, Discord, the Adrenalin overlay), or leftover VICTORY_* variables set system-wide.

**@⁠YamoriCou** on GitHub · 2026-12-05 03:45 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7431316846) This looks like a different class from #19: #19 was a device removal at execution time (ID 538 on RDNA 2), while yours is Close() rejecting the list, so an invalid command is caught at record time. The split fix here probably won't change it. But yes, the failure path is made for this: in a diagnostics build with VICTORY_D3D12_DEBUG=1, the error line gets ; debug layer: … appended with the debug layer's first message, which names the command. Build with: cargo build --locked --release -p victory --features diagnostics then run with $env:VICTORY_D3D12_DEBUG='1' (expect it to be slow). Post the full error line plus the lines just before it. Since other RDNA 3 cards seem to run v0.5.0, it may also be worth ruling out things specific to your machine: Windows 11 23H2 (most testers are probably on 24H2), and overlays/injectors (RTSS/Afterburner, ReShade, Discord, the Adrenalin overlay), or leftover VICTORY_* variables set system-wide.
Author
Owner

@⁠scarlett7023 on GitHub · 2026-12-05 04:13 UTC · original

Thanks for taking the time to look at this -- here is what I found after running the machine-specific checks you suggested.

Environment checks (all on the same machine that crashes):

  • Windows 11 Pro 23H2, build 22631.2861 (so yes, not 24H2; this installation is old and cannot be updated in place, it would need a reinstall)
  • No ReShade, RTSS, MSI Afterburner, Discord. No injected DLLs in the game folder (checked for dxgi/d3d11/d3d12/dinput8/version.dll)
  • No leftover VICTORY_* or DARNER_* variables in HKLM or HKCU environment
  • Radeon Software's in-game overlay (mdow.exe) was running; I killed it and confirmed it did not respawn for the whole run
  • Possibly irrelevant but worth mentioning: three virtual display drivers are installed (ToDesk, Oray/SunLogin, GameViewer), HAGS is on, driver 32.0.32015.16001 (Adrenalin 26.11.1), RX 7900 XT

Result with the overlay disabled and stock settings (3840x2160, 30 fps cap, no FSR, no frame gen): the same failure, only later.

Earlier runs were uncapped (~700 fps in the menu) and hit this after ~40 s / ~28k frames. With the 30 fps cap it survived ~3 minutes / ~5k frames, then:

[pipe] first bind pipeline=... (a burst of first-bind lines, mesh/pixel/compute)
ERROR [gpu] a host command list did not close (0x80004005, 未指定的错误 (The parameter is incorrect)): a command recorded into it was invalid
VIctory: host GPU failure: a host command list did not close (0x80004005): a command recorded into it was invalid

It looks frame-count / pipeline-bind driven rather than wall-clock: the crash always lands right where a batch of first-bind pipelines is recorded.

Two questions:

  1. Is there a prebuilt diagnostics binary anywhere (CI artifact, release asset, anything) built with --features diagnostics? I would much rather download that than build the tree locally.
  2. If there is not, and we build it ourselves: is cargo build --locked --release -p victory --features diagnostics still the right invocation on the current tree, and is there anything else you would want captured in the same run (e.g. VICTORY_LOG=debug, or a particular title state) so that the line is actually useful to you?

Happy to do whichever is more useful -- we just want the report to be worth your time. The machine can reproduce this on demand within a few minutes.

**@⁠scarlett7023** on GitHub · 2026-12-05 04:13 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7431677952) Thanks for taking the time to look at this -- here is what I found after running the machine-specific checks you suggested. **Environment checks (all on the same machine that crashes):** - Windows 11 Pro **23H2, build 22631.2861** (so yes, not 24H2; this installation is old and cannot be updated in place, it would need a reinstall) - No ReShade, RTSS, MSI Afterburner, Discord. No injected DLLs in the game folder (checked for dxgi/d3d11/d3d12/dinput8/version.dll) - No leftover VICTORY_* or DARNER_* variables in HKLM or HKCU environment - Radeon Software's in-game overlay (mdow.exe) was running; I killed it and confirmed it did not respawn for the whole run - Possibly irrelevant but worth mentioning: three virtual display drivers are installed (ToDesk, Oray/SunLogin, GameViewer), HAGS is on, driver 32.0.32015.16001 (Adrenalin 26.11.1), RX 7900 XT **Result with the overlay disabled and stock settings** (3840x2160, 30 fps cap, no FSR, no frame gen): the same failure, only later. Earlier runs were uncapped (~700 fps in the menu) and hit this after ~40 s / ~28k frames. With the 30 fps cap it survived ~3 minutes / ~5k frames, then: ``` [pipe] first bind pipeline=... (a burst of first-bind lines, mesh/pixel/compute) ERROR [gpu] a host command list did not close (0x80004005, 未指定的错误 (The parameter is incorrect)): a command recorded into it was invalid VIctory: host GPU failure: a host command list did not close (0x80004005): a command recorded into it was invalid ``` It looks frame-count / pipeline-bind driven rather than wall-clock: the crash always lands right where a batch of first-bind pipelines is recorded. **Two questions:** 1. Is there a **prebuilt diagnostics binary** anywhere (CI artifact, release asset, anything) built with --features diagnostics? I would much rather download that than build the tree locally. 2. If there is not, and we build it ourselves: is cargo build --locked --release -p victory --features diagnostics still the right invocation on the current tree, and is there anything else you would want captured in the same run (e.g. VICTORY_LOG=debug, or a particular title state) so that the line is actually useful to you? Happy to do whichever is more useful -- we just want the report to be worth your time. The machine can reproduce this on demand within a few minutes.
Author
Owner

@⁠YamoriCou on GitHub · 2026-12-05 04:33 UTC · original

Thanks for the thorough checks! A few thoughts:

Worth one quick test first: the three virtual display drivers. Remote-desktop tools (ToDesk, SunLogin, GameViewer) hook into D3D for capture, which can interfere. For a test run, disable them in Device Manager → Display adapters, and stop their services/tray apps. Your observation that it's driven by first-bind pipelines rather than time is a great clue: it suggests one specific pipeline/command is rejected at record time.

  1. Prebuilt diagnostics binary: I don't think there is one. CI only runs clippy and tests, it doesn't upload artifacts.

  2. Build command: the README's documented way is a separate profile:
    cargo build --locked --profile diag -p victory --features diagnostics
    The result lands in target\diag\victory.exe (play.ps1 -Build uses that folder by default). Then set VICTORY_D3D12_DEBUG=1 for the run. With the debug layer on, the "did not close" error line gets ; debug layer: … appended with the first message, naming the invalid command. Please post that line plus ~30 lines before it. If the message is unclear, a second run with VICTORY_D3D12_GBV=1 too adds GPU-based validation (much slower).

**@⁠YamoriCou** on GitHub · 2026-12-05 04:33 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7431924408) Thanks for the thorough checks! A few thoughts: Worth one quick test first: the three virtual display drivers. Remote-desktop tools (ToDesk, SunLogin, GameViewer) hook into D3D for capture, which can interfere. For a test run, disable them in Device Manager → Display adapters, and stop their services/tray apps. Your observation that it's driven by first-bind pipelines rather than time is a great clue: it suggests one specific pipeline/command is rejected at record time. 1. Prebuilt diagnostics binary: I don't think there is one. CI only runs clippy and tests, it doesn't upload artifacts. 2. Build command: the README's documented way is a separate profile: cargo build --locked --profile diag -p victory --features diagnostics The result lands in target\diag\victory.exe (play.ps1 -Build uses that folder by default). Then set VICTORY_D3D12_DEBUG=1 for the run. With the debug layer on, the "did not close" error line gets ; debug layer: … appended with the first message, naming the invalid command. Please post that line plus ~30 lines before it. If the message is unclear, a second run with VICTORY_D3D12_GBV=1 too adds GPU-based validation (much slower).
Author
Owner

@⁠scarlett7023 on GitHub · 2026-12-05 05:19 UTC · original

Built the diagnostics tree as you described and the debug layer names the call. Reproduces in ~3 seconds, so iterating on this is cheap.

Build / setup

  • cargo build --locked --profile diag -p victory --features diagnostics -> target/diag/victory.exe (111.79 MB, SHA256 B717E903EA100BC8C9D2D42DED4F1CB45E529F585A504D8DBAD5E44F1489FF2B)
  • Windows build hash reported at startup: b99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93
  • Had to install the "Graphics Tools" optional feature first, otherwise the build legitimately reports WARN [gpu] no D3D12 debug layer (0x887A002D / SDK component missing). After installing it the layer is live.
  • Run: set VICTORY_D3D12_DEBUG=1 then victory.exe run game_scarlett_master.exe --execute from the game folder.

The named failure

debug layer: ID3D12Device::CreateShaderResourceView: The Format (0x43, R9G9B9E5_SHAREDEXP) is invalid when creating a View; it is not a fully qualified format within the same family as the Format of the Resource (0x2a, R32_UINT).

and immediately after it:

ERROR [gpu] host GPU device removed after 1 submissions sent ahead (VICTORY_RELAY=1) of 0 lists; no breadcrumbs (0x887A0004); device removed: 0x887A0001 (invalid call)
ERROR [gpu] when the host device went: the submitting thread was between submissions (nothing of ours was running on the card), of 0 lists, for 0.1 ms; pipeline library: no call running; its file is mapped (3330 bytes), the handle kept open; this run has not replaced the file; 0 of the 1 pages looked at read as zeros now; objects let go at once 0 and after a running submission 17; submissions started 16 finished 15

Last few lines before it, for context (frame 4, six draws in):

[pipe] first bind pipeline=0x1fd8eafc880 frame=4 stage="pixel" size=1588 hash=a78d088fa55aa495
[gpu] a submission is given to its queue part by part (its lists wait for memory values) kind=0 lists=2 run_at_once=0 parts=2 waits=1
[gpu] a list waits for a memory value address=0x100000000 comparison=7 reference=1 wide=true met=true
[gpu] frame presented frame=4 draws=6 drawn=6 dispatches=0 dispatched=0
[gpu] a cube array view (shaders read cube 0 of it: the translator takes cube arrays as cubes) made=1 first_face=0 cubes=2 slices=12 levels=1
[gpu] a cube array view (...) made=2 first_face=0 cubes=2 slices=12 levels=1
[gpu] swap chain did not present the frame status=HRESULT(0x887A0005)

How this lines up with the release-build symptom

In the release build there is no debug layer, the invalid SRV creation still happens, the host device is removed, and the next meaningful API call to notice is the command-list close -- which is exactly the a host command list did not close (0x80004005): a command recorded into it was invalid + VIctory: host GPU failure line we have been chasing. So the 0x80004005 was a downstream symptom; the root call is this CreateShaderResourceView format mismatch.

Guess at the fix, for what it is worth

A resource created on the host as R32_UINT is being given a R9G9B9E5_SHAREDEXP view. D3D12 requires the resource be created with a typeless format (e.g. R32_TYPELESS) when any view uses a different format from a different family -- the driver will not allow reinterpreting a typed resource. If the title creates the resource as R32_UINT and the view as 0x43, then either the host resource should be created typeless in that case, or 0x43 should be translated to a format in the same family as the resource's host format. I have not chased it further than this report.

Happy to run more experiments with this build (it also lets me flip VICTORY_D3D12_GBV=1 if you want the GPU-side validation too). Full stdout/stderr (282 lines, and the debug-layer run) are available if you want them pasted or attached.

**@⁠scarlett7023** on GitHub · 2026-12-05 05:19 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7432534584) Built the diagnostics tree as you described and the debug layer **names the call**. Reproduces in ~3 seconds, so iterating on this is cheap. **Build / setup** - `cargo build --locked --profile diag -p victory --features diagnostics` -> `target/diag/victory.exe` (111.79 MB, SHA256 `B717E903EA100BC8C9D2D42DED4F1CB45E529F585A504D8DBAD5E44F1489FF2B`) - Windows build hash reported at startup: `b99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93` - Had to install the "Graphics Tools" optional feature first, otherwise the build legitimately reports `WARN [gpu] no D3D12 debug layer (0x887A002D / SDK component missing)`. After installing it the layer is live. - Run: `set VICTORY_D3D12_DEBUG=1` then `victory.exe run game_scarlett_master.exe --execute` from the game folder. **The named failure** ``` debug layer: ID3D12Device::CreateShaderResourceView: The Format (0x43, R9G9B9E5_SHAREDEXP) is invalid when creating a View; it is not a fully qualified format within the same family as the Format of the Resource (0x2a, R32_UINT). ``` and immediately after it: ``` ERROR [gpu] host GPU device removed after 1 submissions sent ahead (VICTORY_RELAY=1) of 0 lists; no breadcrumbs (0x887A0004); device removed: 0x887A0001 (invalid call) ERROR [gpu] when the host device went: the submitting thread was between submissions (nothing of ours was running on the card), of 0 lists, for 0.1 ms; pipeline library: no call running; its file is mapped (3330 bytes), the handle kept open; this run has not replaced the file; 0 of the 1 pages looked at read as zeros now; objects let go at once 0 and after a running submission 17; submissions started 16 finished 15 ``` Last few lines before it, for context (frame 4, six draws in): ``` [pipe] first bind pipeline=0x1fd8eafc880 frame=4 stage="pixel" size=1588 hash=a78d088fa55aa495 [gpu] a submission is given to its queue part by part (its lists wait for memory values) kind=0 lists=2 run_at_once=0 parts=2 waits=1 [gpu] a list waits for a memory value address=0x100000000 comparison=7 reference=1 wide=true met=true [gpu] frame presented frame=4 draws=6 drawn=6 dispatches=0 dispatched=0 [gpu] a cube array view (shaders read cube 0 of it: the translator takes cube arrays as cubes) made=1 first_face=0 cubes=2 slices=12 levels=1 [gpu] a cube array view (...) made=2 first_face=0 cubes=2 slices=12 levels=1 [gpu] swap chain did not present the frame status=HRESULT(0x887A0005) ``` **How this lines up with the release-build symptom** In the release build there is no debug layer, the invalid SRV creation still happens, the host device is removed, and the *next* meaningful API call to notice is the command-list close -- which is exactly the `a host command list did not close (0x80004005): a command recorded into it was invalid` + `VIctory: host GPU failure` line we have been chasing. So the `0x80004005` was a downstream symptom; the root call is this `CreateShaderResourceView` format mismatch. **Guess at the fix, for what it is worth** A resource created on the host as `R32_UINT` is being given a `R9G9B9E5_SHAREDEXP` view. D3D12 requires the resource be created with a typeless format (e.g. `R32_TYPELESS`) when any view uses a different format from a different family -- the driver will not allow reinterpreting a typed resource. If the title creates the resource as `R32_UINT` and the view as `0x43`, then either the host resource should be created typeless in that case, or `0x43` should be translated to a format in the same family as the resource's host format. I have not chased it further than this report. Happy to run more experiments with this build (it also lets me flip `VICTORY_D3D12_GBV=1` if you want the GPU-side validation too). Full stdout/stderr (282 lines, and the debug-layer run) are available if you want them pasted or attached.
Author
Owner

@⁠YamoriCou on GitHub · 2026-12-05 05:27 UTC · original

Great report, that pins it down. I followed it in the code: this looks like the zero-copy R9G9B9E5 alias path in crates/victory-gpu/src/resource.rs. When the device reports RelaxedFormatCastingSupported (plus ID3D12Device10), R32_UINT/R32_TYPELESS UAV textures are created with CreateCommittedResource3 and a castable-format list including R9G9B9E5_SHAREDEXP (67), and placed R9G9B9E5 views then get an SRV directly on the R32_UINT texture (direct_alias_of, and the shortcut in fits() in descriptor/host.rs). So your typeless idea is close: castable format lists are the modern version of it.

That path only runs on machines that report relaxed casting, which would explain why other RDNA 3 cards are fine and yours (old 23H2 build) isn't.

Quick confirmation: run with VICTORY_DIRECT_ALIAS=0, which turns that shortcut off and falls back to the staging copy. If the crash is gone, that's the culprit. Also useful:

  1. The log line at startup zero-copy R32_UINT -> R9G9B9E5_SHAREDEXP alias casting relaxed_format_casting=… (true/false?)
  2. The full debug-layer message (it was cut off in your code block). Whether it says the resource has no castable list, or that the format isn't castable, tells which half fails on your machine.
**@⁠YamoriCou** on GitHub · 2026-12-05 05:27 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7432635809) Great report, that pins it down. I followed it in the code: this looks like the zero-copy R9G9B9E5 alias path in crates/victory-gpu/src/resource.rs. When the device reports RelaxedFormatCastingSupported (plus ID3D12Device10), R32_UINT/R32_TYPELESS UAV textures are created with CreateCommittedResource3 and a castable-format list including R9G9B9E5_SHAREDEXP (67), and placed R9G9B9E5 views then get an SRV directly on the R32_UINT texture (direct_alias_of, and the shortcut in fits() in descriptor/host.rs). So your typeless idea is close: castable format lists are the modern version of it. That path only runs on machines that report relaxed casting, which would explain why other RDNA 3 cards are fine and yours (old 23H2 build) isn't. Quick confirmation: run with VICTORY_DIRECT_ALIAS=0, which turns that shortcut off and falls back to the staging copy. If the crash is gone, that's the culprit. Also useful: 1. The log line at startup zero-copy R32_UINT -> R9G9B9E5_SHAREDEXP alias casting relaxed_format_casting=… (true/false?) 2. The full debug-layer message (it was cut off in your code block). Whether it says the resource has no castable list, or that the format isn't castable, tells which half fails on your machine.
Author
Owner

@⁠scarlett7023 on GitHub · 2026-12-05 05:29 UTC · original

Good news and one more: VICTORY_DIRECT_ALIAS=0 changes the failure, so you are right about the path -- but it does not fix the run, and it uncovers a second, independent host-API violation underneath it.

1. Startup line you asked for (default run, no override):

13:14:25.666 INFO  [gpu] zero-copy R32_UINT -> R9G9B9E5_SHAREDEXP alias casting relaxed_format_casting=true

So this machine does report relaxed casting, and the zero-copy path is live here.

2. Full debug-layer message (not cut this time):

debug layer: ID3D12Device::CreateShaderResourceView: The Format (0x43, R9G9B9E5_SHAREDEXP) is invalid when creating a View; it is not a fully qualified format within the same family as the Format of the Resource (0x2a, R32_UINT).

That is the complete text -- one line, no resource name, no castable-list wording. It fails at CreateShaderResourceView itself, i.e. the resource was not treated as castable when the SRV was made (the alias shortcut handed the R32_UINT texture to a plain SRV creation).

3. With VICTORY_DIRECT_ALIAS=0:

  • The CreateShaderResourceView failure is gone (no such line anywhere in the run, and the startup alias line is not printed, as expected).
  • It now survives longer (about 50 s / ~1024 frames instead of ~3 s) and then dies on a different debug-layer violation:
ERROR [gpu] a host command list did not close (0x80004005): a command recorded into it was invalid; debug layer: ID3D12CommandQueue::ExecuteCommandLists: Failed to execute a command list 0x000002AC74CD8890:'Unnamed ID3D12GraphicsCommandList Object' because the command queue fence has not advanced past previous executions of the command list.

4. Not the relay depth: re-ran with VICTORY_DIRECT_ALIAS=0 and VICTORY_RELAY=0, same message, same ~55 s. So the list is being executed again (or closed into a submission) while the queue fence has not passed its previous execution -- independent of how many submissions are sent ahead.

Where I would look (I have not read enough of the tree to be sure): the close path that produces a host command list did not close re-records into a list that was already submitted; or the pool hands out a list whose fence value was never waited on. The comment on that line says a command recorded into it was invalid, but the layer says the problem is the queue fence, so the two diagnostics disagree -- worth a look at the pool's fence bookkeeping rather than the recording.

What I can do next, whatever is most useful to you:

  • Add a breadcrumb around command-list acquisition/reuse and send you the log (I can build a patched tree myself, as I have the toolchain working).
  • Re-run any specific case: the crash is deterministic, ~50 s from launch, --execute from the game folder.
  • Or try your next hypothesis as an env switch / small patch -- I can rebuild in a couple of minutes (--profile diag takes ~3 min here).

If it helps: this is a Windows 11 23H2 box (build 22631.6199 now), RX 7900 XT, 32 GB, driver 32.0.32015.16001, and the game is a complete XSX dump.

**@⁠scarlett7023** on GitHub · 2026-12-05 05:29 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7432667588) Good news and one more: `VICTORY_DIRECT_ALIAS=0` changes the failure, so you are right about the path -- but it does not fix the run, and it uncovers a second, independent host-API violation underneath it. **1. Startup line you asked for (default run, no override):** ``` 13:14:25.666 INFO [gpu] zero-copy R32_UINT -> R9G9B9E5_SHAREDEXP alias casting relaxed_format_casting=true ``` So this machine does report relaxed casting, and the zero-copy path is live here. **2. Full debug-layer message (not cut this time):** ``` debug layer: ID3D12Device::CreateShaderResourceView: The Format (0x43, R9G9B9E5_SHAREDEXP) is invalid when creating a View; it is not a fully qualified format within the same family as the Format of the Resource (0x2a, R32_UINT). ``` That is the complete text -- one line, no resource name, no castable-list wording. It fails at `CreateShaderResourceView` itself, i.e. the resource was not treated as castable when the SRV was made (the alias shortcut handed the R32_UINT texture to a plain SRV creation). **3. With `VICTORY_DIRECT_ALIAS=0`:** - The `CreateShaderResourceView` failure is **gone** (no such line anywhere in the run, and the startup alias line is not printed, as expected). - It now survives longer (about 50 s / ~1024 frames instead of ~3 s) and then dies on a different debug-layer violation: ``` ERROR [gpu] a host command list did not close (0x80004005): a command recorded into it was invalid; debug layer: ID3D12CommandQueue::ExecuteCommandLists: Failed to execute a command list 0x000002AC74CD8890:'Unnamed ID3D12GraphicsCommandList Object' because the command queue fence has not advanced past previous executions of the command list. ``` **4. Not the relay depth:** re-ran with `VICTORY_DIRECT_ALIAS=0` **and** `VICTORY_RELAY=0`, same message, same ~55 s. So the list is being executed again (or closed into a submission) while the queue fence has not passed its previous execution -- independent of how many submissions are sent ahead. **Where I would look** (I have not read enough of the tree to be sure): the close path that produces `a host command list did not close` re-records into a list that was already submitted; or the pool hands out a list whose fence value was never waited on. The comment on that line says `a command recorded into it was invalid`, but the layer says the problem is the queue fence, so the two diagnostics disagree -- worth a look at the pool's fence bookkeeping rather than the recording. **What I can do next, whatever is most useful to you:** - Add a breadcrumb around command-list acquisition/reuse and send you the log (I can build a patched tree myself, as I have the toolchain working). - Re-run any specific case: the crash is deterministic, ~50 s from launch, `--execute` from the game folder. - Or try your next hypothesis as an env switch / small patch -- I can rebuild in a couple of minutes (`--profile diag` takes ~3 min here). If it helps: this is a Windows 11 23H2 box (build 22631.6199 now), RX 7900 XT, 32 GB, driver 32.0.32015.16001, and the game is a complete XSX dump.
Author
Owner

@⁠YamoriCou on GitHub · 2026-12-05 05:36 UTC · original

Great work, thanks! The second error ("list executed again before its fence passed") is the same class I hit on RDNA 2 with the submission-joining settings. Two quick tests:

  1. Set VICTORY_JOIN_PARTS=1 and VICTORY_JOIN_SEND=0 explicitly (together with VICTORY_DIRECT_ALIAS=0) and see whether the 50 s crash goes away.
  2. Try this PR's branch (YamoriCou:rdna2-compare-own-call) built with --profile diag: it splits the compare list into its own submission, which fixed a related fence/state issue for me.

If neither helps, your breadcrumb idea around command-list reuse is probably the best next step, and I'd tag the maintainer here since this is beyond a one-line fix.

**@⁠YamoriCou** on GitHub · 2026-12-05 05:36 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7432749596) Great work, thanks! The second error ("list executed again before its fence passed") is the same class I hit on RDNA 2 with the submission-joining settings. Two quick tests: 1. Set VICTORY_JOIN_PARTS=1 and VICTORY_JOIN_SEND=0 explicitly (together with VICTORY_DIRECT_ALIAS=0) and see whether the 50 s crash goes away. 2. Try this PR's branch (YamoriCou:rdna2-compare-own-call) built with --profile diag: it splits the compare list into its own submission, which fixed a related fence/state issue for me. If neither helps, your breadcrumb idea around command-list reuse is probably the best next step, and I'd tag the maintainer here since this is beyond a one-line fix.
Author
Owner

@⁠scarlett7023 on GitHub · 2026-12-05 05:43 UTC · original

Both suggestions tried -- neither clears it, and the numbers are consistent. Built the PR branch at e91c03f1bf67 with --profile diag (2m22s) and ran all four combinations on the same box:

Run Result
main + VICTORY_DIRECT_ALIAS=0 + JOIN_PARTS=1 + JOIN_SEND=0 same fence error, ~55 s
PR branch e91c03f (debug layer, defaults) same CreateShaderResourceView error as main, 3 s (so the branch does not carry the alias fix)
PR branch + VICTORY_DIRECT_ALIAS=0 same fence error, ~45 s

The fence message is byte-for-byte the same in all of them:

debug layer: ID3D12CommandQueue::ExecuteCommandLists: Failed to execute a command list 0x00000209053A7890:'Unnamed ID3D12GraphicsCommandList Object' because the command queue fence has not advanced past previous executions of the command list

So splitting the compare list into its own submission does not move it, and neither does JOIN_PARTS=1/JOIN_SEND=0. It really is a list being submitted again before its previous execution's fence passed.

@⁠ReTerryDavis -- tagging you as YamoriCou suggested, since this looks like it needs a decision on the command-list pool rather than an env switch.

About the breadcrumbs: I am set up to build patched trees here (--profile diag takes ~2-3 min, and the crash is deterministic: ~45-55 s after launch, victory.exe run game_scarlett_master.exe --execute from the game folder, so I can iterate quickly). If you tell me which struct owns the list pool / where the fence token for a reused list lives, I will add logging there and send you the trace: for each ExecuteCommandLists I can log the list pointer, the fence value signalled behind it, and for each list closed again, its last submitted value vs. the completed fence value.

If you would rather point at a specific commit or hand me a patch to apply, that works too. I have the toolchain (MSVC 14.44 + Rust 1.98.1) and the debug layer installed, so anything you push I can build and run within minutes.

Details of this box, in case it matters: Windows 11 23H2 (22631.6199), RX 7900 XT, 32 GB, Adrenalin 26.11.1 (32.0.32015.16001), HAGS on, complete XSX dump of the title. The same failure happens with the release v0.5.0 binary, so it is not a diagnostics-build artifact.

**@⁠scarlett7023** on GitHub · 2026-12-05 05:43 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7432836088) Both suggestions tried -- neither clears it, and the numbers are consistent. Built the PR branch at `e91c03f1bf67` with `--profile diag` (2m22s) and ran all four combinations on the same box: | Run | Result | | --- | --- | | main + `VICTORY_DIRECT_ALIAS=0` + `JOIN_PARTS=1` + `JOIN_SEND=0` | same fence error, **~55 s** | | PR branch `e91c03f` (debug layer, defaults) | same `CreateShaderResourceView` error as main, **3 s** (so the branch does not carry the alias fix) | | PR branch + `VICTORY_DIRECT_ALIAS=0` | same fence error, **~45 s** | The fence message is byte-for-byte the same in all of them: ``` debug layer: ID3D12CommandQueue::ExecuteCommandLists: Failed to execute a command list 0x00000209053A7890:'Unnamed ID3D12GraphicsCommandList Object' because the command queue fence has not advanced past previous executions of the command list ``` So splitting the compare list into its own submission does not move it, and neither does JOIN_PARTS=1/JOIN_SEND=0. It really is a list being submitted again before its previous execution's fence passed. **@⁠ReTerryDavis** -- tagging you as YamoriCou suggested, since this looks like it needs a decision on the command-list pool rather than an env switch. **About the breadcrumbs:** I am set up to build patched trees here (`--profile diag` takes ~2-3 min, and the crash is deterministic: ~45-55 s after launch, `victory.exe run game_scarlett_master.exe --execute` from the game folder, so I can iterate quickly). If you tell me which struct owns the list pool / where the fence token for a reused list lives, I will add logging there and send you the trace: for each `ExecuteCommandLists` I can log the list pointer, the fence value signalled behind it, and for each list closed again, its last submitted value vs. the completed fence value. If you would rather point at a specific commit or hand me a patch to apply, that works too. I have the toolchain (MSVC 14.44 + Rust 1.98.1) and the debug layer installed, so anything you push I can build and run within minutes. Details of this box, in case it matters: Windows 11 **23H2 (22631.6199)**, RX 7900 XT, 32 GB, Adrenalin 26.11.1 (`32.0.32015.16001`), HAGS on, complete XSX dump of the title. The same failure happens with the release v0.5.0 binary, so it is not a diagnostics-build artifact.
Author
Owner

@⁠YamoriCou on GitHub · 2026-12-05 05:50 UTC · original

Thanks for testing all four combinations, that clearly rules out the split and the join switches. Some pointers for the breadcrumbs, from reading the current main:

• HostList (crates/victory-gpu/src/host.rs, ~line 1695) owns each list's allocator and list; its reset (allocator.Reset() + list.Reset()) is around line 7910.
• Flight (~line 3240) tracks submissions in flight; land() (~line 4039) hands the lists of landed flights to crate::list::recycle for reuse (list.rs / list/groups.rs).
• One candidate worth logging specifically: the compare/prelude lists are pooled separately: work.check.pop().or_else(|| self.make_prelude()) (~line 5502). If a check list is popped and resubmitted before the flight that last used it has landed, that would give exactly this message.

So logging the list pointer and fence value at ExecuteCommandLists, at land()/recycle, and at that work.check.pop() should show which list comes back early.

**@⁠YamoriCou** on GitHub · 2026-12-05 05:50 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7432914645) Thanks for testing all four combinations, that clearly rules out the split and the join switches. Some pointers for the breadcrumbs, from reading the current main: • HostList (crates/victory-gpu/src/host.rs, ~line 1695) owns each list's allocator and list; its reset (allocator.Reset() + list.Reset()) is around line 7910. • Flight (~line 3240) tracks submissions in flight; land() (~line 4039) hands the lists of landed flights to crate::list::recycle for reuse (list.rs / list/groups.rs). • One candidate worth logging specifically: the compare/prelude lists are pooled separately: work.check.pop().or_else(|| self.make_prelude()) (~line 5502). If a check list is popped and resubmitted before the flight that last used it has landed, that would give exactly this message. So logging the list pointer and fence value at ExecuteCommandLists, at land()/recycle, and at that work.check.pop() should show which list comes back early.
github-bot force-pushed github-bot/gh-52 from e91c03f1bf to 8b49bb2c0f 2026-12-05 06:05:59 +00:00 Compare
Author
Owner

@⁠scarlett7023 on GitHub · 2026-12-05 06:26 UTC · original

Update: the debug layer identifies this as id=553 (the same id you mentioned for the JOIN_SEND re-borrow), and the failing list never shows up at any of our submission sites.

What I instrumented (diag tree, --features diagnostics, built locally in ~1m40s): every ExecuteCommandLists call site in victory-gpu -- host submit + join, send_parts_as, send_stage, fetch, descriptor, tiles, upq, upcheck, stamps, inplace, indirect, replay/gpu -- plus both queue shims (queue.rs::execute for the title's queue, replay/record.rs::execute for the forwarder). Every submission logs the list pointer.

Run: VICTORY_D3D12_DEBUG=1 VICTORY_DIRECT_ALIAS=0, default settings (3840x2160, 30 fps, no FSR, no frame gen). The ALIAS=0 takes care of the earlier R9G9B9E5_SHAREDEXP SRV error, as you suggested.

After ~45 s, frame ~2400, right after a burst of first-bind pipelines:

D3D12: ID3D12CommandQueue::ExecuteCommandLists: Failed to execute a command list 0x000001ABDD85A850:'Unnamed ID3D12GraphicsCommandList Object' because the command queue fence has not advanced past previous executions of the command list. id=553 severity=1

The same pointer is reported 28 times in a row afterwards (once per frame) while the breadcrumb log shows 21,878 lines and the title-queue log 11,981 lines from the same run -- and 0x1ABDD85A850 appears in none of them. So the ExecuteCommandLists that the debug layer rejects is not issued from the host's own submit sites, and not from the title's queue shim either.

Same failure with VICTORY_THIN=0, and with VICTORY_JOIN_PARTS=1 + VICTORY_JOIN_SEND=0.

Question: which layer actually hands the merged/translated lists to the queue at runtime -- is there a raw queue handle kept around (loader/merge path) that submits without going through host::execute/send_parts_as? If you can point me at it, I will add the spy there; otherwise I will patch the queue object's vtable itself and dump every submission with its fence value.

The full stderr of the run (all breadcrumbs + the debug layer lines) is available -- just say which pointer or what window you want and I will pull it out.

**@⁠scarlett7023** on GitHub · 2026-12-05 06:26 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7433355991) Update: the debug layer identifies this as **id=553** (the same id you mentioned for the JOIN_SEND re-borrow), and the failing list never shows up at any of our submission sites. **What I instrumented** (diag tree, `--features diagnostics`, built locally in ~1m40s): every `ExecuteCommandLists` call site in `victory-gpu` -- host submit + join, `send_parts_as`, `send_stage`, fetch, descriptor, tiles, upq, upcheck, stamps, inplace, indirect, replay/gpu -- plus both queue shims (`queue.rs::execute` for the title's queue, `replay/record.rs::execute` for the forwarder). Every submission logs the list pointer. **Run**: `VICTORY_D3D12_DEBUG=1 VICTORY_DIRECT_ALIAS=0`, default settings (3840x2160, 30 fps, no FSR, no frame gen). The `ALIAS=0` takes care of the earlier `R9G9B9E5_SHAREDEXP` SRV error, as you suggested. After ~45 s, frame ~2400, right after a burst of first-bind pipelines: ``` D3D12: ID3D12CommandQueue::ExecuteCommandLists: Failed to execute a command list 0x000001ABDD85A850:'Unnamed ID3D12GraphicsCommandList Object' because the command queue fence has not advanced past previous executions of the command list. id=553 severity=1 ``` The same pointer is reported 28 times in a row afterwards (once per frame) while the breadcrumb log shows 21,878 lines and the title-queue log 11,981 lines from the same run -- and `0x1ABDD85A850` appears in **none** of them. So the `ExecuteCommandLists` that the debug layer rejects is not issued from the host's own submit sites, and not from the title's queue shim either. Same failure with `VICTORY_THIN=0`, and with `VICTORY_JOIN_PARTS=1` + `VICTORY_JOIN_SEND=0`. **Question**: which layer actually hands the merged/translated lists to the queue at runtime -- is there a raw queue handle kept around (loader/merge path) that submits without going through `host::execute`/`send_parts_as`? If you can point me at it, I will add the spy there; otherwise I will patch the queue object's vtable itself and dump every submission with its fence value. The full `stderr` of the run (all breadcrumbs + the debug layer lines) is available -- just say which pointer or what window you want and I will pull it out.
Author
Owner

@⁠scarlett7023 on GitHub · 2026-12-05 06:27 UTC · original

Update: the debug layer identifies this as id=553 (the same id you mentioned for the JOIN_SEND re-borrow), and the failing list never shows up at any of our submission sites.

What I instrumented (diag tree, built locally): every ExecuteCommandLists call site in victory-gpu -- host submit + join, send_parts_as, send_stage, fetch, descriptor, tiles, upq, upcheck, stamps, inplace, indirect, replay/gpu, aside/compare/fetch copies -- plus both queue shims (queue.rs::execute for the title's queue and replay/record.rs::execute for the forwarder). Every submission logs the list pointer.

Run: VICTORY_D3D12_DEBUG=1 VICTORY_DIRECT_ALIAS=0, default settings (3840x2160, 30 fps, no FSR, no frame gen). ALIAS=0 takes care of the earlier R9G9B9E5_SHAREDEXP SRV error, as you suggested.

After ~45 s, frame ~2400, right after a burst of first-bind pipelines:

D3D12: ID3D12CommandQueue::ExecuteCommandLists: Failed to execute a command list 0x000001ABDD85A850:'Unnamed ID3D12GraphicsCommandList Object' because the command queue fence has not advanced past previous executions of the command list. id=553 severity=1

The same pointer is then reported 28 times in a row (once per frame) while the breadcrumb log shows 21,878 lines and the title-queue log 11,981 lines from the same run -- and 0x1ABDD85A850 appears in none of them. So the ExecuteCommandLists the debug layer rejects is not issued from the host's own submit sites, and not from the title's queue shim either.

Same failure with VICTORY_THIN=0, and with VICTORY_JOIN_PARTS=1 + VICTORY_JOIN_SEND=0.

Question: which layer actually hands the merged/translated lists to the queue at runtime -- is there a raw queue handle kept around (loader/merge path) that submits without going through host::execute/send_parts_as? If you can point me at it I will add the spy there; otherwise I will patch the queue object's vtable and dump every submission with its fence value.

Happy to pull any window out of the full stderr log -- just say which pointer or range you want.

**@⁠scarlett7023** on GitHub · 2026-12-05 06:27 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7433363700) Update: the debug layer identifies this as **id=553** (the same id you mentioned for the JOIN_SEND re-borrow), and the failing list never shows up at any of our submission sites. **What I instrumented** (diag tree, built locally): every `ExecuteCommandLists` call site in `victory-gpu` -- host submit + join, `send_parts_as`, `send_stage`, fetch, descriptor, tiles, upq, upcheck, stamps, inplace, indirect, replay/gpu, aside/compare/fetch copies -- plus both queue shims (`queue.rs::execute` for the title's queue and `replay/record.rs::execute` for the forwarder). Every submission logs the list pointer. **Run**: `VICTORY_D3D12_DEBUG=1 VICTORY_DIRECT_ALIAS=0`, default settings (3840x2160, 30 fps, no FSR, no frame gen). `ALIAS=0` takes care of the earlier `R9G9B9E5_SHAREDEXP` SRV error, as you suggested. After ~45 s, frame ~2400, right after a burst of first-bind pipelines: ``` D3D12: ID3D12CommandQueue::ExecuteCommandLists: Failed to execute a command list 0x000001ABDD85A850:'Unnamed ID3D12GraphicsCommandList Object' because the command queue fence has not advanced past previous executions of the command list. id=553 severity=1 ``` The same pointer is then reported 28 times in a row (once per frame) while the breadcrumb log shows 21,878 lines and the title-queue log 11,981 lines from the same run -- and `0x1ABDD85A850` appears in **none** of them. So the `ExecuteCommandLists` the debug layer rejects is not issued from the host's own submit sites, and not from the title's queue shim either. Same failure with `VICTORY_THIN=0`, and with `VICTORY_JOIN_PARTS=1` + `VICTORY_JOIN_SEND=0`. **Question**: which layer actually hands the merged/translated lists to the queue at runtime -- is there a raw queue handle kept around (loader/merge path) that submits without going through `host::execute`/`send_parts_as`? If you can point me at it I will add the spy there; otherwise I will patch the queue object's vtable and dump every submission with its fence value. Happy to pull any window out of the full stderr log -- just say which pointer or range you want.
Author
Owner

@⁠YamoriCou on GitHub · 2026-12-05 06:36 UTC · original

Found a submit site that's easy to miss: mapped_at() in crates/victory-gpu/src/host.rs (~lines 338–400). Every time new card memory is made it executes a single pre-recorded COPY list (Aside.list) on its own copy queue (a.queue, not host.queue), then signals a.fence. The lock is only held to send (the comment says the wait under the lock was removed on purpose), and nothing waits for that list's previous execution before running it again. Two threads making memory at once (streaming into a new area) re-execute the same list while the previous run is still pending, which is exactly id 553, with the same list pointer every time and outside both queue shims and the host submit sites.

Quick confirmation: run with VICTORY_WAIT_RESIDENT=0 (skips that path entirely). If the 45 s crash is gone, that's it. Note the comment there says a run was once lost without it, so it's a test, not a fix.

A real fix would be to keep a small ring of identical copy lists (like host/awake.rs does with two) and wait on the fence only when the slot about to be reused hasn't completed yet, or wait for a.value before re-executing.

**@⁠YamoriCou** on GitHub · 2026-12-05 06:36 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7433481697) Found a submit site that's easy to miss: mapped_at() in crates/victory-gpu/src/host.rs (~lines 338–400). Every time new card memory is made it executes a single pre-recorded COPY list (Aside.list) on its own copy queue (a.queue, not host.queue), then signals a.fence. The lock is only held to send (the comment says the wait under the lock was removed on purpose), and nothing waits for that list's previous execution before running it again. Two threads making memory at once (streaming into a new area) re-execute the same list while the previous run is still pending, which is exactly id 553, with the same list pointer every time and outside both queue shims and the host submit sites. Quick confirmation: run with VICTORY_WAIT_RESIDENT=0 (skips that path entirely). If the 45 s crash is gone, that's it. Note the comment there says a run was once lost without it, so it's a test, not a fix. A real fix would be to keep a small ring of identical copy lists (like host/awake.rs does with two) and wait on the fence only when the slot about to be reused hasn't completed yet, or wait for a.value before re-executing.
Author
Owner

@⁠scarlett7023 on GitHub · 2026-12-05 07:17 UTC · original

Tested that lead two ways, and it does not hold up -- but the pattern I get is now narrower, which may be useful.

1. VICTORY_WAIT_RESIDENT=0 still fails. 42 s in, frame 1125, same a host command list did not close (0x80004005) / ExecuteCommandLists rejection, same message as before. So skipping the resident path entirely does not avoid it.

2. The resident copy list is not the list the layer names. I instrumented the mapped_at() submission itself (a.queue.ExecuteCommandLists(&[Some(a.list.clone())])) to print the pointer of every submission: 734 aside submissions in the run, and the pointer from the debug layer message (0x218D0D589C0) appears 0 times among them. It also appears 0 times across the host submit sites and both queue shims.

3. The timing detail that may matter. Every failure I have logged so far happens on the start/loading screen -- we have never once reached the first playable frame. What varies between runs is how many frames / how many first-bind pipelines have gone by, not the wall clock: it dies somewhere in the first ~1.1k-2.4k frames, always right at a burst of first-bind pipelines.

When I made the breadcrumbs log every submission instead of only anomalies (35,248 submission lines over the same 150 s instead of ~1k), the failure moved from 45 s to no failure at all in 150 s / 4,096 frames. That smells like a race whose window closes when submission is slowed down, rather than a single bad call site.

Question: given that it only appears during the start screen's first-bind storm and disappears when submissions are serialised by logging, would you still suspect the aside/resident path (just needing a different interleaving), or does that point at the prelude/first-frame path (prelude, make_prelude, the check pool) instead? If you can tell me which of those two to instrument without perturbing timing (I was going to use atomics only, no logging, to avoid changing the schedule), I will run that next.

**@⁠scarlett7023** on GitHub · 2026-12-05 07:17 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7434026755) Tested that lead two ways, and it does not hold up -- but the pattern I get is now narrower, which may be useful. **1. `VICTORY_WAIT_RESIDENT=0` still fails.** 42 s in, frame 1125, same `a host command list did not close (0x80004005)` / `ExecuteCommandLists` rejection, same message as before. So skipping the resident path entirely does not avoid it. **2. The resident copy list is not the list the layer names.** I instrumented the `mapped_at()` submission itself (`a.queue.ExecuteCommandLists(&[Some(a.list.clone())])`) to print the pointer of *every* submission: 734 aside submissions in the run, and the pointer from the debug layer message (`0x218D0D589C0`) appears **0** times among them. It also appears 0 times across the host submit sites and both queue shims. **3. The timing detail that may matter.** Every failure I have logged so far happens on the **start/loading screen -- we have never once reached the first playable frame**. What varies between runs is how many frames / how many first-bind pipelines have gone by, not the wall clock: it dies somewhere in the first ~1.1k-2.4k frames, always right at a burst of first-bind pipelines. When I made the breadcrumbs log *every* submission instead of only anomalies (35,248 submission lines over the same 150 s instead of ~1k), the failure moved from 45 s to **no failure at all in 150 s / 4,096 frames**. That smells like a race whose window closes when submission is slowed down, rather than a single bad call site. Question: given that it only appears during the start screen's first-bind storm and disappears when submissions are serialised by logging, would you still suspect the aside/resident path (just needing a different interleaving), or does that point at the prelude/first-frame path (`prelude`, `make_prelude`, the check pool) instead? If you can tell me which of those two to instrument without perturbing timing (I was going to use atomics only, no logging, to avoid changing the schedule), I will run that next.
Author
Owner

@⁠YamoriCou on GitHub · 2026-12-05 08:24 UTC · original

Thanks, that rules the aside path out cleanly (and my lead was wrong). The fact that full logging makes it vanish fits a race, so I'd avoid anything at submit time.

I'd instrument neither of those two: the prelude/check-pool lists go through the host submit sites you already logged, so a pointer that never appears there is probably from one of the other ~25 CreateCommandList sites in victory-gpu that submit on their own queues: texture/ahead.rs, host/upq.rs, descriptor/host.rs (two), tiles.rs, inplace.rs, memory.rs, indirect.rs, list/groups.rs, host/preludes.rs, host/joints.rs, host/awake.rs, plus the four in host.rs. (host/stamps.rs and host/spans.rs are diagnostics-only, and the release build fails too, so probably not those.)

Zero-perturbation idea: call SetName on every command list right after CreateCommandList, with its site (e.g. "upq slot 3", "texture ahead"). That's a one-time cost at creation, nothing at submit, and the debug layer normally prints the object's name next to the pointer in its messages, so the 553 message should name its own source. If the name doesn't show, an atomic table of (pointer → site id) filled at creation does the same and can be dumped from the failure path.

**@⁠YamoriCou** on GitHub · 2026-12-05 08:24 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7434862096) Thanks, that rules the aside path out cleanly (and my lead was wrong). The fact that full logging makes it vanish fits a race, so I'd avoid anything at submit time. I'd instrument neither of those two: the prelude/check-pool lists go through the host submit sites you already logged, so a pointer that never appears there is probably from one of the other ~25 CreateCommandList sites in victory-gpu that submit on their own queues: texture/ahead.rs, host/upq.rs, descriptor/host.rs (two), tiles.rs, inplace.rs, memory.rs, indirect.rs, list/groups.rs, host/preludes.rs, host/joints.rs, host/awake.rs, plus the four in host.rs. (host/stamps.rs and host/spans.rs are diagnostics-only, and the release build fails too, so probably not those.) Zero-perturbation idea: call SetName on every command list right after CreateCommandList, with its site (e.g. "upq slot 3", "texture ahead"). That's a one-time cost at creation, nothing at submit, and the debug layer normally prints the object's name next to the pointer in its messages, so the 553 message should name its own source. If the name doesn't show, an atomic table of (pointer → site id) filled at creation does the same and can be dumped from the failure path.
Author
Owner

@⁠scarlett7023 on GitHub · 2026-12-05 10:43 UTC · original

Thanks for the SetName pointer — it found it. Reporting back from a Windows 11 23H2 + RX 7900 XT (19.6 GB) machine, because your original hunch in this PR was right after all: the list that keeps failing IS the resident aside copy list.

How we got there:

  • Pre-warmed everything first (88,559 pipelines via victory.exe warm) so nothing was compiled at runtime, then reproduced the crash in ~40 s at the title screen.
  • Added SetName right after every CreateCommandList (host lists, texture-ahead, upq slots, replay/merge). Names only appear when DRED is on, so we ran with VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=faults.
  • The debug layer then named it: 'aside copy (debug layer indirect)' — mapped_at()'s resident copy list re-executed on the copy queue before its previous flight had landed.

Three changes made this build run with no environment variables at all:

  1. mapped_at(): before re-submitting the aside list, wait for the previous flight — if a.value > 0 && a.fence.GetCompletedValue() < a.value { a.fence.SetEventOnCompletion(a.value, None)?; }. After this, "fence has not advanced" is 0.
  2. Next failure was ID3D12CommandList::Barrier: Enhanced barriers are not supported on the current device (id=1343): Rec::new QI'd ID3D12GraphicsCommandList7 unconditionally, while the device reports OPTIONS12.EnhancedBarriersSupported = false here. Falling back to legacy barriers fixed it.
  3. The very first failure on launch was CreateShaderResourceView: Format (0x43, R9G9B9E5_SHAREDEXP) is invalid ... Resource (0x2a, R32_UINT) from the zero-copy alias path — so we defaulted VICTORY_DIRECT_ALIAS to off (opt-in with =1). That one alone is enough to make a double-clicked launch die with 0x887A0005 instantly.

Result: with those patches, no env vars, 0 ERROR lines, no device removal, 12 fps at 3840x2160 native, and it stays up. Separate observation from the same machine: with the official v0.5.0 binary after the full warm, a 30-minute session was playable (still ~12 fps) — so the warm step is doing a lot of work too.

Two small wishes from a very grateful user (Chinese player, 7900 XT): a Chinese language option in the launcher would help a lot of people here, and of course we are all hoping the next build gets us to a smoother framerate. Happy to send the patch as a PR if you'd like it.

Thanks again for the pointer, and for the project itself — genuinely impressive work. Good luck with the next release.

**@⁠scarlett7023** on GitHub · 2026-12-05 10:43 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7436653115) Thanks for the SetName pointer — it found it. Reporting back from a Windows 11 23H2 + RX 7900 XT (19.6 GB) machine, because your original hunch in this PR was right after all: the list that keeps failing IS the resident aside copy list. How we got there: - Pre-warmed everything first (88,559 pipelines via `victory.exe warm`) so nothing was compiled at runtime, then reproduced the crash in ~40 s at the title screen. - Added `SetName` right after every `CreateCommandList` (host lists, texture-ahead, upq slots, replay/merge). Names only appear when DRED is on, so we ran with `VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=faults`. - The debug layer then named it: `'aside copy (debug layer indirect)'` — mapped_at()'s resident copy list re-executed on the copy queue before its previous flight had landed. Three changes made this build run with no environment variables at all: 1. `mapped_at()`: before re-submitting the aside list, wait for the previous flight — `if a.value > 0 && a.fence.GetCompletedValue() < a.value { a.fence.SetEventOnCompletion(a.value, None)?; }`. After this, "fence has not advanced" is 0. 2. Next failure was `ID3D12CommandList::Barrier: Enhanced barriers are not supported on the current device (id=1343)`: `Rec::new` QI'd `ID3D12GraphicsCommandList7` unconditionally, while the device reports `OPTIONS12.EnhancedBarriersSupported = false` here. Falling back to legacy barriers fixed it. 3. The very first failure on launch was `CreateShaderResourceView: Format (0x43, R9G9B9E5_SHAREDEXP) is invalid ... Resource (0x2a, R32_UINT)` from the zero-copy alias path — so we defaulted `VICTORY_DIRECT_ALIAS` to off (opt-in with =1). That one alone is enough to make a double-clicked launch die with 0x887A0005 instantly. Result: with those patches, no env vars, 0 ERROR lines, no device removal, 12 fps at 3840x2160 native, and it stays up. Separate observation from the same machine: with the official v0.5.0 binary after the full warm, a 30-minute session was playable (still ~12 fps) — so the warm step is doing a lot of work too. Two small wishes from a very grateful user (Chinese player, 7900 XT): a Chinese language option in the launcher would help a lot of people here, and of course we are all hoping the next build gets us to a smoother framerate. Happy to send the patch as a PR if you'd like it. Thanks again for the pointer, and for the project itself — genuinely impressive work. Good luck with the next release.
Author
Owner

@⁠scarlett7023 on GitHub · 2026-12-05 10:43 UTC · original

Thanks for the SetName pointer — it found it. Reporting back from a Windows 11 23H2 + RX 7900 XT (19.6 GB) machine, because your original hunch in this PR was right after all: the list that keeps failing IS the resident aside copy list.

How we got there:

  • Pre-warmed everything first (88,559 pipelines via victory.exe warm) so nothing was compiled at runtime, then reproduced the crash in ~40 s at the title screen.
  • Added SetName right after every CreateCommandList (host lists, texture-ahead, upq slots, replay/merge). Names only appear when DRED is on, so we ran with VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=faults.
  • The debug layer then named it: 'aside copy (debug layer indirect)' — mapped_at()'s resident copy list re-executed on the copy queue before its previous flight had landed.

Three changes made this build run with no environment variables at all:

  1. mapped_at(): before re-submitting the aside list, wait for the previous flight — if a.value > 0 && a.fence.GetCompletedValue() < a.value { a.fence.SetEventOnCompletion(a.value, None)?; }. After this, "fence has not advanced" is 0.
  2. Next failure was ID3D12CommandList::Barrier: Enhanced barriers are not supported on the current device (id=1343): Rec::new QI'd ID3D12GraphicsCommandList7 unconditionally, while the device reports OPTIONS12.EnhancedBarriersSupported = false here. Falling back to legacy barriers fixed it.
  3. The very first failure on launch was CreateShaderResourceView: Format (0x43, R9G9B9E5_SHAREDEXP) is invalid ... Resource (0x2a, R32_UINT) from the zero-copy alias path — so we defaulted VICTORY_DIRECT_ALIAS to off (opt-in with =1). That one alone is enough to make a double-clicked launch die with 0x887A0005 instantly.

Result: with those patches, no env vars, 0 ERROR lines, no device removal, 12 fps at 3840x2160 native, and it stays up. Separate observation from the same machine: with the official v0.5.0 binary after the full warm, a 30-minute session was playable (still ~12 fps) — so the warm step is doing a lot of work too.

Two small wishes from a very grateful user (Chinese player, 7900 XT): a Chinese language option in the launcher would help a lot of people here, and of course we are all hoping the next build gets us to a smoother framerate. Happy to send the patch as a PR if you'd like it.

Thanks again for the pointer, and for the project itself — genuinely impressive work. Good luck with the next release.

**@⁠scarlett7023** on GitHub · 2026-12-05 10:43 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7436660690) Thanks for the SetName pointer — it found it. Reporting back from a Windows 11 23H2 + RX 7900 XT (19.6 GB) machine, because your original hunch in this PR was right after all: the list that keeps failing IS the resident aside copy list. How we got there: - Pre-warmed everything first (88,559 pipelines via `victory.exe warm`) so nothing was compiled at runtime, then reproduced the crash in ~40 s at the title screen. - Added `SetName` right after every `CreateCommandList` (host lists, texture-ahead, upq slots, replay/merge). Names only appear when DRED is on, so we ran with `VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=faults`. - The debug layer then named it: `'aside copy (debug layer indirect)'` — mapped_at()'s resident copy list re-executed on the copy queue before its previous flight had landed. Three changes made this build run with no environment variables at all: 1. `mapped_at()`: before re-submitting the aside list, wait for the previous flight — `if a.value > 0 && a.fence.GetCompletedValue() < a.value { a.fence.SetEventOnCompletion(a.value, None)?; }`. After this, "fence has not advanced" is 0. 2. Next failure was `ID3D12CommandList::Barrier: Enhanced barriers are not supported on the current device (id=1343)`: `Rec::new` QI'd `ID3D12GraphicsCommandList7` unconditionally, while the device reports `OPTIONS12.EnhancedBarriersSupported = false` here. Falling back to legacy barriers fixed it. 3. The very first failure on launch was `CreateShaderResourceView: Format (0x43, R9G9B9E5_SHAREDEXP) is invalid ... Resource (0x2a, R32_UINT)` from the zero-copy alias path — so we defaulted `VICTORY_DIRECT_ALIAS` to off (opt-in with =1). That one alone is enough to make a double-clicked launch die with 0x887A0005 instantly. Result: with those patches, no env vars, 0 ERROR lines, no device removal, 12 fps at 3840x2160 native, and it stays up. Separate observation from the same machine: with the official v0.5.0 binary after the full warm, a 30-minute session was playable (still ~12 fps) — so the warm step is doing a lot of work too. Two small wishes from a very grateful user (Chinese player, 7900 XT): a Chinese language option in the launcher would help a lot of people here, and of course we are all hoping the next build gets us to a smoother framerate. Happy to send the patch as a PR if you'd like it. Thanks again for the pointer, and for the project itself — genuinely impressive work. Good luck with the next release.
github manually merged commit f3cad1a266 into main 2026-12-05 17:43:42 +00:00
Author
Owner

@⁠YamoriCou on GitHub · 2026-12-05 20:37 UTC · original · edited 2026-12-05 20:38 UTC

Update from the RX 6800 XT side: I applied your aside fix (waiting for the previous flight in mapped_at()) to v0.6.0, which already includes this PR's split fix, and left the defaults on, including VICTORY_JOIN_SEND=1 and VICTORY_JOIN_PARTS=8, which used to crash my card within seconds with id 553. Result: 34+ minutes, no errors, ~27.6 fps average. So your fix seems to cover the JOIN crashes on RDNA 2 too. 🙂 Are you planning to open a PR with your three fixes? Happy to test it.

(Side note, in case it helps Chinese players until the launcher gets a language option: the game's own menus and subtitles can already be switched under Settings → UI → Language, including Chinese, and it works fine under ReVIctory.)

**@⁠YamoriCou** on GitHub · 2026-12-05 20:37 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7444974728) · edited 2026-12-05 20:38 UTC Update from the RX 6800 XT side: I applied your aside fix (waiting for the previous flight in mapped_at()) to v0.6.0, which already includes this PR's split fix, and left the defaults on, including VICTORY_JOIN_SEND=1 and VICTORY_JOIN_PARTS=8, which used to crash my card within seconds with id 553. Result: 34+ minutes, no errors, ~27.6 fps average. So your fix seems to cover the JOIN crashes on RDNA 2 too. 🙂 Are you planning to open a PR with your three fixes? Happy to test it. (Side note, in case it helps Chinese players until the launcher gets a language option: the game's own menus and subtitles can already be switched under Settings → UI → Language, including Chinese, and it works fine under ReVIctory.)
Author
Owner

@⁠scarlett7023 on GitHub · 2026-12-05 20:52 UTC · original

That's great news — thanks for testing it on RDNA 2, and especially for trying it with VICTORY_JOIN_SEND=1 VICTORY_JOIN_PARTS=8 left on. That fits: the JOIN paths end up re-executing the same resident copy list from two threads, so one wait in mapped_at() covers them all. 34+ minutes at ~27.6 fps sounds like a real fix rather than a lucky run.

Yes, I'm going to open a PR — but since you offered to test, here are the three changes up front so you don't have to wait for me to get the branch/format right. All three are small; the third is the one that matters for a double-clicked launch.

  1. crates/victory-gpu/src/resource.rs — the zero-copy alias is what kills a plain launch with 0x887A0005 (CreateShaderResourceView: Format (0x43, R9G9B9E5_SHAREDEXP) is invalid ... Resource (0x2a, R32_UINT)). Default it off, opt in with =1:
- if std::env::var_os("VICTORY_DIRECT_ALIAS").is_some_and(|v| v == "0") {
+ if !std::env::var_os("VICTORY_DIRECT_ALIAS").is_some_and(|v| v == "1") {
      return false;
  }
  1. crates/victory-gpu/src/host.rs, in mapped_at() right before the aside list is submitted on the copy queue — wait for the previous flight (this is the one that names as "aside copy" under DRED):
if a.value > 0 && a.fence.GetCompletedValue() < a.value {
    a.fence.SetEventOnCompletion(a.value, windows::Win32::Foundation::HANDLE::default())?;
}
  1. crates/victory-gpu/src/host/rec.rs — Rec::new QIs ID3D12GraphicsCommandList7 unconditionally, but on this machine D3D12_OPTIONS12.EnhancedBarriersSupported is false, so the first list7.Barrier(...) dies with Enhanced barriers are not supported on the current device (id=1343). Ideally gate the QI on the feature flag; my quick test just hardcoded it off:
let list7: Option<ID3D12GraphicsCommandList7> = if enhanced_barriers_supported() {
    windows::core::Interface::cast::<ID3D12GraphicsCommandList7>(&list).ok()
} else {
    None
};

With those three, a plain double-clicked launch (no env vars at all) runs with 0 ERROR lines and no device removal here; 3840x2160 native is GPU-bound at ~12 fps on a 7900 XT, which matches what we see from the official binary once the pipeline warm is done, so framerate-wise nothing regressed.

Thanks also for the Settings -> UI -> Language tip — I'll pass that on; it solves the immediate problem for Chinese players much better than waiting for launcher localization.

If it helps, I can also send the exact diff/binary rather than a PR; whichever is easier for you to review. Thanks again for the quick turnaround on v0.6.0.

**@⁠scarlett7023** on GitHub · 2026-12-05 20:52 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7445181877) That's great news — thanks for testing it on RDNA 2, and especially for trying it with `VICTORY_JOIN_SEND=1 VICTORY_JOIN_PARTS=8` left on. That fits: the JOIN paths end up re-executing the same resident copy list from two threads, so one wait in `mapped_at()` covers them all. 34+ minutes at ~27.6 fps sounds like a real fix rather than a lucky run. Yes, I'm going to open a PR — but since you offered to test, here are the three changes up front so you don't have to wait for me to get the branch/format right. All three are small; the third is the one that matters for a double-clicked launch. 1. `crates/victory-gpu/src/resource.rs` — the zero-copy alias is what kills a plain launch with `0x887A0005` (`CreateShaderResourceView: Format (0x43, R9G9B9E5_SHAREDEXP) is invalid ... Resource (0x2a, R32_UINT)`). Default it off, opt in with `=1`: ```rust - if std::env::var_os("VICTORY_DIRECT_ALIAS").is_some_and(|v| v == "0") { + if !std::env::var_os("VICTORY_DIRECT_ALIAS").is_some_and(|v| v == "1") { return false; } ``` 2. `crates/victory-gpu/src/host.rs`, in `mapped_at()` right before the aside list is submitted on the copy queue — wait for the previous flight (this is the one that names as "aside copy" under DRED): ```rust if a.value > 0 && a.fence.GetCompletedValue() < a.value { a.fence.SetEventOnCompletion(a.value, windows::Win32::Foundation::HANDLE::default())?; } ``` 3. `crates/victory-gpu/src/host/rec.rs` — `Rec::new` QIs `ID3D12GraphicsCommandList7` unconditionally, but on this machine `D3D12_OPTIONS12.EnhancedBarriersSupported` is false, so the first `list7.Barrier(...)` dies with `Enhanced barriers are not supported on the current device (id=1343)`. Ideally gate the QI on the feature flag; my quick test just hardcoded it off: ```rust let list7: Option<ID3D12GraphicsCommandList7> = if enhanced_barriers_supported() { windows::core::Interface::cast::<ID3D12GraphicsCommandList7>(&list).ok() } else { None }; ``` With those three, a plain double-clicked launch (no env vars at all) runs with 0 ERROR lines and no device removal here; 3840x2160 native is GPU-bound at ~12 fps on a 7900 XT, which matches what we see from the official binary once the pipeline warm is done, so framerate-wise nothing regressed. Thanks also for the Settings -> UI -> Language tip — I'll pass that on; it solves the immediate problem for Chinese players much better than waiting for launcher localization. If it helps, I can also send the exact diff/binary rather than a PR; whichever is easier for you to review. Thanks again for the quick turnaround on v0.6.0.
Author
Owner

@⁠scarlett7023 on GitHub · 2026-12-05 21:06 UTC · original

Opened it as a PR here: #176 - three commits worth of context and test notes are in the description. @⁠YamoriCou already ran the mapped_at() wait against v0.6.0 on RDNA 2 with the JOIN defaults left on (34+ minutes, no errors, ~27.6 fps), so the JOIN crashes should be covered too.

**@⁠scarlett7023** on GitHub · 2026-12-05 21:06 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/52#issuecomment-7445368685) Opened it as a PR here: #176 - three commits worth of context and test notes are in the description. @⁠YamoriCou already ran the `mapped_at()` wait against v0.6.0 on RDNA 2 with the JOIN defaults left on (34+ minutes, no errors, ~27.6 fps), so the JOIN crashes should be covered too.
This discussion has been locked. Commenting is limited to contributors.
No description provided.