Integrate GPU stability, shader correctness, and submission improvements #932

Open
tototomate123 wants to merge 44 commits from upstream-pr/933 into main
tototomate123 commented 2026-11-25 13:09:46 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by tototomate123 on 2026-11-25T13:09:46Z.


Early review request

Should this land as one integration PR, or would a smaller D3D12 stability and shader correctness batch be easier to review? The draft includes 19 source PRs with their original commits preserved. The latest build passed, and 426 tests passed on retry with 10 ignored. Broader performance validation and the live ray-tracing crash remain open. The ambient approximation stays off by default.

Scope

This integrates 14 open PR heads on top of 0b0074e and retains their original commits for review and attribution. #770 and #905 overlap parts of this work and were useful references.

The integration follow-up uses the descriptor snapshot approach from #792 in both scan paths, clamps CBVs before rounding, retains reserved resources named by alias barriers, and carries coherent compute store waits through IR. The lowering tests moved into a child module to keep the parent source within the repository file-size limit.

Validation

  • AMD Ryzen 7 5800X3D, RTX 4070 SUPER, Windows, Xbox Series X profile
  • cargo test --profile diag -p victory-shader -p victory-gpu --lib --features victory-gpu/diagnostics -- --test-threads=1 gave 417 passed and 10 ignored. The final tree also built with cargo build --profile diag -p victory --features diagnostics.
  • The baseline and integrated defaults reached the opening 3D cutscene. In intervals with 2,500–4,500 draws/frame, the median frame time was 455.7 ms on upstream (17 intervals) and 376.5 ms on the integration (10 intervals). Median copy-back was 162.7 and 175.7 ms respectively. These are draw-band comparisons across single runs with different scenes and cache warmth.
  • Experimental builder run with VICTORY_BVH_BUILDER=1, VICTORY_BVH_QUARANTINE=0, VICTORY_COPY_PLAIN=1, VICTORY_ASYNC_SUBMIT=1, VICTORY_QUEUE2=1 and VICTORY_WIDE_TEXTURES=1 created all 53 builder pipelines, then crashed during 3D entry.
  • The builder-only run reproduced the access violation after all 53 pipelines were created. The builder remains opt-in. A working first-room lighting comparison and controlled switch benchmarks remain open, so this is a draft.

Follow-up batch

Added #925 (exact copy-back scanning and scratch reuse), #919 and #934 (shader correctness), #871 (oversized mesh-pair specialization and device-removal handling), and #917 (opt-in ambient approximation). The PR now incorporates 19 source PRs.

The diagnostics build and asset policy passed. The serial GPU and shader suites passed on retry with 426 passed and 10 ignored. The initial run exited with an access violation in the profiler stack-walk test.

Both ambient configurations reached the opening 3D cutscene. The log confirmed the approximation at 0.6. In the nighttime arrest sequence, the override produced blown-out skin and retained black facial shadows. With the override off on the same build, the skin retained detail and one face was visibly lit, while the other still had dark shadows. Ambient stays off by default. This was a visual smoke test of nearby shots, and it establishes neither a first-room lighting fix nor a performance gain.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6605229695 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/933). Originally posted by [tototomate123](https://github.com/tototomate123) on 2026-11-25T13:09:46Z. --- ## Early review request Should this land as one integration PR, or would a smaller D3D12 stability and shader correctness batch be easier to review? The draft includes 19 source PRs with their original commits preserved. The latest build passed, and 426 tests passed on retry with 10 ignored. Broader performance validation and the live ray-tracing crash remain open. The ambient approximation stays off by default. ## Scope This integrates 14 open PR heads on top of `0b0074e` and retains their original commits for review and attribution. #770 and #905 overlap parts of this work and were useful references. - Ray tracing and shader correctness · #156, #213, #858, #907, #914, #916 - D3D12 stability and descriptor/texture freshness · #787, #795, #807, #896, #899, #908, #911 - Opt-in parallel submission texture checks · #768 The integration follow-up uses the descriptor snapshot approach from #792 in both scan paths, clamps CBVs before rounding, retains reserved resources named by alias barriers, and carries coherent compute store waits through IR. The lowering tests moved into a child module to keep the parent source within the repository file-size limit. ## Validation - AMD Ryzen 7 5800X3D, RTX 4070 SUPER, Windows, Xbox Series X profile - `cargo test --profile diag -p victory-shader -p victory-gpu --lib --features victory-gpu/diagnostics -- --test-threads=1` gave 417 passed and 10 ignored. The final tree also built with `cargo build --profile diag -p victory --features diagnostics`. - The baseline and integrated defaults reached the opening 3D cutscene. In intervals with 2,500–4,500 draws/frame, the median frame time was 455.7 ms on upstream (17 intervals) and 376.5 ms on the integration (10 intervals). Median copy-back was 162.7 and 175.7 ms respectively. These are draw-band comparisons across single runs with different scenes and cache warmth. - Experimental builder run with `VICTORY_BVH_BUILDER=1`, `VICTORY_BVH_QUARANTINE=0`, `VICTORY_COPY_PLAIN=1`, `VICTORY_ASYNC_SUBMIT=1`, `VICTORY_QUEUE2=1` and `VICTORY_WIDE_TEXTURES=1` created all 53 builder pipelines, then crashed during 3D entry. - The builder-only run reproduced the access violation after all 53 pipelines were created. The builder remains opt-in. A working first-room lighting comparison and controlled switch benchmarks remain open, so this is a draft. ## Follow-up batch Added #925 (exact copy-back scanning and scratch reuse), #919 and #934 (shader correctness), #871 (oversized mesh-pair specialization and device-removal handling), and #917 (opt-in ambient approximation). The PR now incorporates 19 source PRs. The diagnostics build and asset policy passed. The serial GPU and shader suites passed on retry with 426 passed and 10 ignored. The initial run exited with an access violation in the profiler stack-walk test. Both ambient configurations reached the opening 3D cutscene. The log confirmed the approximation at 0.6. In the nighttime arrest sequence, the override produced blown-out skin and retained black facial shadows. With the override off on the same build, the skin retained detail and one face was visibly lit, while the other still had dark shadows. Ambient stays off by default. This was a visual smoke test of nearby shots, and it establishes neither a first-room lighting fix nor a performance gain.
tototomate123 commented 2026-11-25 14:10:50 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by tototomate123 on 2026-11-25T13:31:41Z.


Hey @fxceless, would you be open to an early scope review of this draft? It integrates 19 source PRs, and I’d like your take on whether a combined PR is useful or whether you’d rather see a smaller first batch focused on D3D12 stability and shader correctness.

The build passed and 426 tests passed on retry, with 10 ignored. The performance result is still preliminary. Live ray tracing still crashes on our Series X test, and the ambient approximation looked worse in the tested cutscene, so it stays off by default. Feedback on the shape of the PR would be especially helpful before I mark it ready.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7163905787 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/933#issuecomment-7163905787). Originally posted by [tototomate123](https://github.com/tototomate123) on 2026-11-25T13:31:41Z. --- Hey @fxceless, would you be open to an early scope review of this draft? It integrates 19 source PRs, and I’d like your take on whether a combined PR is useful or whether you’d rather see a smaller first batch focused on D3D12 stability and shader correctness. The build passed and 426 tests passed on retry, with 10 ignored. The performance result is still preliminary. Live ray tracing still crashes on our Series X test, and the ambient approximation looked worse in the tested cutscene, so it stays off by default. Feedback on the shape of the PR would be especially helpful before I mark it ready.
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/933:upstream-pr/933'
git switch 'upstream-pr/933'

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/933'
git switch 'upstream-pr/933'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/933'
git switch 'upstream-pr/933'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/933'
git switch 'main'
git merge --squash 'upstream-pr/933'
git switch 'main'
git merge --ff-only 'upstream-pr/933'
git switch 'main'
git merge 'upstream-pr/933'
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
fxceless/victory-fork!932
No description provided.