Fix pipeline wait accounting and diagnose wave-size limits (RTX 5060 gameplay verified) #16

Open
github-bot wants to merge 6 commits from github-bot/gh-16 into main AGit
Owner

@⁠Castyan on GitHub · 2026-11-25 18:29 UTC · original
Castyan:diagnose-nvidia-wave32 → main · +316 −37 · 8 files · 6 commits · open

## Changes

  • Detect the D3D12 adapter's maximum wave width in victory translate --pipelines so the offline translator uses the detected width by default. Explicit overrides still work.
  • Read the fixed wave size from the emitted DXIL and report an unsupported width before asking D3D12 to build the compute pipeline.
  • Log the selected adapter and PCI IDs in the runtime, and document the RTX 5060 results.

Validation

On RTX 5060 (driver 32.0.16.2124), the Windows SDK validator passed all 18 targeted compute shaders. Twelve comparison pipelines were created. The six pipelines that returned 0x80070057 before the change now report shader requires wave64, host supports at most wave32. The release diagnostics build, focused PSV regression test, and asset policy check passed.

The six compute shaders still need a wave32 lowering that preserves shared-memory ordering. The breakpoint at the end of the recorded session and the scene's performance remain open.

**@⁠Castyan** on GitHub · 2026-11-25 18:29 UTC · [original](https://github.com/DexNom/VIctory/pull/16) `Castyan:diagnose-nvidia-wave32` → `main` · +316 −37 · 8 files · 6 commits · open ## Changes - Detect the D3D12 adapter's maximum wave width in `victory translate --pipelines` so the offline translator uses the detected width by default. Explicit overrides still work. - Read the fixed wave size from the emitted DXIL and report an unsupported width before asking D3D12 to build the compute pipeline. - Log the selected adapter and PCI IDs in the runtime, and document the RTX 5060 results. ## Validation On RTX 5060 (driver 32.0.16.2124), the Windows SDK validator passed all 18 targeted compute shaders. Twelve comparison pipelines were created. The six pipelines that returned `0x80070057` before the change now report `shader requires wave64, host supports at most wave32`. The release diagnostics build, focused PSV regression test, and asset policy check passed. The six compute shaders still need a wave32 lowering that preserves shared-memory ordering. The breakpoint at the end of the recorded session and the scene's performance remain open.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:31:48 +00:00
Author
Owner

@⁠molodayamama on GitHub · 2026-11-25 18:53 UTC · original

Verified on NVIDIA GeForce RTX 4060 8 GB (Ada, wave32) / AMD Ryzen 5 5600 / Windows 10 22H2 (19045.5794) / Rust 1.98.1 (x86_64-pc-windows-msvc):

  • Clean merge with current main (2e01ab4)
  • cargo test --locked -p xtask: 4 passed, 0 failed (196 files ok)
  • cargo clippy --workspace --all-targets --locked -- -D warnings (default & --all-features): 0 warnings
  • Hardware D3D12 tests on RTX 4060 (with Agility SDK 1.614.1 via #12 for Windows 10 SM 6.6; no game files):
    • emit::container::tests::fixed_wave_size_requires_matching_lanes_in_complete_runtime_info: passed
    • emit::wave64_tests: 7 passed, 0 failed
    • cargo test --locked -p victory-gpu --lib: 188 passed, 0 failed
**@⁠molodayamama** on GitHub · 2026-11-25 18:53 UTC · [original](https://github.com/DexNom/VIctory/pull/16#issuecomment-7171554003) Verified on **NVIDIA GeForce RTX 4060 8 GB (Ada, wave32)** / AMD Ryzen 5 5600 / Windows 10 22H2 (`19045.5794`) / Rust `1.98.1` (`x86_64-pc-windows-msvc`): - Clean merge with current `main` (`2e01ab4`) - `cargo test --locked -p xtask`: **4 passed, 0 failed** (`196 files ok`) - `cargo clippy --workspace --all-targets --locked -- -D warnings` (default & `--all-features`): **0 warnings** - Hardware D3D12 tests on RTX 4060 (with Agility SDK `1.614.1` via #12 for Windows 10 SM 6.6; no game files): - `emit::container::tests::fixed_wave_size_requires_matching_lanes_in_complete_runtime_info`: **passed** - `emit::wave64_tests`: **7 passed, 0 failed** - `cargo test --locked -p victory-gpu --lib`: **188 passed, 0 failed**
Author
Owner

@⁠Castyan on GitHub · 2026-11-25 19:23 UTC · original

Thanks @⁠molodayamama for the independent RTX 4060 validation. I also tested the exact PR commit (1ae3b85, release with diagnostics) in game on an RTX 5060, driver 32.0.16.2124, with the Series X profile and experimental RT off. This run used copied save data and a separate, effectively cold pipeline cache. Both upload switches were set before launch.

  • The startup log identified the RTX 5060 (10de:2d05) and reported host wave lanes min=32 max=32.
  • During intro loading, the new runtime check reported required=64 max=32 for 02384a60fda6f2d0, 369cbe906ea72764, and 2da4beb386509b77. The game kept rendering after all three refusals.
  • The title later exited with 0xc0000005 during intro prestreaming, about 2 min 21 s after launch. It attempted a null write at image offset +0x23cf683, with the next two image-relative stack entries at +0x2215c35 and +0x2215eca. These match an earlier run on 2e01ab4. There was no DXGI device removal in this run.

This confirms the adapter and wave-size diagnostics in game. The wave32 lowering and the recurring title crash remain open. The cold-cache run does not establish a performance change or a causal link between the skipped compute dispatches and the crash.

**@⁠Castyan** on GitHub · 2026-11-25 19:23 UTC · [original](https://github.com/DexNom/VIctory/pull/16#issuecomment-7172217681) Thanks @⁠molodayamama for the independent RTX 4060 validation. I also tested the exact PR commit (`1ae3b85`, release with diagnostics) in game on an RTX 5060, driver `32.0.16.2124`, with the Series X profile and experimental RT off. This run used copied save data and a separate, effectively cold pipeline cache. Both upload switches were set before launch. - The startup log identified the RTX 5060 (`10de:2d05`) and reported `host wave lanes min=32 max=32`. - During intro loading, the new runtime check reported `required=64 max=32` for `02384a60fda6f2d0`, `369cbe906ea72764`, and `2da4beb386509b77`. The game kept rendering after all three refusals. - The title later exited with `0xc0000005` during intro prestreaming, about 2 min 21 s after launch. It attempted a null write at image offset `+0x23cf683`, with the next two image-relative stack entries at `+0x2215c35` and `+0x2215eca`. These match an earlier run on `2e01ab4`. There was no DXGI device removal in this run. This confirms the adapter and wave-size diagnostics in game. The wave32 lowering and the recurring title crash remain open. The cold-cache run does not establish a performance change or a causal link between the skipped compute dispatches and the crash.
Author
Owner

@⁠Castyan on GitHub · 2026-11-25 19:53 UTC · original

Final RTX 5060 integration update for commit e7c90ca. The build combining #1, #7, #9, #12, and #16 reached the introduction and crashed about 13 min 18 s after launch, during intro prestreaming (frame 1260).

  • The unhandled breakpoint was 0x80000003 at +0x63966f. The next four title-image stack offsets match the earlier run on 2e01ab4.
  • The log reported all six known wave64 pipeline refusals and no DXGI device removal. The earlier 0xc0000005 null write did not recur in this run.

The breakpoint trigger remains unverified. This combined run cannot isolate the effect of any single PR.

**@⁠Castyan** on GitHub · 2026-11-25 19:53 UTC · [original](https://github.com/DexNom/VIctory/pull/16#issuecomment-7172905828) Final RTX 5060 integration update for commit `e7c90ca`. The build combining #1, #7, #9, #12, and #16 reached the introduction and crashed about **13 min 18 s** after launch, during intro prestreaming (frame 1260). - The unhandled breakpoint was `0x80000003` at `+0x63966f`. The next four title-image stack offsets match the earlier run on `2e01ab4`. - The log reported all six known wave64 pipeline refusals and no DXGI device removal. The earlier `0xc0000005` null write did not recur in this run. The breakpoint trigger remains unverified. This combined run cannot isolate the effect of any single PR.
Author
Owner

@⁠Castyan on GitHub · 2026-11-25 20:15 UTC · original

RTX 5060 retest: reached interactive gameplay

Tested on Windows 11 build 26300.9974, NVIDIA driver 32.0.16.2124, Series X profile, system D3D12, and release with diagnostics. Both runs used copied saves, VICTORY_LOG=info, VICTORY_FILL_WORKERS=4, and VICTORY_PARALLEL_PRELUDES=1, with experimental RT and GPU detiling off. The integration included #1 (a902405), #7 (3ac8713), #9 (83e78b9), #12 (999fd75), and #16.

Run Pipeline library at startup / base wait Result
Reference integration 98c516d 172.6 MB / 12,000 ms 0x80000003 at +0x5149aec after 6m48s, intro prestreaming at frame 1944, INSTANCE_LIST=45000/45000.
Corrected integration 00b26e5, including 6b5a888 208.8 MB / 500 ms Reached interactive gameplay. The movement and camera prompts were visible at 10m44s. The tester deliberately closed the window at 10m53s and the runtime exited with code 0 after the suspend timeout.

For samples with at least 500 draws, the median was 2,768.4 ms/frame for the reference (36 samples) and 570.9 ms/frame for the corrected run (89 samples). The last three samples in the corrected run were 249–290 ms/frame at about 5,000 draws. The cache sizes and base waits differed, so the numbers describe the two tested configurations. The corrected run ended before the breakpoint that ended the older trace run at 13m18s, and this is one successful gameplay session.

Change and verification

  • 6b5a888 charges the loading allowance once per frame. Sequential waits share one base allowance, overlapping waits count once in shared-window mode, and an outstanding wait is still counted when the next frame starts. This follows the accounting issue reported in the discussion of #7. The focused suite passed 10/10 on #16 alone and 12/12 with the integration, including #7's Present ceiling and the new regressions.
  • The two runs added wave64 hashes 6b82bc7d22016cb5 and 926c46bab3b86bd6 to the six already recorded. An offline check validated all nine DXIL containers, and the control created its pipeline. The eight wave64 pipelines remain outside the RTX 5060's 32..=32 range.
  • The reference showed the same full pool and breakpoint family as the upstream pool report. The corrected run logged no title exception or DXGI device removal before deliberate closure. The source of pool exhaustion remains unverified.

Recorded results and settings

**@⁠Castyan** on GitHub · 2026-11-25 20:15 UTC · [original](https://github.com/DexNom/VIctory/pull/16#issuecomment-7173412644) ## RTX 5060 retest: reached interactive gameplay Tested on Windows 11 build 26300.9974, NVIDIA driver 32.0.16.2124, Series X profile, system D3D12, and release with diagnostics. Both runs used copied saves, `VICTORY_LOG=info`, `VICTORY_FILL_WORKERS=4`, and `VICTORY_PARALLEL_PRELUDES=1`, with experimental RT and GPU detiling off. The integration included #1 (`a902405`), #7 (`3ac8713`), #9 (`83e78b9`), #12 (`999fd75`), and #16. | Run | Pipeline library at startup / base wait | Result | | --- | --- | --- | | Reference integration `98c516d` | 172.6 MB / 12,000 ms | `0x80000003` at `+0x5149aec` after 6m48s, intro prestreaming at frame 1944, `INSTANCE_LIST=45000/45000`. | | Corrected integration `00b26e5`, including `6b5a888` | 208.8 MB / 500 ms | Reached interactive gameplay. The movement and camera prompts were visible at 10m44s. The tester deliberately closed the window at 10m53s and the runtime exited with code `0` after the suspend timeout. | For samples with at least 500 draws, the median was 2,768.4 ms/frame for the reference (36 samples) and 570.9 ms/frame for the corrected run (89 samples). The last three samples in the corrected run were 249–290 ms/frame at about 5,000 draws. The cache sizes and base waits differed, so the numbers describe the two tested configurations. The corrected run ended before the breakpoint that ended the older trace run at 13m18s, and this is one successful gameplay session. ### Change and verification - `6b5a888` charges the loading allowance once per frame. Sequential waits share one base allowance, overlapping waits count once in shared-window mode, and an outstanding wait is still counted when the next frame starts. This follows the accounting issue reported in [the discussion of #7](https://git.gtahub.st/github/DexNom--VIctory/pulls/7). The focused suite passed **10/10** on #16 alone and **12/12** with the integration, including #7's Present ceiling and the new regressions. - The two runs added wave64 hashes `6b82bc7d22016cb5` and `926c46bab3b86bd6` to the six already recorded. An offline check validated all nine DXIL containers, and the control created its pipeline. The eight wave64 pipelines remain outside the RTX 5060's `32..=32` range. - The reference showed the same full pool and breakpoint family as [the upstream pool report](https://github.com/Marvisak/VIctory/issues/698). The corrected run logged no title exception or DXGI device removal before deliberate closure. The source of pool exhaustion remains unverified. [Recorded results and settings](https://github.com/Castyan/VIctory/blob/6da1f12/docs/nvidia-rtx5060.md)
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host.rs
  • crates/victory-gpu/src/pipeline/make.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/16/head:github-bot/gh-16'
git switch 'github-bot/gh-16'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-16'
git switch 'github-bot/gh-16'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-16'
git switch 'github-bot/gh-16'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-16'
git switch 'main'
git merge --squash 'github-bot/gh-16'
git switch 'main'
git merge --ff-only 'github-bot/gh-16'
git switch 'main'
git merge 'github-bot/gh-16'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.