[BUNDLE] Ray tracing on 32-lane GPUs + 46 shader programs: #156, #213, #203 on main, verified together #487

Open
pepezin-ai wants to merge 6 commits from upstream-pr/487 into main
pepezin-ai commented 2026-11-25 01:26:44 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by pepezin-ai on 2026-11-25T01:26:44Z.


What

The three open PRs below, merged onto main @ a803c87 and run together on a 32-lane NVIDIA card:

  • #156 (@sedzz): ray-tracing shadow traces and the full structure builder translate on 32-lane GPUs (VICTORY_HOST_WAVE=32)
  • #213 (@Pablo-Barros): a child that is not there is a miss, whatever its box
  • #203 (@triippywhale): sizes of unused descriptors, paired f16 interpolation halves, 16-bit wave sums with lanes gone (+46 programs)

Each PR keeps its own commits and author; this branch only adds the merges.

Conflict resolved

#156 against current main conflicts in one place, the pub use shader::{...} list in crates/victory-shader/src/emit/mod.rs: main added view_heap_limit, #156 added SLOT_ADDRESSES and SLOT_STRIDES_DWORDS. The merge keeps all of them; nothing else in the file differs from main.

Verified

Windows 11, AMD Ryzen 7 5700X (8C/16T), 32 GB DDR4-3200, NVIDIA RTX 5070 12 GB, Series X profile, release build, VICTORY_HOST_WAVE=32, AnyXboxX tuned settings (LATE_WAIT=3, WIDE_BACK=1, CARD_BUFFERS_MB=1024, loop limit 256).

  • cargo build --release: ok. cargo test --workspace -- --test-threads=1: 506 passed, 0 failed. (With parallel test threads the victory-gpu lib tests once stopped with STATUS_ACCESS_VIOLATION; run one at a time, all 112 pass on this branch and on plain main, so it looks like a race between tests rather than these PRs.)
  • In the game: the first gameplay scene renders with characters (skin and hair coloured), textures, sunlight, cast shadows on walls and the area outside with people; HUD prompts and pad input work. 2.3 fps average in the world (max 3.8) over 56 frame lines, no device loss.
  • Also on this machine: with the Series S profile the picture stays black (as #188 describes); with Series X it renders. Without the R9G9B9E5 stand-in (#32) the GPU was lost on entering the world on this card; main @ a803c87 already carries a form of it.

No game files, logs with paths, or personal data in this PR.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6594991276 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/487). Originally posted by [pepezin-ai](https://github.com/pepezin-ai) on 2026-11-25T01:26:44Z. --- ## What The three open PRs below, merged onto `main` @ a803c87 and run together on a 32-lane NVIDIA card: - #156 (@sedzz): ray-tracing shadow traces and the full structure builder translate on 32-lane GPUs (`VICTORY_HOST_WAVE=32`) - #213 (@Pablo-Barros): a child that is not there is a miss, whatever its box - #203 (@triippywhale): sizes of unused descriptors, paired f16 interpolation halves, 16-bit wave sums with lanes gone (+46 programs) Each PR keeps its own commits and author; this branch only adds the merges. ## Conflict resolved #156 against current `main` conflicts in one place, the `pub use shader::{...}` list in `crates/victory-shader/src/emit/mod.rs`: `main` added `view_heap_limit`, #156 added `SLOT_ADDRESSES` and `SLOT_STRIDES_DWORDS`. The merge keeps all of them; nothing else in the file differs from `main`. ## Verified Windows 11, AMD Ryzen 7 5700X (8C/16T), 32 GB DDR4-3200, NVIDIA RTX 5070 12 GB, Series X profile, release build, `VICTORY_HOST_WAVE=32`, AnyXboxX tuned settings (`LATE_WAIT=3`, `WIDE_BACK=1`, `CARD_BUFFERS_MB=1024`, loop limit 256). - `cargo build --release`: ok. `cargo test --workspace -- --test-threads=1`: 506 passed, 0 failed. (With parallel test threads the `victory-gpu` lib tests once stopped with STATUS_ACCESS_VIOLATION; run one at a time, all 112 pass on this branch and on plain `main`, so it looks like a race between tests rather than these PRs.) - In the game: the first gameplay scene renders with characters (skin and hair coloured), textures, sunlight, cast shadows on walls and the area outside with people; HUD prompts and pad input work. 2.3 fps average in the world (max 3.8) over 56 frame lines, no device loss. - Also on this machine: with the Series S profile the picture stays black (as #188 describes); with Series X it renders. Without the R9G9B9E5 stand-in (#32) the GPU was lost on entering the world on this card; `main` @ a803c87 already carries a form of it. No game files, logs with paths, or personal data in this PR.
Curry-976 commented 2026-11-25 06:06:40 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Curry-976 on 2026-11-25T05:53:08Z.


Test report for this bundle's head f1475073e053413e66ceb44fa90abd7fc8632b50 on a 6 GB laptop GPU with 32-lane waves. I ran it three times with the same settings: with the structure builder on, with it on and quarantined, and with it off. The builder starts on this card, and then the title crashes. With quarantine it still crashes. Without the builder, the run holds.

Machine

  • NVIDIA GeForce RTX 4050 Laptop GPU, 6 GB (driver 32.0.16.1742), Intel Core i5-12450HX, 24 GB RAM, Windows 11 26300, Series X profile.
  • cargo build --release -p victory on this head; the test suite was not run.
  • Common settings: VICTORY_HOST_WAVE=32 VICTORY_RELAY=2.

Results

Run Builder settings Result
1 VICTORY_BVH_BUILDER=1 the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53; the title crashes (0xC0000005) 16 s later
2 VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=1 builder runs (same line); the title crashes (0xC0000005) 39 s later
3 builder off no exception, no crash, over 5 min in the world (opening cutscene into the prologue)

Run 1: first-chance exceptions in the title's own code just before the crash:

  • title+0x4684e7 (repeated, several threads), reading 0xffffffffffffffff, 0x7c0601a093e4 (nothing mapped) and 0x7fd3b0000 (reserved, never committed)
  • title+0x4e9d800, title+0x52ecfd9 and title+0x8f92a, as well as VCRUNTIME140.dll+0x11297 and +0x10d7b
  • one faulting register holds 0x7c00f95afc0050ae

The title then ran its crash reporter; the layer blocked the upload. Four compute pipelines were refused by the driver with E_INVALIDARG earlier in the run. The title reported memory load at 99 % at the crash.

My guess: 0x7c00 is the half-float infinity, so this looks like #16. Box bounds written by the builder get read as pointers by the CPU side. I did not check this in the code.

Run 2 (quarantine): the exceptions move to title+0x47de5, again reading 0xffffffffffffffff, and the 0x7c00 pattern does not appear. In the last frame line before the crash, preparing rose to 8994 ms with copies of 1541 MB per frame; that frame took 10726 ms, with 4881 draws. So quarantine delays the crash, but it does not prevent it on this card.

Run 3 (control): 0.3 to 2.9 fps. The slow frames (1–3.3 s) come from texture preparation when new areas load. Once a scene settles, frames take 345–475 ms at about 5,200 draws, of which roughly 300 ms is copying back and 120–240 ms is GPU time. Lighting on faces and skin in the cutscenes is clearly better than on main 310c6eb on this machine. Since the builder is off, this comes from #203 and/or #156. Shadowed areas are still dark. Peak private memory was 19 GB, with about 1 GB of physical RAM left.

Not tested

  • The test suite on this head.
  • The builder with VICTORY_BVH_SKIP or other diagnostics.
  • Other GPUs.
  • Whether the crash depends on the scene: all three runs went through the same opening.

AI use

  • Claude Code (Claude Opus 5.5) ran the commands above on this machine, read the logs and wrote this report. No game files, logs with paths or personal data are attached.
<!-- greyfinch-sync:fxceless/victory-fork:comment:7154231449 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/487#issuecomment-7154231449). Originally posted by [Curry-976](https://github.com/Curry-976) on 2026-11-25T05:53:08Z. --- Test report for this bundle's head `f1475073e053413e66ceb44fa90abd7fc8632b50` on a 6 GB laptop GPU with 32-lane waves. I ran it three times with the same settings: with the structure builder on, with it on and quarantined, and with it off. The builder starts on this card, and then the title crashes. With quarantine it still crashes. Without the builder, the run holds. **Machine** - NVIDIA GeForce RTX 4050 Laptop GPU, 6 GB (driver 32.0.16.1742), Intel Core i5-12450HX, 24 GB RAM, Windows 11 26300, Series X profile. - `cargo build --release -p victory` on this head; the test suite was not run. - Common settings: `VICTORY_HOST_WAVE=32 VICTORY_RELAY=2`. **Results** | Run | Builder settings | Result | |---|---|---| | 1 | `VICTORY_BVH_BUILDER=1` | `the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53`; the title crashes (0xC0000005) **16 s later** | | 2 | `VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=1` | builder runs (same line); the title crashes (0xC0000005) **39 s later** | | 3 | builder off | no exception, no crash, over 5 min in the world (opening cutscene into the prologue) | **Run 1:** first-chance exceptions in the title's own code just before the crash: - `title+0x4684e7` (repeated, several threads), reading `0xffffffffffffffff`, `0x7c0601a093e4` (nothing mapped) and `0x7fd3b0000` (reserved, never committed) - `title+0x4e9d800`, `title+0x52ecfd9` and `title+0x8f92a`, as well as `VCRUNTIME140.dll+0x11297` and `+0x10d7b` - one faulting register holds `0x7c00f95afc0050ae` The title then ran its crash reporter; the layer blocked the upload. Four compute pipelines were refused by the driver with `E_INVALIDARG` earlier in the run. The title reported memory load at 99 % at the crash. My guess: `0x7c00` is the half-float infinity, so this looks like #16. Box bounds written by the builder get read as pointers by the CPU side. I did not check this in the code. **Run 2 (quarantine):** the exceptions move to `title+0x47de5`, again reading `0xffffffffffffffff`, and the `0x7c00` pattern does not appear. In the last frame line before the crash, `preparing` rose to 8994 ms with copies of 1541 MB per frame; that frame took 10726 ms, with 4881 draws. So quarantine delays the crash, but it does not prevent it on this card. **Run 3 (control):** 0.3 to 2.9 fps. The slow frames (1–3.3 s) come from texture preparation when new areas load. Once a scene settles, frames take 345–475 ms at about 5,200 draws, of which roughly 300 ms is copying back and 120–240 ms is GPU time. Lighting on faces and skin in the cutscenes is clearly better than on `main` `310c6eb` on this machine. Since the builder is off, this comes from #203 and/or #156. Shadowed areas are still dark. Peak private memory was 19 GB, with about 1 GB of physical RAM left. **Not tested** - The test suite on this head. - The builder with `VICTORY_BVH_SKIP` or other diagnostics. - Other GPUs. - Whether the crash depends on the scene: all three runs went through the same opening. **AI use** - Claude Code (Claude Opus 5.5) ran the commands above on this machine, read the logs and wrote this report. No game files, logs with paths or personal data are attached.
loftymocha commented 2026-11-25 09:08:48 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by loftymocha on 2026-11-25T08:18:56Z.


Heads-up: as of fork main 9376fd6, this PR no longer merges cleanly. git merge stops on a conflict in crates/victory-shader/src/emit/lower.rs (emit/mod.rs auto-merges). Curry-976 also reported in #16 that it conflicts with #36 and #646.

I wanted to check it offline on an RTX 5070 (32-lane) against the title's shader pack. The interest is the five shadowmask:CS_TraceShadowRays_* programs, which still fail on 9376fd6 with a descriptor read only as data when translated as a 32-lane host. If you rebase it, I can post the before/after counts of the failing programs (hashes and reasons only, no game data).

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7156873357 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/487#issuecomment-7156873357). Originally posted by [loftymocha](https://github.com/loftymocha) on 2026-11-25T08:18:56Z. --- Heads-up: as of fork `main` `9376fd6`, this PR no longer merges cleanly. `git merge` stops on a conflict in `crates/victory-shader/src/emit/lower.rs` (`emit/mod.rs` auto-merges). Curry-976 also reported in #16 that it conflicts with #36 and #646. I wanted to check it offline on an RTX 5070 (32-lane) against the title's shader pack. The interest is the five `shadowmask:CS_TraceShadowRays_*` programs, which still fail on `9376fd6` with `a descriptor read only as data` when translated as a 32-lane host. If you rebase it, I can post the before/after counts of the failing programs (hashes and reasons only, no game data). _AI-assisted (Claude Code, Claude Opus 5.5)._
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/487:upstream-pr/487'
git switch 'upstream-pr/487'

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