GPU: the executable exports the Agility runtime, so Windows 10 gets shader model 6.6 #165
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!165
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-165"
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?
@Calvix2k on GitHub · 2026-11-26 08:49 UTC · original
Calvix2k:pr/windows10-agility→main· +47 −0 · 3 files · 1 commits · openWindows 10 runs your build to the world only with these two exports, and right now the tree has none.
What happens without them
On Windows 10 22H2 (10.0.19045), RX 7800 XT 16 GB (RDNA3), driver 32.0.32029.2010, every launch dies about 300 ms in, at the same place:
Reproduced with
VICTORY_RELAY=0and1,VICTORY_LATE_WAIT=0and1, and with--unimplemented trapas well aszero, so it is not a submission-wait or import-policy problem. Windows 10's in-box D3D12 stops at shader model 6.5 and refuses the root signatures that index the descriptor heaps directly, which every translated pipeline uses: the device the runtime gets is the older one and the title walks into a null interface.I hit the identical crash, at the identical frame, on ZSlayer's runtime and on DexNom's fork of it — which is where I found it first. So it is not one fork's bug: any tree without the opt-in is unstartable on Windows 10, and only the Windows 11 machines in the README numbers would have hidden it.
The patch
Three files, no logic changes — the same mechanism upstream VIctory uses for its own executables:
apps/victory/src/agility.rs— the two#[unsafe(no_mangle)]statics,D3D12SDKVersion = 620andD3D12SDKPath = ".\D3D12\".apps/victory/build.rs—cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKVersion,DATAand the same for the path, gated onCARGO_CFG_TARGET_ENV = msvc(only the MSVC linker takes/EXPORTon a binary).apps/victory/src/main.rs—mod agility;and one reference so the symbols stay in the binary.Staging the runtime is the user's step:
D3D12Core.dll1.620.2 inD3D12/beside the executable. Nothing is downloaded by the build. Without that folder the exports are compiled in but unused, and D3D12 keeps the in-box runtime, exactly as today — so a Windows 11 checkout or a newer system runtime is unchanged.Verification
0xb5a5f8.722c0e1and built with the pinned toolchain (profile diag,--features diagnostics).Two measurements from the same machine (no code here, just numbers)
These cost nothing to try and may be worth a line in the README:
VICTORY_WIDE_REFRESH=1andVICTORY_WIDE_MERGE=1stabilise the copies: copies went from 37–229 ms (swinging) to a steady 26–32 ms for 159–189 MB, copy-back from 55–98 to 42–56 ms. Your launcher setsWIDE_BACKbut neither of these.Current state there: 4.3–6 fps in the prologue scenes (GPU ~100 ms, preparing ~60, copy-back ~50), with 4770X/7800 XT/Win10 and 32 GB RAM — 0 hard page faults, so it is not memory.
What I did not put in this PR
A window fix I run locally:
fit()uses the work area (2488x1400 on a 1440p screen) and the title's window keeps its caption, so its 4K picture is scaled into a decorated window; making it the monitor's size and bare (WS_POPUP) maps it 1:1. AlsoGetModuleHandleW/Amapping title DLLs on demand, which is what finally loads the FidelityFX upscaler behind the FidelityFX loader (Series S still shows nothing, but the DLL loads now). Both change behaviour, so they belong in their own PR — say the word.No game files, code or data from the title are in this branch. AI-assisted (DeepSeek V4.1), tested on the machine described above.
@HAL9000RELOADED on GitHub · 2026-11-26 16:32 UTC · original
A second Windows 10 + RDNA3 machine for
c0c19d2: RX 7900 XTX (RDNA3), driver 32.0.32015.7029, i7-13700KF, Windows 10 22H2 (19045), Agility SDK 1.620.2 intarget\diag\D3D12\. Merged on main9576c45, later ona9400a6.scripts\play.ps1set plus renderer patches 1, 2, 5 and 6: about 24.7 fps (40.6 ms at ~4,800 draws), card ~95% busy. Series S: about 26.8 fps.victory translate --pipelineson an empty folder stops withD3D12_ERROR_INVALID_REDIST: the exports are always there. Main without this PR stops at SM 6.5 with or without the folder.Belobug/VIctory-Belobug-AMD#44 hit the same and now exports only when the runtime is staged at build time. Another option is to write the system runtime's own version into the export at start when the folder is missing (fxceless/victory-fork#856, LeonardoS11's follow-up); on this Windows 10 that version is 2 and the device then comes up on the in-box runtime.
AI-assisted (Claude Code): tests run on my machine, text drafted with Claude.
@Calvix2k on GitHub · 2026-11-26 18:49 UTC · original
Thanks for the second machine - that is exactly the confirmation this needed.
Same picture here, on a third configuration: Windows 10 22H2 (19045), RX 7800 XT (RDNA3), Agility 1.620.2 in
D3D12\beside the executable. With the PR the device is made and the title reaches the world in every session; without the folder the runtime stops earlier, as you describe.One data point you may find useful for the MR itself: on current main (
c9c932c) plus this change, with renderer ports 1, 2, 5, 6 and 7 on and a 0.75 render scale (1440p output), the prologue went from 253 ms a frame on the old tree to 167 ms at ~6,800 draws (about 6 fps), GPU 95 ms, copies 14 ms / 84 MB, copy-back 25 ms / 39 MB. At 4K output without the ports it is 213-238 ms at ~4,300-5,200 draws. So the merge you describe is not just correctness on Windows 10 - it is the difference between the title being measurable and not.Noted on Belobug #44 and fxeless #856 as alternatives; the export-only-when-staged form is what the other trees seem to converge on, so a follow-up that writes the in-box version when the folder is absent sounds right to me.
@HAL9000RELOADED on GitHub · 2026-11-26 19:24 UTC · original
Follow-up to my run above, with a fix for the missing-folder case: branch
avatar-agility-testson our fork, two commits on top of mainc9c932c+ this PR (5c1cdef,b7f7460).victory.exeexportsD3D12SDKVersion/D3D12SDKPathonly whentarget\<profile>\D3D12\D3D12Core.dllwas there at build time. Without the folder the in-box runtime is used instead ofD3D12_ERROR_INVALID_REDIST; with it, the behaviour of this PR.victory-shaderandvictory-gpuget the same exports, through a test-only.drectvedirective, when the runtime is staged. Integration tests intests/still link.Same design as Belobug/VIctory-Belobug-AMD#44 and fxceless/victory-fork#402. On Windows 10 + RX 7900 XTX with the runtime staged, all 1022 tests of
cargo test --workspace -- --skip censuspass (census starts victory.exe) (the SM 6.5 failures of the shader and GPU tests are gone); without it the results are those of main + this PR. The two commits keep their authorship and GPL notes, so they can be cherry-picked onto this PR as they are.AI-assisted (Claude Code): tests run on my machine, text drafted with Claude.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.