Windows 10: boot dies with 0xC0000005 at victory-image+0xb5a5f8 — inbox d3d12.dll rejects root signature 1.1 flags (0x80070057) #3530

Open
opened 2026-11-27 15:01:38 +00:00 by github-bot · 0 comments
Owner

@⁠NyaNyaHua4290 on GitHub · 2026-11-27 14:50 UTC · original

Windows 10: boot dies with 0xC0000005 at victory-image+0xb5a5f8 — the inbox d3d12.dll rejects our root signature 1.1 flags (0x80070057)

TL;DR

On Windows 10 the title boots, renders the first-boot screens for about a second, then faults in title code at
victory-image-<hash>.dll+0xb5a5f8 (read 0x68, i.e. a null dereference). The cause is upstream of the title: the
layer builds root signatures with the root-signature-1.1 flags below, Windows 10's inbox d3d12.dll answers
E_INVALIDARG
, six pipelines fail to create, and the title dereferences a pipeline object that was never made.

Shipping the D3D12 Agility SDK (D3D12Core.dll + the two exports) fixes it completely. Nothing else changed.

Environment

OS Windows 10 Pro 22H2, build 19045.6466
CPU Intel Core i7-11800H (8C/16T, AVX2)
RAM 32 GB
GPU NVIDIA GeForce RTX 3060 Laptop, 6 GiB, driver 621.24
Title Xbox Series build v1.0.2.1, game_scarlett_master.exe, 120,181,760 bytes
Title hashes blake3 b99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93 (matches KnownBuild in crates/victory-game/src/lib.rs), sha256 e95020b2fa4a721db3df59fdecf75621730ac559d8835252f6c3b658d5a08993

Reproduced on three trees, all at the same title RVA:

Tree Commit
Marvisak/VIctory 63bcca43c6a00a758510398fa43096ce7e4f7df0
whiteh4cker-tr/VIctory_sm86 b079c378c5556b5eefc03acd92f49b570aeee0ae
Yaekai/victory-scarlett-3070 b4e351c

Symptom

$env:VICTORY_HOST_WAVE = '32'
target\release\victory.exe run "<dump>\game_scarlett_master.exe" --console series-x --execute

Boot/legal/language screens present (~256 frames), then:

WARN victory_gpu::pipeline::host: root signature: Unsupported bit-flag set (root signature ...)
WARN victory_gpu::pipeline::host: host root signature refused error=参数错误。 (0x80070057) shaders=[...]

VIctory: first-chance exception 0xc0000005 at victory-image-b99f876b74d4a77f.dll+0xb5a5f8
         (read 0x68: nothing mapped there)
  rax 0x0  rbx 0x3  rcx 0x0  rdx 0x0
  #0 victory-image-...dll+0xb5a5f8
  #1 victory-image-...dll+0x5bb7cce
  #2 victory-image-...dll+0x1dbdc0b
  ...
  #9 KERNEL32.DLL+0x17374   #10 ntdll.dll+0x4cc91
exit code -1073741819

root signature: Unsupported bit-flag set and host root signature refused appear 470 times in one boot
(once per pipeline the layer tries to make), so essentially every pipeline of the first frame fails.

Why

crates/victory-gpu/src/pipeline/host.rs builds a versioned root signature (1.1) with:

D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED
D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED

Those flags (with D3D12_ROOT_SIGNATURE_DESC1 and Shader Model 6.6) are only understood by a D3D12 runtime that
ships them. The log names the exact combination:

WARN victory_gpu::pipeline::host: root signature: Unsupported bit-flag set (root signature flags c01).

0xC01 = ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT (0x1) | CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED (0x200) |
SAMPLER_HEAP_DIRECTLY_INDEXED (0x800) — the two directly-indexed flags are precisely the ones Windows 10 lacks,
and the layer's own "unsupported bit-flag" warning fires on the same values.

Windows 11's inbox d3d12.dll does; Windows 10's does not — it returns E_INVALIDARG (0x80070057), exactly what the log says. With Agility SDK present the same root signatures are accepted, which
is why the same build runs on Windows 11.

Fix: ship the Agility SDK

The Windows D3D12 loader looks for D3D12SDKVersion and D3D12SDKPath in the main executable's export
table
; when it finds them it loads D3D12Core.dll from that folder instead of the inbox runtime.

1. apps/victory/src/sdk.rs (new)

//! D3D12 Agility SDK handshake (needed on Windows 10, harmless on 11).

static SDK_PATH: [u8; 9] = *b".\\D3D12\\\0";

#[repr(transparent)]
pub struct SdkPath(*const u8);

// SAFETY: the pointer never changes and points into a `'static` array.
unsafe impl Sync for SdkPath {}

/// Agility SDK package `1.620.2` -> `620`.
#[used]
#[unsafe(no_mangle)]   // plain `#[no_mangle]` on editions 2024 / Rust >= 1.82
pub static D3D12SDKVersion: u32 = 620;

#[used]
#[unsafe(no_mangle)]
pub static D3D12SDKPath: SdkPath = SdkPath(core::ptr::addr_of!(SDK_PATH).cast());

2. apps/victory/build.rs (new)

fn main() {
    if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows") {
        println!("cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKVersion,DATA");
        println!("cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKPath,DATA");
    }
}

3. apps/victory/src/main.rs

#[cfg(windows)]
mod sdk;

4. D3D12Core.dll beside victory.exe

curl.exe -L -o d3d12.nupkg https://api.nuget.org/v3-flatcontainer/microsoft.direct3d.d3d12/1.620.2/microsoft.direct3d.d3d12.1.620.2.nupkg
7z x d3d12.nupkg -oD:\sdk\d3d12-agility
mkdir target\release\D3D12
copy D:\sdk\d3d12-agility\build\native\bin\x64\D3D12Core.dll target\release\D3D12\

Check with dumpbin /exports target\release\victory.exe — both D3D12SDKPath and D3D12SDKVersion must be
listed.

Result

before after
root signature refused 470 0
Unsupported bit-flag set 470 0
Boot 0xC0000005 after ~1 s runs

With the fix (plus a victory.exe warm pass) the title runs at 20–24 fps at 2,000–3,000 draws on this machine
(RTX 3060 Laptop 6 GiB, Series S profile, DLSS performance), 10–13 fps at 5,500+ draws (prison).

Notes / questions

  1. A cargo xtask agility task that fetches the package (the way rorodev6/Neptune forks do it) would make
    this a one-liner for users; I am happy to send a PR with the three files above if you want it.
  2. On the same machine, VICTORY_FRAMEGEN through dlssg_for_sm86 on Ampere is a net loss: rendered frame
    time goes from ~45 ms to ~280 ms, presented fps 6–7 vs 11–13 without it. So FG is not a workaround for
    6 GiB cards — worth a note in the docs.
  3. VICTORY_TEXTURE_ROOM_PERCENT=94 fills the card to 5.8/6 GiB and the session spends 25.9 s in 93,400
    "wait for card memory to be mapped" waits; dropping it to 78–80 helped here.

Log excerpt (reproduced on the unpatched build)

crashes.log (one record; there is a second from a worker thread with the same +0xb5a5f8):

unix time 1795790931, process 808
VIctory: unhandled exception 0xc0000005 at victory-image-b99f876b74d4a77f.dll+0xb5a5f8 (read 0x68: nothing mapped there)
  rax 0x0 rbx 0x3 rcx 0x0 rdx 0x0 rsi 0x92bf8feba8 rdi 0x92bf8fec50 rsp 0x92bf8feae0 rbp 0x13f
  #0  victory-image-b99f876b74d4a77f.dll+0xb5a5f8
  #1  victory-image-b99f876b74d4a77f.dll+0x5bb7cce
  #2  victory-image-b99f876b74d4a77f.dll+0x1dbdc0b
  #3  victory-image-b99f876b74d4a77f.dll+0x5bb7111
  #4  victory-image-b99f876b74d4a77f.dll+0x5bb7071
  #5  victory-image-b99f876b74d4a77f.dll+0x63e78
  #6  victory-image-b99f876b74d4a77f.dll+0x4eaa05a
  #7  victory-image-b99f876b74d4a77f.dll+0x221c29c
  #8  victory-image-b99f876b74d4a77f.dll+0x2215eca
  #9  KERNEL32.DLL+0x17374
  #10 ntdll.dll+0x4cc91

Layer log, the same boot (470 of each line):

WARN victory_gpu::pipeline::host: root signature: Unsupported bit-flag set (root signature flags c01).
WARN victory_gpu::pipeline::host: host root signature refused error=参数错误。 (0x80070057) shaders=[vertex dfafaf385b2f94e8, pixel 06295fb1d1aefb78]

crashes.log

**@⁠NyaNyaHua4290** on GitHub · 2026-11-27 14:50 UTC · [original](https://github.com/Marvisak/VIctory/issues/3530) # Windows 10: boot dies with `0xC0000005` at `victory-image+0xb5a5f8` — the inbox `d3d12.dll` rejects our root signature 1.1 flags (`0x80070057`) ## TL;DR On **Windows 10** the title boots, renders the first-boot screens for about a second, then faults in title code at `victory-image-<hash>.dll+0xb5a5f8` (`read 0x68`, i.e. a null dereference). The cause is upstream of the title: the layer builds root signatures with the root-signature-1.1 flags below, **Windows 10's inbox `d3d12.dll` answers `E_INVALIDARG`**, six pipelines fail to create, and the title dereferences a pipeline object that was never made. Shipping the **D3D12 Agility SDK** (`D3D12Core.dll` + the two exports) fixes it completely. Nothing else changed. ## Environment | | | |---|---| | OS | Windows 10 Pro 22H2, build **19045.6466** | | CPU | Intel Core i7-11800H (8C/16T, AVX2) | | RAM | 32 GB | | GPU | NVIDIA GeForce RTX 3060 Laptop, 6 GiB, driver **621.24** | | Title | Xbox Series build v1.0.2.1, `game_scarlett_master.exe`, 120,181,760 bytes | | Title hashes | blake3 `b99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93` (matches `KnownBuild` in `crates/victory-game/src/lib.rs`), sha256 `e95020b2fa4a721db3df59fdecf75621730ac559d8835252f6c3b658d5a08993` | Reproduced on three trees, all at the same title RVA: | Tree | Commit | |---|---| | `Marvisak/VIctory` | `63bcca43c6a00a758510398fa43096ce7e4f7df0` | | `whiteh4cker-tr/VIctory_sm86` | `b079c378c5556b5eefc03acd92f49b570aeee0ae` | | `Yaekai/victory-scarlett-3070` | `b4e351c` | ## Symptom ```powershell $env:VICTORY_HOST_WAVE = '32' target\release\victory.exe run "<dump>\game_scarlett_master.exe" --console series-x --execute ``` Boot/legal/language screens present (~256 frames), then: ``` WARN victory_gpu::pipeline::host: root signature: Unsupported bit-flag set (root signature ...) WARN victory_gpu::pipeline::host: host root signature refused error=参数错误。 (0x80070057) shaders=[...] VIctory: first-chance exception 0xc0000005 at victory-image-b99f876b74d4a77f.dll+0xb5a5f8 (read 0x68: nothing mapped there) rax 0x0 rbx 0x3 rcx 0x0 rdx 0x0 #0 victory-image-...dll+0xb5a5f8 #1 victory-image-...dll+0x5bb7cce #2 victory-image-...dll+0x1dbdc0b ... #9 KERNEL32.DLL+0x17374 #10 ntdll.dll+0x4cc91 exit code -1073741819 ``` `root signature: Unsupported bit-flag set` and `host root signature refused` appear **470 times in one boot** (once per pipeline the layer tries to make), so essentially every pipeline of the first frame fails. ## Why `crates/victory-gpu/src/pipeline/host.rs` builds a versioned root signature (1.1) with: ```rust D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED ``` Those flags (with `D3D12_ROOT_SIGNATURE_DESC1` and Shader Model 6.6) are only understood by a D3D12 runtime that ships them. The log names the exact combination: ``` WARN victory_gpu::pipeline::host: root signature: Unsupported bit-flag set (root signature flags c01). ``` `0xC01` = `ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT (0x1)` | `CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED (0x200)` | `SAMPLER_HEAP_DIRECTLY_INDEXED (0x800)` — the two directly-indexed flags are precisely the ones Windows 10 lacks, and the layer's own "unsupported bit-flag" warning fires on the same values. **Windows 11's inbox `d3d12.dll` does; Windows 10's does not** — it returns `E_INVALIDARG (0x80070057)`, exactly what the log says. With Agility SDK present the same root signatures are accepted, which is why the same build runs on Windows 11. ## Fix: ship the Agility SDK The Windows D3D12 loader looks for `D3D12SDKVersion` and `D3D12SDKPath` in the **main executable's export table**; when it finds them it loads `D3D12Core.dll` from that folder instead of the inbox runtime. ### 1. `apps/victory/src/sdk.rs` (new) ```rust //! D3D12 Agility SDK handshake (needed on Windows 10, harmless on 11). static SDK_PATH: [u8; 9] = *b".\\D3D12\\\0"; #[repr(transparent)] pub struct SdkPath(*const u8); // SAFETY: the pointer never changes and points into a `'static` array. unsafe impl Sync for SdkPath {} /// Agility SDK package `1.620.2` -> `620`. #[used] #[unsafe(no_mangle)] // plain `#[no_mangle]` on editions 2024 / Rust >= 1.82 pub static D3D12SDKVersion: u32 = 620; #[used] #[unsafe(no_mangle)] pub static D3D12SDKPath: SdkPath = SdkPath(core::ptr::addr_of!(SDK_PATH).cast()); ``` ### 2. `apps/victory/build.rs` (new) ```rust fn main() { if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows") { println!("cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKVersion,DATA"); println!("cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKPath,DATA"); } } ``` ### 3. `apps/victory/src/main.rs` ```rust #[cfg(windows)] mod sdk; ``` ### 4. `D3D12Core.dll` beside `victory.exe` ```powershell curl.exe -L -o d3d12.nupkg https://api.nuget.org/v3-flatcontainer/microsoft.direct3d.d3d12/1.620.2/microsoft.direct3d.d3d12.1.620.2.nupkg 7z x d3d12.nupkg -oD:\sdk\d3d12-agility mkdir target\release\D3D12 copy D:\sdk\d3d12-agility\build\native\bin\x64\D3D12Core.dll target\release\D3D12\ ``` Check with `dumpbin /exports target\release\victory.exe` — both `D3D12SDKPath` and `D3D12SDKVersion` must be listed. ## Result | | before | after | |---|---|---| | `root signature refused` | **470** | **0** | | `Unsupported bit-flag set` | **470** | **0** | | Boot | `0xC0000005` after ~1 s | **runs** | With the fix (plus a `victory.exe warm` pass) the title runs at 20–24 fps at 2,000–3,000 draws on this machine (RTX 3060 Laptop 6 GiB, Series S profile, DLSS performance), 10–13 fps at 5,500+ draws (prison). ## Notes / questions 1. A `cargo xtask agility` task that fetches the package (the way `rorodev6`/Neptune forks do it) would make this a one-liner for users; I am happy to send a PR with the three files above if you want it. 2. On the same machine, `VICTORY_FRAMEGEN` through `dlssg_for_sm86` on Ampere is a **net loss**: rendered frame time goes from ~45 ms to ~280 ms, presented fps 6–7 vs 11–13 without it. So FG is not a workaround for 6 GiB cards — worth a note in the docs. 3. `VICTORY_TEXTURE_ROOM_PERCENT=94` fills the card to 5.8/6 GiB and the session spends 25.9 s in 93,400 "wait for card memory to be mapped" waits; dropping it to 78–80 helped here. ## Log excerpt (reproduced on the unpatched build) `crashes.log` (one record; there is a second from a worker thread with the same `+0xb5a5f8`): ``` unix time 1795790931, process 808 VIctory: unhandled exception 0xc0000005 at victory-image-b99f876b74d4a77f.dll+0xb5a5f8 (read 0x68: nothing mapped there) rax 0x0 rbx 0x3 rcx 0x0 rdx 0x0 rsi 0x92bf8feba8 rdi 0x92bf8fec50 rsp 0x92bf8feae0 rbp 0x13f #0 victory-image-b99f876b74d4a77f.dll+0xb5a5f8 #1 victory-image-b99f876b74d4a77f.dll+0x5bb7cce #2 victory-image-b99f876b74d4a77f.dll+0x1dbdc0b #3 victory-image-b99f876b74d4a77f.dll+0x5bb7111 #4 victory-image-b99f876b74d4a77f.dll+0x5bb7071 #5 victory-image-b99f876b74d4a77f.dll+0x63e78 #6 victory-image-b99f876b74d4a77f.dll+0x4eaa05a #7 victory-image-b99f876b74d4a77f.dll+0x221c29c #8 victory-image-b99f876b74d4a77f.dll+0x2215eca #9 KERNEL32.DLL+0x17374 #10 ntdll.dll+0x4cc91 ``` Layer log, the same boot (470 of each line): ``` WARN victory_gpu::pipeline::host: root signature: Unsupported bit-flag set (root signature flags c01). WARN victory_gpu::pipeline::host: host root signature refused error=参数错误。 (0x80070057) shaders=[vertex dfafaf385b2f94e8, pixel 06295fb1d1aefb78] ``` [crashes.log](https://github.com/user-attachments/files/35517742/crashes.log)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 15:01:38 +00:00
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#3530
No description provided.