Repository navigation
Conversation
…to combined-preload-pops # Conflicts: # Setup-DexNomRuntime.ps1 # apps/victory/src/play_launcher.rs # apps/victory/src/translate.rs # crates/victory-gpu/src/descriptor/host.rs # crates/victory-gpu/src/host.rs # crates/victory-gpu/src/pipeline/make.rs # crates/victory-hle/src/modules/d3d12x.rs
… combined-preload-pops
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI results for the combined branchThe CI and Screen runs here wait for maintainer approval ( CI
What was fixed: the first run failed Clippy ( Screen: this check fails on purpose because the PR changes Not verified: no run on a real GPU / RTX 5060 with the game (preload, then A maintainer still has to approve the workflows on this PR for the checks to show up here. 🤖 Generated with Claude Code |
|
work in progress for 3 shaders and the last pipeline on NVIDIA |
…wn lanes Three wave64 compute shaders (a 512-thread prefix over per-wave totals) were refused on 32-lane hosts: inside a loop only one console wave's lanes run, v_readfirstlane copies a running sum built from scalars and LDS alone. Two host waves cannot exchange there (no group barrier inside the loop), but every lane holds the same sum, so each host wave's own first lane is exact. scalar_built() finds such VGPR values (VALU results and LDS reads of them, phis at loop headers or where every predecessor runs on all lanes; guards allowed), and remembers which a guarded write made: those are only taken by a read that is itself inside a branch. Fixes 9fc111d3be79364f, 77360df21e12ea43 and 39321a95223001ed on the RTX 5060; their pipelines are now created. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…change loop Compute 7f61193d2c0e5f22 was refused by CreateComputePipelineState with E_OUTOFMEMORY on the RTX 5060 and on WARP alike, although its DXIL validates. Bisecting the console code down to one instruction: ds_add_rtn_u32 of (0 - x) on group-shared memory. Host compilers turn atomicrmw add of a negation into atomicrmw sub, which DXIL has no group-shared form of, and refuse the pipeline; ds_sub_u32 (atomicrmw sub) fails the same way. Both are now a load and a cmpxchg loop on old - x (lds_subtract); other atomics keep their atomicrmw. A test runs ds_add of 0 - 1 and ds_sub of 0 - 1 over 32 threads and checks LDS on the card (32 and 96). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes for the RTX 5060 preload refusalsTested on an RTX 5060 (32-lane waves only) with the game's shader archives. 1. Three compute shaders that did not translate:
|
| before | after | |
|---|---|---|
| shaders translated | 25 755 (3 refused) | 25 758 (0 refused) |
| compute pipelines | 2 699 (32 refused) | 2 703 (31 refused) |
The 31 pipelines still refused are a separate category that was already there before this PR and is not part of this fix (e.g. "shader requires wave64, host supports 32..=32 lanes").
Not verified: a gameplay session past the start screens with these shaders running. They now translate and their pipelines are created, but I have not looked at their output in the game.
🤖 Generated with Claude Code
Launch report: build
|
| value | |
|---|---|
| fps | 1.3 on average (min 0.1, max 2.9) |
| draws per frame | 3 728 on average, 9 626 max (about 7 000 in the indoor scene at the end) |
| draws dropped without a host pipeline | about 350 per frame (81 725 over the session) |
| indirect draws dropped | 70 in total |
| pipelines still being made | 30 at most, then 0 |
| errors, panics, device removed or hung | 0 |
One late frame line, broken down:
1.7 fps, 597 ms/frame (339.7 preparing: copies 103.7 ms 159.6 MB, textures 7.8 ms 17.6 MB;
180.7 on the GPU; 406.2 copying back 70.7 MB), 7041 draws/frame, dropped 367 without a host pipeline
cpu 27.6% gpu 30% busy ram 3462 MB
textures picked by index: 42999 uploaded so far (2933 MB), 8569 waiting, 13429 passed over unmapped
The bottleneck is not the GPU. Copying back to the CPU (about 406 ms and 70 MB per frame) and preparing (about 340 ms, of which 104 ms copy 160 MB) take most of each frame. The GPU itself takes about 181 ms.
Picture: the scene is drawn: an indoor room with ceiling lights and a character with fine hair. There is strong colour banding (concentric rings around the lights, posterized fog and shadows), which looks like a render target or tone-mapping step with too little precision. The overall image is very dark.
4. Remaining warnings (70 in the whole session)
| count | warning |
|---|---|
| 38 | host compute pipeline requires a wave size outside the adapter range (31 distinct shaders, required=64) |
| 29 | a pipeline creation method that is not implemented: the title goes without this pipeline (2 vtable slots) |
| 1 each | constant buffer not 256-byte aligned on the host, host view heap capped, buffer view the host would refuse left null (1 659 such views per frame line), unordered buffer view the host would refuse left null, VRAM texture budget reached, dstorage: a request ran before its page array was filled, a host DLL outside the host policy: refused rpcrt4.dll |
Next
- The 31 wave64-only compute pipelines (this PR, next).
- Copy-back and preparing cost per frame (the main cause of the 1–2 fps).
- Colour banding in the lit, foggy scene.
- The 2 pipeline creation methods that are not implemented.
🤖 Generated with Claude Code
Port of DexNom#40 (notquiteog), unchanged. A console wave64 compute program that no other form takes off 64-lane waves is refused by a 32-lane host and every dispatch of it is dropped; the exact wave-wide form is tried last, only for those. VICTORY_WAVE_WIDE=0 keeps the old refusal. On the RTX 5060 this creates 22 of the 31 compute pipelines the title's preload left refused for requiring WaveSize(64). The 9 left: 7 run groups of several console waves (128 to 1024 threads), which the wave-wide form does not take, and 2 are ray-tracing BVH builder programs (28918b7150a7aad5, caa78b8ca62bc3d6) whose waves exchange across halves. Co-Authored-By: notquiteog <notquiteog@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wave64-only compute pipelines on 32-lane hosts: 31 → 9 (
|
| before | after | |
|---|---|---|
| compute pipelines created | 2 703 | 2 725 |
refused (required=64 min=32 max=32) |
31 | 9 |
| shaders translated | 25 758 (0 refused) | 25 758 (0 refused) |
cargo clippy (both configurations, -D warnings) and cargo test --workspace: green.
The 9 left, and who has worked on them
| hash | group | why the wave-wide form does not take it |
|---|---|---|
02384a60fda6f2d0 |
128 | several console waves per group (widen takes groups of 64 only) |
22338086ea4c5364 |
128 | same |
2da4beb386509b77 |
256 | same |
1d434307d981352a |
512 | same |
3b02415f67c6b0d8 |
512 | same |
6832a9da15c2e584 |
1024 | same |
6b82bc7d22016cb5 |
1024 | same |
28918b7150a7aad5 |
64 | ray-tracing BVH builder: a wave sum used as data, and it still needs 64 lanes when taken wave-wide |
caa78b8ca62bc3d6 |
64 | same shape as 28918b71 |
All 7 multi-wave programs read and write LDS inside a lane branch in groups larger than one console wave. Their two halves would have to meet at group barriers that not every wave reaches.
Prior work found while looking for an NVIDIA solution:
- Shaders: wave64 programs in a paired form on 32-lane GPUs, mesh programs over 32 KiB linked with their pixel program, and more (230 more programs pass) fxceless/victory-fork#854 (stacked by Formats: share immutable texture swizzle tables Marvisak/VIctory#993 and Linux: run under Proton, and fix the world GPU faults Marvisak/VIctory#994), the "paired form" for wave64 on 32-lane GPUs. On an RTX 3060, the merged Linux: run under Proton, and fix the world GPU faults Marvisak/VIctory#994 tree built
02384a60and2da4beb3and left only one wave64 program in an offline census. The same tree removed the stepped sunlight on character silhouettes, which looks like the banding in the launch report above. A trial cherry-pick of its core commit (26600c6, +4 562/−1 321) onto this branch gives 17 conflict hunks in 6 files (emit/lower.rs,emit/mod.rs,wave64_tests.rs…). That is worth a PR of its own, not part of this one. - Shaders: console flow for groups of several console waves on 32-lane hosts Marvisak/VIctory#2214 (console flow for groups of several console waves): its author marks it as a draft, because count-paired barriers reached from different call sites are not defined in D3D12. Shaders: test double-precision multi-wave lowering on RTX 5060 Castyan/VIctory#1 tested it on this card: no pipelines beyond what this PR now creates.
- Shaders, GPU: on 32-lane hosts, wave64 halves act as waves; the BVH builder waits (stacked on #2176, #2118) Marvisak/VIctory#2711 takes the BVH builder's cross-half programs approximately, and reports a GPU hang (
0x887A0006) holding28918b71. That is why this PR does not force28918b71orcaa78b8c.
Not verified
Gameplay with the 22 newly created pipelines running: does the picture change, and is there any device loss over a long session? #40's author ran 7.5 minutes in the story world on an RTX 5060 Ti without device loss.
🤖 Generated with Claude Code
Summary
Combines #47 (Respect Direct3D 12 limits and add Preload and Play) and #50 (Diagnose primitive-ordered pixel shaders in the DXIL translator) into one pull request on current
main. Both are closed in favour of this one.Conflicts with
mainfrom #47 were resolved:play_launcher.rs:--playadded to the newLaunchOptionsparser (only accepted byvictory-warm). The child process setup is now a closure so preload and play each get a configured runtime process.Setup-DexNomRuntime.ps1: keeps the RayTime shortcuts and the FSR Quality 4K profile, and adds the Preload and Play shortcut.host.rs,descriptor/host.rs,translate.rs,pipeline/make.rs,d3d12x.rs: both sides kept.Status
Not compiled locally. Six CI pipelines are still failing and need fixing before merge.
🤖 Generated with Claude Code