Respect D3D12 limits, Preload and Play, POPS diagnostics, and RTX 5060 shader/pipeline fixes #61

Open
Castyan wants to merge 22 commits from upstream-pr/61 into main
Castyan commented 2026-11-26 00:59:57 +00:00 (Migrated from github.com)

Imported from DexNom/VIctory. Originally posted by Castyan on 2026-11-26T00:59:57Z.


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 main from #47 were resolved:

  • play_launcher.rs: --play added to the new LaunchOptions parser (only accepted by victory-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

Compiled and checked on an RTX 5060 at 2287c4b: cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features, is clean, and cargo test --workspace --locked passes. The CI failure from the first push (clippy::err_expect in two POPS tests) was fixed in 5075b04. CI here still waits for maintainer approval, because the branch is on a fork.

Since the merge, this branch also carries the RTX 5060 fixes described in the comments: three compute shaders and one pipeline that were refused (0118c86, 44c1813), the wave-wide form as a last resort (6684db0, port of #40), and two test-race fixes (8cdfc63, 2287c4b). #64 and the PRs split from it (#98 to #101) are stacked on this branch.

🤖 Generated with Claude Code

<!-- greyfinch-sync:DexNom/VIctory:issue:5501966356 --> Imported from [DexNom/VIctory](https://github.com/DexNom/VIctory/pull/61). Originally posted by [Castyan](https://github.com/Castyan) on 2026-11-26T00:59:57Z. --- ## 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 `main` from #47 were resolved: - `play_launcher.rs`: `--play` added to the new `LaunchOptions` parser (only accepted by `victory-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 Compiled and checked on an RTX 5060 at `2287c4b`: `cargo clippy --workspace --all-targets --locked -- -D warnings`, with and without `--all-features`, is clean, and `cargo test --workspace --locked` passes. The CI failure from the first push (`clippy::err_expect` in two POPS tests) was fixed in `5075b04`. CI here still waits for maintainer approval, because the branch is on a fork. Since the merge, this branch also carries the RTX 5060 fixes described in the comments: three compute shaders and one pipeline that were refused (`0118c86`, `44c1813`), the wave-wide form as a last resort (`6684db0`, port of #40), and two test-race fixes (`8cdfc63`, `2287c4b`). #64 and the PRs split from it (#98 to #101) are stacked on this branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Castyan commented 2026-11-26 01:12:04 +00:00 (Migrated from github.com)

Imported from DexNom/VIctory. Originally posted by Castyan on 2026-11-26T01:12:04Z.


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 same ci.yml on the fork against current main instead: https://github.com/Castyan/VIctory/actions/runs/45733280634

CI check: passes on 5075b04 (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 in crates/victory-shader/src/emit/mod.rs. Commit 5075b04 replaces .err().expect(...) with let 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

<!-- greyfinch-sync:DexNom/VIctory:comment:7179533568 --> Imported from [DexNom/VIctory](https://github.com/DexNom/VIctory/pull/61#issuecomment-7179533568). Originally posted by [Castyan](https://github.com/Castyan) on 2026-11-26T01:12:04Z. --- ## 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 same `ci.yml` on the fork against current `main` instead: https://github.com/Castyan/VIctory/actions/runs/45733280634 **CI `check`: passes on `5075b04`** (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 in `crates/victory-shader/src/emit/mod.rs`. Commit `5075b04` replaces `.err().expect(...)` with `let 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](https://claude.com/claude-code)
Castyan commented 2026-11-26 01:54:05 +00:00 (Migrated from github.com)

Imported from DexNom/VIctory. Originally posted by Castyan on 2026-11-26T01:54:05Z.


work in progress for 3 shaders and the last pipeline on NVIDIA

<!-- greyfinch-sync:DexNom/VIctory:comment:7180259433 --> Imported from [DexNom/VIctory](https://github.com/DexNom/VIctory/pull/61#issuecomment-7180259433). Originally posted by [Castyan](https://github.com/Castyan) on 2026-11-26T01:54:05Z. --- work in progress for 3 shaders and the last pipeline on NVIDIA
Castyan commented 2026-11-26 02:12:09 +00:00 (Migrated from github.com)

Imported from DexNom/VIctory. Originally posted by Castyan on 2026-11-26T02:12:09Z.


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: 0118c86

9fc111d3be79364f, 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_readfirstlane then 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: 44c1813

7f61193d2c0e5f22: the DXIL validates, but CreateComputePipelineState returns 0x8007000E on 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_u32 of 0 - x. Host compilers turn atomicrmw add of a negation into atomicrmw sub, which DXIL has no group-shared form of, and the pipeline is refused. ds_sub_u32 (which we emitted as atomicrmw sub) fails the same way. Both are now a compare-exchange loop on old - x. Every other atomic keeps its atomicrmw.

Tests

  • New: 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).
  • New: an_lds_addition_of_a_negated_value_is_a_compare_exchange_loop. It runs on the card: 32 threads take 1 from 64 → 32, and ds_sub of −1 → 96.
  • cargo clippy (both configurations, -D warnings) and cargo test --workspace: all green locally.

Full preload on the RTX 5060

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

<!-- greyfinch-sync:DexNom/VIctory:comment:7180562466 --> Imported from [DexNom/VIctory](https://github.com/DexNom/VIctory/pull/61#issuecomment-7180562466). Originally posted by [Castyan](https://github.com/Castyan) on 2026-11-26T02:12:09Z. --- ## 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: `0118c86` `9fc111d3be79364f`, `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_readfirstlane` then 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](https://github.com/avatarmanz/VIctory-7900XTX) has the same refusal. It does not hit it because that card runs native 64-lane waves. ### 2. Compute pipeline refused with E_OUTOFMEMORY: `44c1813` `7f61193d2c0e5f22`: the DXIL validates, but `CreateComputePipelineState` returns `0x8007000E` on **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_u32` of `0 - x`. Host compilers turn `atomicrmw add` of a negation into `atomicrmw sub`, which DXIL has no group-shared form of, and the pipeline is refused. `ds_sub_u32` (which we emitted as `atomicrmw sub`) fails the same way. Both are now a compare-exchange loop on `old - x`. Every other atomic keeps its `atomicrmw`. ### Tests - New: `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). - New: `an_lds_addition_of_a_negated_value_is_a_compare_exchange_loop`. It runs on the card: 32 threads take 1 from 64 → **32**, and `ds_sub` of −1 → **96**. - `cargo clippy` (both configurations, `-D warnings`) and `cargo test --workspace`: all green locally. ### Full preload on the RTX 5060 | | 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](https://claude.com/claude-code)
Castyan commented 2026-11-26 02:26:47 +00:00 (Migrated from github.com)

Imported from DexNom/VIctory. Originally posted by Castyan on 2026-11-26T02:26:47Z.


Launch report: build 44c1813 on an RTX 5060

Setup: Windows 11, NVIDIA GeForce RTX 5060 (0x10de:0x2d05, waves of 32 lanes only), release build of this branch at 44c1813. Launched with victory-warm.exe --play (shader preload, then the game) and the log filter at debug (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

warm  25758 translated, 0 refused; 2703 compute pipelines, 31 refused; 0 omitted by ray-tracing mode; 81 s
Shader preload finished. Starting the game.
  • The 3 shaders that did not translate before (9fc111d3…, 77360df2…, 39321a95…) now translate, and their pipelines are created.
  • The pipeline refused with E_OUTOFMEMORY (7f61193d…) is now created.
  • The 31 pipelines still refused all require wave64 (required=64 min=32 max=32); see below.
  • 81 s with a warm cache. The first preload took 180 s.

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:

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

  1. The 31 wave64-only compute pipelines (this PR, next).
  2. Copy-back and preparing cost per frame (the main cause of the 1–2 fps).
  3. Colour banding in the lit, foggy scene.
  4. The 2 pipeline creation methods that are not implemented.

🤖 Generated with Claude Code

<!-- greyfinch-sync:DexNom/VIctory:comment:7180811431 --> Imported from [DexNom/VIctory](https://github.com/DexNom/VIctory/pull/61#issuecomment-7180811431). Originally posted by [Castyan](https://github.com/Castyan) on 2026-11-26T02:26:47Z. --- ## Launch report: build `44c1813` on an RTX 5060 **Setup:** Windows 11, NVIDIA GeForce RTX 5060 (`0x10de:0x2d05`, waves of 32 lanes only), release build of this branch at `44c1813`. Launched with `victory-warm.exe --play` (shader preload, then the game) and the log filter at `debug` (`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 ``` warm 25758 translated, 0 refused; 2703 compute pipelines, 31 refused; 0 omitted by ray-tracing mode; 81 s Shader preload finished. Starting the game. ``` - The 3 shaders that did not translate before (`9fc111d3…`, `77360df2…`, `39321a95…`) now translate, and their pipelines are created. - The pipeline refused with E_OUTOFMEMORY (`7f61193d…`) is now created. - The 31 pipelines still refused all require **wave64** (`required=64 min=32 max=32`); see below. - 81 s with a warm cache. The first preload took 180 s. ### 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: | | 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 1. The 31 wave64-only compute pipelines (this PR, next). 2. Copy-back and preparing cost per frame (the main cause of the 1–2 fps). 3. Colour banding in the lit, foggy scene. 4. The 2 pipeline creation methods that are not implemented. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Castyan commented 2026-11-26 02:36:33 +00:00 (Migrated from github.com)

Imported from DexNom/VIctory. Originally posted by Castyan on 2026-11-26T02:36:33Z.


Wave64-only compute pipelines on 32-lane hosts: 31 → 9 (6684db0)

What is in this PR

6684db0 ports 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=0 keeps 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:

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:

  • fxceless/victory-fork#854 (stacked by #993 and #994), the "paired form" for wave64 on 32-lane GPUs. On an RTX 3060, the merged #994 tree built 02384a60 and 2da4beb3 and 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.
  • 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. Castyan/VIctory#1 tested it on this card: no pipelines beyond what this PR now creates.
  • Marvisak/VIctory#2711 takes the BVH builder's cross-half programs approximately, and reports a GPU hang (0x887A0006) holding 28918b71. That is why this PR does not force 28918b71 or caa78b8c.

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

<!-- greyfinch-sync:DexNom/VIctory:comment:7180959201 --> Imported from [DexNom/VIctory](https://github.com/DexNom/VIctory/pull/61#issuecomment-7180959201). Originally posted by [Castyan](https://github.com/Castyan) on 2026-11-26T02:36:33Z. --- ## Wave64-only compute pipelines on 32-lane hosts: 31 → 9 (`6684db0`) ### What is in this PR `6684db0` ports **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=0` keeps 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:** | | 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: - **fxceless/victory-fork#854** (stacked by #993 and #994), the "paired form" for wave64 on 32-lane GPUs. On an RTX 3060, the merged #994 tree [built `02384a60` and `2da4beb3`](https://github.com/fxceless/victory-fork/pull/1002#issuecomment-7172865868) and 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. - **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. Castyan/VIctory#1 tested it on this card: no pipelines beyond what this PR now creates. - **Marvisak/VIctory#2711** takes the BVH builder's cross-half programs approximately, and reports a GPU hang (`0x887A0006`) holding `28918b71`. That is why this PR does not force `28918b71` or `caa78b8c`. ### 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](https://claude.com/claude-code)
Castyan commented 2026-11-26 13:13:44 +00:00 (Migrated from github.com)

Imported from DexNom/VIctory. Originally posted by Castyan on 2026-11-26T13:13:44Z.


Test fixes pushed (6684db0..2287c4b)

6684db0 was checked on its own: both CI Clippy runs were clean, and cargo test --workspace failed only on two pre-existing test races. Two commits from #64 fix them here as well:

  • 8cdfc63 Wait for the heap to go before the in-place test gives its pages back.
    • The test inplace::tests::warp_a_title_buffer_in_place_shows_its_bytes_at_its_offset decommitted pages right after dropping the heap opened on them.
    • WARP unlocks those pages only a moment later, so under load VirtualFree returned ERROR_INVALID_PARAMETER.
    • The test now retries for at most 2 s and checks that the final release succeeds.
  • 2287c4b Tests take turns on the software adapter (ported from avatarmanz/VIctory-7900XTX@160d222).
    • The random access violations of victory-gpu --lib came from d3d10warp.dll itself. Two tests compiling and running compute shaders at once crash its shader compiler: stacks caught under cdb show two or more indirect::tests::warp_* tests inside every crash.
    • Under cdb: 50 crashes in 588 runs before the fix, 0 in 240 after.

Validation at 2287c4b

Check Result
cargo clippy ×2 pass
cargo test --workspace --locked pass
victory-gpu --lib, plain runs 100/100

One known flake remains: under heavy load (two test binaries at once), watch::tests::a_view_mapped_beside_a_guarded_one_makes_it_check_again fails about 1 run in 100. It comes from the watch tests' guards outliving their memory, the part of 160d222 that is not ported yet. Details: https://github.com/DexNom/VIctory/pull/64#issuecomment-7193045880

🤖 Generated with Claude Code

<!-- greyfinch-sync:DexNom/VIctory:comment:7193049884 --> Imported from [DexNom/VIctory](https://github.com/DexNom/VIctory/pull/61#issuecomment-7193049884). Originally posted by [Castyan](https://github.com/Castyan) on 2026-11-26T13:13:44Z. --- ## Test fixes pushed (`6684db0..2287c4b`) `6684db0` was checked on its own: both CI Clippy runs were clean, and `cargo test --workspace` failed only on two pre-existing test races. Two commits from #64 fix them here as well: - **`8cdfc63` Wait for the heap to go before the in-place test gives its pages back.** - The test `inplace::tests::warp_a_title_buffer_in_place_shows_its_bytes_at_its_offset` decommitted pages right after dropping the heap opened on them. - WARP unlocks those pages only a moment later, so under load `VirtualFree` returned `ERROR_INVALID_PARAMETER`. - The test now retries for at most 2 s and checks that the final release succeeds. - **`2287c4b` Tests take turns on the software adapter** (ported from avatarmanz/VIctory-7900XTX@160d222). - The random access violations of `victory-gpu --lib` came from `d3d10warp.dll` itself. Two tests compiling and running compute shaders at once crash its shader compiler: stacks caught under cdb show two or more `indirect::tests::warp_*` tests inside every crash. - Under cdb: 50 crashes in 588 runs before the fix, 0 in 240 after. **Validation at `2287c4b`** | Check | Result | |---|---| | `cargo clippy` ×2 | pass | | `cargo test --workspace --locked` | pass | | `victory-gpu --lib`, plain runs | 100/100 | One known flake remains: under heavy load (two test binaries at once), `watch::tests::a_view_mapped_beside_a_guarded_one_makes_it_check_again` fails about 1 run in 100. It comes from the `watch` tests' guards outliving their memory, the part of 160d222 that is not ported yet. Details: https://github.com/DexNom/VIctory/pull/64#issuecomment-7193045880 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Castyan commented 2026-11-26 18:09:14 +00:00 (Migrated from github.com)

Imported from DexNom/VIctory. Originally posted by Castyan on 2026-11-26T18:09:14Z.


i'm back babe

<!-- greyfinch-sync:DexNom/VIctory:comment:7200114463 --> Imported from [DexNom/VIctory](https://github.com/DexNom/VIctory/pull/61#issuecomment-7200114463). Originally posted by [Castyan](https://github.com/Castyan) on 2026-11-26T18:09:14Z. --- i'm back babe
adriavidaldevelop commented 2026-11-26 21:08:38 +00:00 (Migrated from github.com)

Imported from DexNom/VIctory. Originally posted by adriavidaldevelop on 2026-11-26T21:08:38Z.


Tested victory-shader on the PR #61 branch (Castyan:combined-preload-pops) using an RTX 5060 (8 GB) on Windows 11.

Environment

  • Branch: pr-61 (Castyan:combined-preload-pops)
  • GPU: NVIDIA GeForce RTX 5060 (8 GB VRAM)
  • Driver: 621.24
  • RAM: 16 GB
  • OS: Windows 11 (x86_64-pc-windows-msvc, rustc 1.98.1, running from a Dev Drive)

Test Results (cargo test -p victory-shader)

  • Summary: 239 passed; 8 failed; 4 ignored

1. emit::intersect_tests (4 failures — unchanged)

the_32_bit_node_test_in_a_host_buffer_matches_the_reference_on_the_card, the_32_bit_node_test_over_title_memory_matches_the_reference_on_the_card, the_64_bit_node_test_in_a_host_buffer_matches_the_reference_on_the_card, and the_64_bit_node_test_over_title_memory_matches_the_reference_on_the_card still fail at intersect_tests.rs:582:17:

assertion `left == right` failed: hardware, batch 4 thread 14: Some((a, 0, Ray { extent: 100.0, origin: [0.0, 0.0, 0.0], direction: [0.0, 2.0, 5.0], inverse: [inf, 0.5, 0.2] }))
 got [7f800000, 3f800000, 0, 0] = [inf, 1.0, 0.0, 0.0]
want [41800000, 41800000, 0, 0] = [16.0, 16.0, 0.0, 0.0]
<!-- greyfinch-sync:DexNom/VIctory:comment:7203432671 --> Imported from [DexNom/VIctory](https://github.com/DexNom/VIctory/pull/61#issuecomment-7203432671). Originally posted by [adriavidaldevelop](https://github.com/adriavidaldevelop) on 2026-11-26T21:08:38Z. --- Tested `victory-shader` on the **PR #61** branch (`Castyan:combined-preload-pops`) using an **RTX 5060 (8 GB)** on Windows 11. ### Environment - **Branch:** `pr-61` (`Castyan:combined-preload-pops`) - **GPU:** NVIDIA GeForce RTX 5060 (8 GB VRAM) - **Driver:** `621.24` - **RAM:** 16 GB - **OS:** Windows 11 (`x86_64-pc-windows-msvc`, `rustc 1.98.1`, running from a Dev Drive) ### Test Results (`cargo test -p victory-shader`) - **Summary:** `239 passed; 8 failed; 4 ignored` #### 1. `emit::intersect_tests` (4 failures — unchanged) `the_32_bit_node_test_in_a_host_buffer_matches_the_reference_on_the_card`, `the_32_bit_node_test_over_title_memory_matches_the_reference_on_the_card`, `the_64_bit_node_test_in_a_host_buffer_matches_the_reference_on_the_card`, and `the_64_bit_node_test_over_title_memory_matches_the_reference_on_the_card` still fail at `intersect_tests.rs:582:17`: ```text assertion `left == right` failed: hardware, batch 4 thread 14: Some((a, 0, Ray { extent: 100.0, origin: [0.0, 0.0, 0.0], direction: [0.0, 2.0, 5.0], inverse: [inf, 0.5, 0.2] })) got [7f800000, 3f800000, 0, 0] = [inf, 1.0, 0.0, 0.0] want [41800000, 41800000, 0, 0] = [16.0, 16.0, 0.0, 0.0]
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/61:upstream-pr/61'
git switch 'upstream-pr/61'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/61'
git switch 'upstream-pr/61'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/61'
git switch 'upstream-pr/61'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/61'
git switch 'main'
git merge --squash 'upstream-pr/61'
git switch 'main'
git merge --ff-only 'upstream-pr/61'
git switch 'main'
git merge 'upstream-pr/61'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
DexNom/VIctory!61
No description provided.