Fix Windows 10 Game-Init crash and root-signature fallback #623
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!623
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/623/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@bittertea0323 on GitHub · 2026-11-24 05:48 UTC · original
bittertea0323:fix/win10-init-and-rootsig→main· +76 −9 · 2 files · 3 commits · closed without mergingFixes the title crashing at +0xb5a5f8 right after XUserAddAsync (issue #348) by implementing the XUser maximum-users slot, plus a token and a root-signature fallback. See #622 for reproduction and measurements.
@bittertea0323 on GitHub · 2026-11-24 06:17 UTC · original
Agility SDK plan for Windows 10 hosts posted on issue #622: the two mandatory exports, the loader-lock trap, the import-lib generation, and the one remaining Rust linking gap. This PR intentionally ships without the Agility bits.
@bittertea0323 on GitHub · 2026-11-24 06:29 UTC · original
Thanks for the review — all three points addressed in
7c01e3d.token_async reverted to
FAILED_TO_GET_TOKEN. You were right to flag it. On the repro host the token path is never reached during Game Init (the "token and signature: offline" log line never fires before the+0xb5a5f8fault), so the S_OK change was speculative and it broke the pinned test. Reverted, test passes again.Unit test added for
get_max_users(slot 0x30): assertsout == 1andS_OK, in the same style as the existing slot tests.cargo test -p victory-hle modules::xuseris green.Root signature fallback vs #626: mine handles the
D3D12SerializeVersionedRootSignaturerefusal (the "Unsupported bit-flag set" from Windows 10's d3d12core) and retries without the two 1.1 heap-indexing flags. If #626 additionally coversCreateRootSignaturefailure, the two are complementary, not conflicting — happy to drop my host.rs change entirely if #626 lands first and maintainers prefer one path.@Zilumz1 on GitHub · 2026-11-24 08:30 UTC · original
Tested
7c01e3don Windows 10 Pro + AMD Radeon RX 580 2048SP (Polaris), driver 31.0.21925.1001, Rust 1.98.1, MSVC 14.44, in-box D3D12 runtime (no Agility SDK). No title run, only the synthetic checks below.Tests:
cargo test -p victory-hle -p victory-gpu --no-fail-fast -- --test-threads=1victory-gpu: 43 passed, 0 failed, 1 ignoredvictory-hle: 85 passed, 1 failed. The newget_max_usersassertion passes insidestartup_adds_the_user_and_reads_its_id. The one failure isnet::tests::only_loopback_is_reachable(winhttp.dll lacks WinHttpGetProxySettingsEx). That's the Windows 10 net test fixed on main by #152, which isn't on this branch's base (d2a4bae), so it's unrelated to this PR. A rebase should clear it.The root-signature error reproduces on this host. Empty 1.1 signature,
D3D12SerializeVersionedRootSignatureon the in-box runtime:0x601(input layout + both heap-indexing flags, asroot_signature()builds it)0x80070057"Unsupported bit-flag set (root signature flags 601)."0x001(input layout only, the retry)S_OKSo the fallback does serialize where the original doesn't.
One question about the fallback. The translated shaders reach their descriptors through SM 6.6
ResourceDescriptorHeap[]/SamplerDescriptorHeap[](createHandleFromHeap,emit/mod.rs:17-21). As I understand the D3D12 rules, a PSO whose shaders index the heaps needs a root signature with*_HEAP_DIRECTLY_INDEXED. So on a host where the retry kicks in, does pipeline creation then get refused instead, or do the menu's pipelines not use heap indexing? I haven't measured this, since I don't run the title. If they do, the Agility SDK route (#463 forvictory.exe, #486 for the tests) would be the fix, and the retry would only move the failure into PSO creation. The extra fields in thehost pipeline refusedwarning would show that either way.The same flags are also set in
crates/victory-shader/src/emit/host.rs:191, which this PR doesn't touch.AI-assisted; the results above are real runs on my machine.
@Zilumz1 on GitHub · 2026-11-24 08:36 UTC · original
Follow-up to my question above: measured, not guessed. Same machine (Windows 10 Pro, RX 580 / Polaris, driver 31.0.21925.1001),
mainatba7d873.I added a temporary test to
emit/valu_tests.rs(not committed). It lowers a real synthetic GFX10 compute shader through the normal pipeline (build_valu_cs, av_mov_b32+ raw UAV store, so the DXIL iscs_6_6withcreateHandleFromHeap). Then it creates its root signature and compute PSO directly on the hardware device, once with the heap-indexing flags and once without (#623's fallback):*_HEAP_DIRECTLY_INDEXED0x650x800700570x800700570x660x80070057So on Windows 10 the retry only moves the failure from root-signature serialization into PSO creation. The menu would still drop its draws, just with a "host pipeline refused" warning instead of a root-signature one. Even on a host that does have SM 6.6, the PSO without the flags is refused, because the shaders index the heaps.
What actually works on this machine is shader model 6.6 through the Agility runtime, with the flags kept: #463 for
victory.exe, #486 for the tests.Suggestion for #623: keep the
get_max_usersfix (the crash) and the extrahost pipeline refusedfields. Drop the root-signature retry, or have it log a clear "this host lacks SM 6.6 / the Agility runtime" error instead of retrying. I can share the probe test if useful.AI-assisted; the results above are real runs on my machine.
@Marvisak on GitHub · 2026-11-25 00:26 UTC · original
Automated triage for the maintainers. Closing because another open pull request covers the same change.
See #626.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed