Respect D3D12 limits, Preload and Play, POPS diagnostics, and RTX 5060 shader/pipeline fixes #61
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/DexNom--VIctory!61
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-61"
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?
@Castyan on GitHub · 2026-11-26 00:59 UTC · original
Castyan:combined-preload-pops→main· +1218 −179 · 25 files · 20 commits · draftSummary
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
@Castyan on GitHub · 2026-11-26 01:12 UTC · original
CI results for the combined branch
The CI and Screen runs here wait for maintainer approval (
action_required) because the branch is on a fork. I ran the sameci.ymlon the fork against currentmaininstead: https://github.com/Castyan/VIctory/actions/runs/45733280634CI
check: passes on5075b04(windows-latest):cargo clippy --workspace --all-targets --locked -D warnings✅cargo clippy ... --all-features(diagnostics build) ✅cargo test --workspace --locked✅ (GPU tests skip themselves on the runner's software adapter, as configured)What was fixed: the first run failed Clippy (
clippy::err_expect) on two POPS tests from #50 incrates/victory-shader/src/emit/mod.rs. Commit5075b04replaces.err().expect(...)withlet Err(error) = ... else { panic!(...) };.Screen: this check fails on purpose because the PR changes
Setup-DexNomRuntime.ps1(the Preload and Play shortcut). By design it means a maintainer has to read that file. It is not a code error.Not verified: no run on a real GPU / RTX 5060 with the game (preload, then
--play).A maintainer still has to approve the workflows on this PR for the checks to show up here.
🤖 Generated with Claude Code
@Castyan on GitHub · 2026-11-26 01:54 UTC · original
work in progress for 3 shaders and the last pipeline on NVIDIA
@Castyan on GitHub · 2026-11-26 02:12 UTC · original
Fixes for the RTX 5060 preload refusals
Tested on an RTX 5060 (32-lane waves only) with the game's shader archives.
1. Three compute shaders that did not translate:
0118c869fc111d3be79364f,77360df21e12ea43,39321a95223001ed: "a first-lane read where not every lane runs".All three run the same 512-thread prefix. Each console wave past the first adds up the totals of the waves before it from LDS, in a loop that only its own lanes run.
v_readfirstlanethen copies the running sum back to an SGPR. On a 32-lane host, the two halves of a console wave cannot exchange inside that loop (no group barrier). The sum is built from scalars and LDS only, though, so every active lane holds the same value and each host wave's own first lane is exact.The new
scalar_built()finds such values. It allows guards. A value made by a guarded write is only accepted when the read is itself inside a branch.For reference, the 7900XTX fork has the same refusal. It does not hit it because that card runs native 64-lane waves.
2. Compute pipeline refused with E_OUTOFMEMORY:
44c18137f61193d2c0e5f22: the DXIL validates, butCreateComputePipelineStatereturns0x8007000Eon both NVIDIA and WARP, and keeps doing so when the pipeline is created alone. So it is not memory pressure.I narrowed the console code down to a single instruction:
ds_add_rtn_u32of0 - x. Host compilers turnatomicrmw addof a negation intoatomicrmw sub, which DXIL has no group-shared form of, and the pipeline is refused.ds_sub_u32(which we emitted asatomicrmw sub) fails the same way. Both are now a compare-exchange loop onold - x. Every other atomic keeps itsatomicrmw.Tests
a_first_lane_read_of_a_scalar_built_sum_inside_a_lane_loop_takes_the_host_waves_own(the game's real loop on a 32-lane host).an_lds_addition_of_a_negated_value_is_a_compare_exchange_loop. It runs on the card: 32 threads take 1 from 64 → 32, andds_subof −1 → 96.cargo clippy(both configurations,-D warnings) andcargo test --workspace: all green locally.Full preload on the RTX 5060
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
@Castyan on GitHub · 2026-11-26 02:26 UTC · original
Launch report: build
44c1813on an RTX 5060Setup: Windows 11, NVIDIA GeForce RTX 5060 (
0x10de:0x2d05, waves of 32 lanes only), release build of this branch at44c1813. Launched withvictory-warm.exe --play(shader preload, then the game) and the log filter atdebug(victory=trace). Session from 02:12:34 to 02:26:03 UTC, stopped by hand once gameplay was reached. The log is 6.8 MB.1. Shader preload: 81 s
9fc111d3…,77360df2…,39321a95…) now translate, and their pipelines are created.7f61193d…) is now created.required=64 min=32 max=32); see below.2. Start screens: about 30 fps
3 to 13 draws per frame, 0 draws dropped, and the queue of pipelines being made went from 734 to 0 in about 15 s.
3. Gameplay: reached, but very slow
Gameplay starts at 02:15:10. Over 106 five-second samples with more than 100 draws per frame:
One late frame line, broken down:
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)
host compute pipeline requires a wave size outside the adapter range(31 distinct shaders,required=64)a pipeline creation method that is not implemented: the title goes without this pipeline(2 vtable slots)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.dllNext
🤖 Generated with Claude Code
@Castyan on GitHub · 2026-11-26 02:36 UTC · original
Wave64-only compute pipelines on 32-lane hosts: 31 → 9 (
6684db0)What is in this PR
6684db0ports DexNom/VIctory#40 (notquiteog) unchanged, with the author credited. When no other form takes a console wave64 compute program off 64-lane waves, the exact wave-wide form (widen) is tried last.VICTORY_WAVE_WIDE=0keeps the old refusal. The programs that lost a card with the wave-wide form have another working form, so they never reach this code.Full preload on the RTX 5060:
required=64 min=32 max=32)cargo clippy(both configurations,-D warnings) andcargo test --workspace: green.The 9 left, and who has worked on them
02384a60fda6f2d0widentakes groups of 64 only)22338086ea4c53642da4beb386509b771d434307d981352a3b02415f67c6b0d86832a9da15c2e5846b82bc7d22016cb528918b7150a7aad5caa78b8ca62bc3d628918b71All 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:
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.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
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.