shader: let the ray structure builder run on 32-lane GPUs (NVIDIA) #35

Open
github-bot wants to merge 4 commits from github-bot/gh-35 into main AGit
Owner

@⁠pr0vId3nce on GitHub · 2026-11-25 20:03 UTC · original
pr0vId3nce:builder-32-lane → main · +507 −58 · 7 files · 4 commits · open

--rt cannot start the structure builder on a card whose waves are 32 lanes (the block reported in #14 and #15): five of its 52 programs get no host pipeline there, and its stages run all or none. With this branch all 52 do on an RTX 4080, and in game the builder runs on that card: a ten-minute --rt run held to its time limit with no exception.

What stopped it (RTX 4080, host wave lanes min=32 max=32):

  1. Three programs do not translate: a first-lane read where not every lane runs (39321a95223001ed, 77360df21e12ea43, 9fc111d3be79364f in the runtime's log; the 512-thread prefix-sum passes). They fetch a running total with v_readfirstlane inside a loop; the total is the same in every lane of the console wave, but the proof of that (lane_uniform) did not see through a write under a lane guard, the wave number tid >> 6, an LDS read or a loop phi.
  2. The two passes over shipped structures (the Box32/16 rehydration kernels, dispatched by thread count) are refused by the driver: host pipeline refused … The parameter is incorrect. lower_with_thread_limit lets lanes past the count return at once and, for that, keeps the program one 64-lane wave, which a 32-lane card does not take.

The change.

  • emit/uniform.rs (new; lane_uniform moved out of lower.rs, which is 228 bytes under the 512 KiB policy limit on main and gets 2.3 KB back): the proof now also takes guarded writes over values already alike, tid >> 6 in groups whose x size is a multiple of 64, ds_read_b32 at an address alike in the wave, and phis whose predecessors are entered by all arriving lanes or none. This is the proof of fxceless/victory-fork PR #156 by sedzz with ryotdev's correction and test; I only moved it. It keeps that PR's marked shortcut: an LDS read is taken to see what the other host wave's read of the same instruction sees (the scan programs read after a barrier).
  • spill::thread_limited (new), used when the host's waves are 32 lanes: a compute program with a spilled user-data table gets the dispatch's thread count as one more parameter (the existing USER_DISPATCH_THREADS_X word, set by the host as it is today) and seven GFX10 instructions ahead of its code that AND its EXEC with "thread number < count". That is what the hardware's launch leaves in EXEC, so the program's own lane count, saved EXECs and scans that turn every lane on behave as on the console while the wave runs as two host waves that exchange their halves and every thread stays. On such a host this covers every builder program dispatched by thread count, not only the two that the early exit picks by digest; for a dispatch of whole groups the word is 0 and EXEC is left alone. Hosts with 64-lane waves keep the early exit unchanged; nothing in victory-gpu changes.

The cause (DispatchX's flag 0x20 counts threads) is Yorivel's finding in fxceless/victory-fork issue #16; PR #646 there (mynzjerko) has a predicated form for 32-lane hosts. The instruction-prologue form here is my own.

Relation to #22 (from reading its diff; I have not run it yet). #22 gives the two rehydration kernels a 32-lane form, which is point 2 above done another way. It does not touch the three prefix-sum programs of point 1, and with those untranslated the builder still stays off on a 32-lane card. In the shared half the two differ like this:

  • #22 ANDs "thread number < count" into every instruction guard and active-lane mask in the lowering, for the two kernels the early exit picks by digest. Lanes past the count never write a register.
  • This branch ANDs it into EXEC with instructions ahead of the program, for every compute program with a spilled user-data table. Lanes past the count are simply off in EXEC, so where the program turns every lane on (s_or_saveexec_b64 -1, as the console compiler's wave totals and prefix sums do) they compute as on the console.

Whether that difference shows in the builder I have not measured. #22 on top of the first two commits here is queued on the same card (its card test, the test below in its form, the builder list, in game), and I will post the comparison in #22. If #22 is preferred for point 2, the first two commits stand alone: they merge cleanly with it. The whole branch conflicts with #22 only where both append tests to wave64_tests.rs.

Tests (RTX 4080, driver 32.0.16.1088, Windows 11 26200; on 2e01ab4).

  • emit::uniform::tests::a_guarded_uniform_write_can_keep_different_values_in_each_lane (no device) fails on the first commit (old and new values are uniform) and passes on the second.
  • scans_in_a_partly_launched_group_count_the_launched_lanes_only fails on the third commit (the stub: the count's entry code is there) and passes on the fourth on the card: two groups of 64, counts 70, 100, 33, 1 and none, the console compiler's wave total and prefix sum with every lane turned on; all 256 dwords right, host waves of 32.
  • victory translate --validate --pipelines XboxBvhBuilder.dll with VICTORY_HOST_MAX_WAVE=32: 52 emitted of 52 compute programs; 52 validated, 52 pipelines. (On the previous base 921d8d3, main gave 49 emitted, 49 validated, 47 pipelines, and the first fix alone 52 validated, 50 pipelines.)
  • cargo test --no-fail-fast -p victory-shader: 239 passed, 0 failed, 4 ignored (the two new tests among them). cargo test --no-fail-fast -p victory-gpu (this branch does not touch the crate): 188 passed, 0 failed, 3 ignored.
  • cargo xtask policy passes on every commit (196 files). cargo clippy --workspace --all-targets --locked -- -D warnings, and the same with --all-features: clean. The registry test source_tests::every_shader_source_is_classified_by_path passes on every commit (the new file is listed).
  • Before the rebase onto 2e01ab4 (the same four commits on 921d8d3; the rebase had two one-line conflicts, the source list and one call), the scan test and the shader suite also ran on a Ryzen 9 7900X's iGPU (gfx1036, wave lanes 32..64), chosen with a local test-only patch that is not in this branch: the test passed in the 32-lane form, the suite gave 238 passed, 0 failed, 4 ignored, and at the iGPU's own 64 lanes main and the branch listed the same 52 builder pipelines.

In game (RTX 4080, Ryzen 9 7900X, 32 GB RAM; this branch on 2e01ab4; VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=0 VICTORY_ACTIVATE_RAYS=1 VICTORY_RT_RESOLVE=1, a checkpoint that opens with a cutscene and ends in a room with a window):

  • the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53 81 s in, then 608 s to the time limit: no exception, no device loss, no memory stop. About 170 world frames, 2.0 to 7.6 s each, median 2.8 s. Peak commit 45.1 GB.
  • Per frame at the end: 8.3 GB of title memory compared back after shader writes, 2,772 windows outside buffers (11.2 GB), 50 shaders touched pages that had no copy warnings over the run. That is where the frame time is, not in the builder's programs.
  • The picture: the yard and the room render complete with --rt; in the room the walls, the posters and the character's back are lit, with no tiles and no wash. I do not have a default-switches run of this same build to set beside it yet (it is queued, and I will add the pair as a comment). Against a default run of the previous base the --rt frame of the room is a little brighter in the shade (pixels under 16 of 255: 2.7% against 6.3%), which is not a like-for-like comparison.
  • On main the --rt switches leave the builder off on this card (the three programs above are logged as not translating).
  • On the previous base 921d8d3 the same commits started the builder too, but frames took 9 to 14 s and my runner's memory guard stopped both runs within four minutes; b8ff22e on main is what changed that.
  • Not this branch, but it shows at this frame rate: the first 25 or so world frames after the cut wash out to white, with default switches as well. At 3 s a frame that is over a minute of white before the scene appears.

Not tested: a 64-lane host in game (the iGPU ran only the card tests and the offline list); --rt beyond ten minutes or in another scene; #22 (above).

No game data: counts, hashes and log lines only.

AI-assisted (Claude Code); measured on my machine.

🤖 Generated with Claude Code

**@⁠pr0vId3nce** on GitHub · 2026-11-25 20:03 UTC · [original](https://github.com/DexNom/VIctory/pull/35) `pr0vId3nce:builder-32-lane` → `main` · +507 −58 · 7 files · 4 commits · open `--rt` cannot start the structure builder on a card whose waves are 32 lanes (the block reported in #14 and #15): five of its 52 programs get no host pipeline there, and its stages run all or none. With this branch all 52 do on an RTX 4080, and in game the builder runs on that card: a ten-minute `--rt` run held to its time limit with no exception. **What stopped it** (RTX 4080, `host wave lanes min=32 max=32`): 1. Three programs do not translate: `a first-lane read where not every lane runs` (`39321a95223001ed`, `77360df21e12ea43`, `9fc111d3be79364f` in the runtime's log; the 512-thread prefix-sum passes). They fetch a running total with `v_readfirstlane` inside a loop; the total is the same in every lane of the console wave, but the proof of that (`lane_uniform`) did not see through a write under a lane guard, the wave number `tid >> 6`, an LDS read or a loop phi. 2. The two passes over shipped structures (the Box32/16 rehydration kernels, dispatched by thread count) are refused by the driver: `host pipeline refused … The parameter is incorrect`. `lower_with_thread_limit` lets lanes past the count return at once and, for that, keeps the program one 64-lane wave, which a 32-lane card does not take. **The change.** - `emit/uniform.rs` (new; `lane_uniform` moved out of `lower.rs`, which is 228 bytes under the 512 KiB policy limit on `main` and gets 2.3 KB back): the proof now also takes guarded writes over values already alike, `tid >> 6` in groups whose x size is a multiple of 64, `ds_read_b32` at an address alike in the wave, and phis whose predecessors are entered by all arriving lanes or none. This is the proof of fxceless/victory-fork PR #156 by sedzz with ryotdev's correction and test; I only moved it. It keeps that PR's marked shortcut: an LDS read is taken to see what the other host wave's read of the same instruction sees (the scan programs read after a barrier). - `spill::thread_limited` (new), used when the host's waves are 32 lanes: a compute program with a spilled user-data table gets the dispatch's thread count as one more parameter (the existing `USER_DISPATCH_THREADS_X` word, set by the host as it is today) and seven GFX10 instructions ahead of its code that AND its EXEC with "thread number < count". That is what the hardware's launch leaves in EXEC, so the program's own lane count, saved EXECs and scans that turn every lane on behave as on the console while the wave runs as two host waves that exchange their halves and every thread stays. On such a host this covers every builder program dispatched by thread count, not only the two that the early exit picks by digest; for a dispatch of whole groups the word is 0 and EXEC is left alone. Hosts with 64-lane waves keep the early exit unchanged; nothing in `victory-gpu` changes. The cause (DispatchX's flag 0x20 counts threads) is Yorivel's finding in fxceless/victory-fork issue #16; PR #646 there (mynzjerko) has a predicated form for 32-lane hosts. The instruction-prologue form here is my own. **Relation to #22** (from reading its diff; I have not run it yet). #22 gives the two rehydration kernels a 32-lane form, which is point 2 above done another way. It does not touch the three prefix-sum programs of point 1, and with those untranslated the builder still stays off on a 32-lane card. In the shared half the two differ like this: - #22 ANDs "thread number < count" into every instruction guard and active-lane mask in the lowering, for the two kernels the early exit picks by digest. Lanes past the count never write a register. - This branch ANDs it into EXEC with instructions ahead of the program, for every compute program with a spilled user-data table. Lanes past the count are simply off in EXEC, so where the program turns every lane on (`s_or_saveexec_b64 -1`, as the console compiler's wave totals and prefix sums do) they compute as on the console. Whether that difference shows in the builder I have not measured. #22 on top of the first two commits here is queued on the same card (its card test, the test below in its form, the builder list, in game), and I will post the comparison in #22. If #22 is preferred for point 2, the first two commits stand alone: they merge cleanly with it. The whole branch conflicts with #22 only where both append tests to `wave64_tests.rs`. **Tests** (RTX 4080, driver 32.0.16.1088, Windows 11 26200; on `2e01ab4`). - `emit::uniform::tests::a_guarded_uniform_write_can_keep_different_values_in_each_lane` (no device) fails on the first commit (`old and new values are uniform`) and passes on the second. - `scans_in_a_partly_launched_group_count_the_launched_lanes_only` fails on the third commit (the stub: `the count's entry code is there`) and passes on the fourth on the card: two groups of 64, counts 70, 100, 33, 1 and none, the console compiler's wave total and prefix sum with every lane turned on; all 256 dwords right, host waves of 32. - `victory translate --validate --pipelines XboxBvhBuilder.dll` with `VICTORY_HOST_MAX_WAVE=32`: `52 emitted of 52 compute programs; 52 validated, 52 pipelines`. (On the previous base `921d8d3`, `main` gave 49 emitted, 49 validated, 47 pipelines, and the first fix alone 52 validated, 50 pipelines.) - `cargo test --no-fail-fast -p victory-shader`: 239 passed, 0 failed, 4 ignored (the two new tests among them). `cargo test --no-fail-fast -p victory-gpu` (this branch does not touch the crate): 188 passed, 0 failed, 3 ignored. - `cargo xtask policy` passes on every commit (196 files). `cargo clippy --workspace --all-targets --locked -- -D warnings`, and the same with `--all-features`: clean. The registry test `source_tests::every_shader_source_is_classified_by_path` passes on every commit (the new file is listed). - Before the rebase onto `2e01ab4` (the same four commits on `921d8d3`; the rebase had two one-line conflicts, the source list and one call), the scan test and the shader suite also ran on a Ryzen 9 7900X's iGPU (gfx1036, wave lanes 32..64), chosen with a local test-only patch that is not in this branch: the test passed in the 32-lane form, the suite gave 238 passed, 0 failed, 4 ignored, and at the iGPU's own 64 lanes `main` and the branch listed the same 52 builder pipelines. **In game** (RTX 4080, Ryzen 9 7900X, 32 GB RAM; this branch on `2e01ab4`; `VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=0 VICTORY_ACTIVATE_RAYS=1 VICTORY_RT_RESOLVE=1`, a checkpoint that opens with a cutscene and ends in a room with a window): - `the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53` 81 s in, then 608 s to the time limit: no exception, no device loss, no memory stop. About 170 world frames, 2.0 to 7.6 s each, median 2.8 s. Peak commit 45.1 GB. - Per frame at the end: 8.3 GB of title memory compared back after shader writes, 2,772 windows outside buffers (11.2 GB), 50 `shaders touched pages that had no copy` warnings over the run. That is where the frame time is, not in the builder's programs. - The picture: the yard and the room render complete with `--rt`; in the room the walls, the posters and the character's back are lit, with no tiles and no wash. I do not have a default-switches run of this same build to set beside it yet (it is queued, and I will add the pair as a comment). Against a default run of the previous base the `--rt` frame of the room is a little brighter in the shade (pixels under 16 of 255: 2.7% against 6.3%), which is not a like-for-like comparison. - On `main` the `--rt` switches leave the builder off on this card (the three programs above are logged as not translating). - On the previous base `921d8d3` the same commits started the builder too, but frames took 9 to 14 s and my runner's memory guard stopped both runs within four minutes; `b8ff22e` on `main` is what changed that. - Not this branch, but it shows at this frame rate: the first 25 or so world frames after the cut wash out to white, with default switches as well. At 3 s a frame that is over a minute of white before the scene appears. **Not tested:** a 64-lane host in game (the iGPU ran only the card tests and the offline list); `--rt` beyond ten minutes or in another scene; #22 (above). No game data: counts, hashes and log lines only. _AI-assisted (Claude Code); measured on my machine._ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
lane_uniform moves from lower.rs into emit/uniform.rs unchanged (lower.rs is
350 bytes under the 512 KiB policy limit), with a test of what the structure
builder's prefix-sum passes need on a host of 32-lane waves: a value written
under a lane guard over a value that was alike already, the wave number
(tid >> 6) and an LDS read count as alike in the wave; over a value that
differs by lane they do not. The test is ryotdev's, from
fxceless/victory-fork PR #156.

Fails: the proof leaves out every guarded write ("old and new values are
uniform").

Co-Authored-By: Claude Fable 5.2 <[email protected]>
On a GPU whose waves are 32 lanes (NVIDIA) three programs of the structure
builder stopped on "a first-lane read where not every lane runs": the
512-thread prefix-sum passes fetch a running total with v_readfirstlane
inside a loop. One stage without a host pipeline keeps the whole builder off
(its stages run all or none), so there was no ray tracing on such a card.

The lane-uniformity proof now also takes the wave number (tid >> 6), an LDS
read at an address alike in the wave, and values joined by a phi where every
predecessor is entered by all arriving lanes or none. It is the proof of
fxceless/victory-fork PR #156 by sedzz, with ryotdev's correction for writes
under a lane guard.

As a host of 32-lane waves, XboxBvhBuilder.dll: 52 of 52 programs emitted
(was 49).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
A dispatch that counts threads (DispatchX with its thread-count flag) starts
its last group with only the first lanes in EXEC. A 64-lane program with a
spilled user-data table takes the console compiler's wave total and prefix
sum, which turn every lane on and mask by the saved EXEC, and stores both per
thread; two groups of 64, counts 70, 100, 33, 1 and none. The lanes past the
count must count as zero and store nothing, with the console wave run as two
host waves that exchange their halves.

Fails: spill::thread_limited, which is to mask EXEC by the count ahead of the
program, is a stub ("the count's entry code is there").

Co-Authored-By: Claude Fable 5.2 <[email protected]>
The structure builder's two passes over shipped structures are dispatched by
thread count, and lower_with_thread_limit lets the lanes past the count leave
at once. That needs the program as one 64-lane wave: a card whose waves are
32 lanes refuses such a pipeline ("The parameter is incorrect"), so two of
the builder's 52 stages had none and the builder stayed off.

On a host of 32-lane waves a compute program with a spilled user-data table
now gets the count as one more parameter (USER_DISPATCH_THREADS_X, as the
host already sets it) and seven instructions in front that AND its EXEC with
"thread number < count" (spill::thread_limited), which is what the hardware's
launch leaves there. The title's code runs unchanged behind them in the form
the translator has for such a host: two host waves that exchange their
halves, every thread staying. Hosts of 64-lane waves keep the early exit.

XboxBvhBuilder.dll as a host of 32-lane waves on an RTX 4080: 52 emitted, 52
validated, 52 pipelines (was 50 pipelines).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:32:16 +00:00
Author
Owner

@⁠pr0vId3nce on GitHub · 2026-11-25 20:22 UTC · original

Two follow-ups, both on the same RTX 4080 (driver 32.0.16.1088, host wave lanes min=32 max=32), main 2e01ab4.

#22 against this branch. VICTORY_HOST_MAX_WAVE=32, victory translate --validate --pipelines XboxBvhBuilder.dll:

tree emitted validated pipelines
#22 alone (92897d2) 49 of 52 49 49
#22 on the first two commits here 52 of 52 52 52
this branch 52 of 52 52 52
  • #22 alone removes the two refusals; the three a first-lane read where not every lane runs programs remain, so the builder stays off.
  • #22's own card test passes on this card. The scan test of this branch rewritten for #22's form (two groups of 64, counts 70, 100, 33, 1 and none, scans that turn every lane on) passes too, all 256 dwords right. I found no fault in #22 for the two kernels.
  • In game, #22 on the first two commits here, --rt: the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53 87 s in, no exception, about 100 world frames at a median of 2.8 s (this branch: 2.8 s). It ended at 420 s on my runner's memory guard, which watches the whole PC (92 GB committed with other work running; the process itself peaked at 45.4 GB, this branch's run at 45.1 GB), so not a fault of #22. It got to the same room shot, and the part that default switches leave black is lit there as it is with this branch.

So either works for the two kernels; what only this branch has is the first two commits. If #22 goes in, I can cut this PR down to those two.

The picture, default switches against --rt, same build (this branch, the same checkpoint and keys, the last frame of each ten-minute run; both end in the same static shot of a room with a window):

  • Default switches: 605 s, no exception, median 236 ms a frame, 29.2 GB peak commit. Everything to the right of the window (a bunk, the wall behind it) is black from the first frame of the shot to the last.
  • --rt: the run in the description. The bunk and the wall behind it are lit warm from the window side, with what hangs on the wall readable; the character's back and the left wall are brighter. The view through the window is the same in both. No tiles, no wash.
  • Pixels under 16 of 255: whole frame 26.3% with default switches, 2.8% with --rt; right of the window 98.8% against 4.8%; the character's back 19.0% against 5.8%.

Judged by eye and by those counts against the default renderer on this card; I have no console reference.

AI-assisted (Claude Code); measured on my machine. No game data.

**@⁠pr0vId3nce** on GitHub · 2026-11-25 20:22 UTC · [original](https://github.com/DexNom/VIctory/pull/35#issuecomment-7173586711) Two follow-ups, both on the same RTX 4080 (driver 32.0.16.1088, `host wave lanes min=32 max=32`), `main` `2e01ab4`. **#22 against this branch.** `VICTORY_HOST_MAX_WAVE=32`, `victory translate --validate --pipelines XboxBvhBuilder.dll`: | tree | emitted | validated | pipelines | |---|---|---|---| | #22 alone (`92897d2`) | 49 of 52 | 49 | 49 | | #22 on the first two commits here | 52 of 52 | 52 | 52 | | this branch | 52 of 52 | 52 | 52 | - #22 alone removes the two refusals; the three `a first-lane read where not every lane runs` programs remain, so the builder stays off. - #22's own card test passes on this card. The scan test of this branch rewritten for #22's form (two groups of 64, counts 70, 100, 33, 1 and none, scans that turn every lane on) passes too, all 256 dwords right. I found no fault in #22 for the two kernels. - In game, #22 on the first two commits here, `--rt`: `the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53` 87 s in, no exception, about 100 world frames at a median of 2.8 s (this branch: 2.8 s). It ended at 420 s on my runner's memory guard, which watches the whole PC (92 GB committed with other work running; the process itself peaked at 45.4 GB, this branch's run at 45.1 GB), so not a fault of #22. It got to the same room shot, and the part that default switches leave black is lit there as it is with this branch. So either works for the two kernels; what only this branch has is the first two commits. If #22 goes in, I can cut this PR down to those two. **The picture, default switches against `--rt`, same build** (this branch, the same checkpoint and keys, the last frame of each ten-minute run; both end in the same static shot of a room with a window): - Default switches: 605 s, no exception, median 236 ms a frame, 29.2 GB peak commit. Everything to the right of the window (a bunk, the wall behind it) is black from the first frame of the shot to the last. - `--rt`: the run in the description. The bunk and the wall behind it are lit warm from the window side, with what hangs on the wall readable; the character's back and the left wall are brighter. The view through the window is the same in both. No tiles, no wash. - Pixels under 16 of 255: whole frame 26.3% with default switches, 2.8% with `--rt`; right of the window 98.8% against 4.8%; the character's back 19.0% against 5.8%. Judged by eye and by those counts against the default renderer on this card; I have no console reference. _AI-assisted (Claude Code); measured on my machine. No game data._
Author
Owner

@⁠Ashley123477 on GitHub · 2026-11-25 20:43 UTC · original

RTX 4090, driver 621.40, i9-14900K, 64 GB, Windows 11 26200; this branch at 46fa699 with the four --rt env vars (VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=0 VICTORY_ACTIVATE_RAYS=1 VICTORY_RT_RESOLVE=1), TdrDelay=30.

Result: into the world, 12 min 43 s, no device loss. Started at ~11.5 s/frame (GPU wait 2.2 s, CPU prep 1.7 s, copy-back 2.2 s, 0 dropped) and reached ~2.7 s/frame at the end (948 draws/frame, GPU 27% busy, RAM ~23 GB). Characters and sky/water render and are lit; near ground/terrain is black.

How it ended: a title null write at victory-image+0x23cf683 (frames +0x2215c35 / +0x2215eca), the same address and registers I get on upstream builds without --rt. rcx 0xd0024c348 and r8–r11 are identical across four different builds (upstream #1763, DexNom main, upstream #2628+#2626, this branch with --rt). The title's Breakpad report showed memory.load 88%, about 8 GB free, about 8.6 GB commit free.

The title's own crash context (T:\victory-*.crash.log) for two of these runs (upstream #2628+#2626 at 4:42, and this branch with --rt at 12:43) shows the same state both times:

Current SRL Name: fbk_stry000_FBK_STRY000_INTRO
Current SRL State: Prestream
Game Physical: 2182418512/2305818624   (and 2183082608/2305818624)
Pool: 591978288/624951280              (and 591978224/624951280)
Unused: 0/590348272

That's at different running times (4:42 vs 12:43), frames (9358 vs 6194) and positions. It matches the "3/3 crashes in the fbk_stry000_FBK_STRY000_INTRO Prestream" reported in Marvisak/VIctory#71. The title's physical memory and pool are ~95% used with nothing unused in both, so the +0x23cf683 null write may be a failed allocation during the intro's prestream rather than a GPU or --rt problem.

No game data: counts, hashes and log lines only. AI-assisted (Claude).

**@⁠Ashley123477** on GitHub · 2026-11-25 20:43 UTC · [original](https://github.com/DexNom/VIctory/pull/35#issuecomment-7174087593) RTX 4090, driver 621.40, i9-14900K, 64 GB, Windows 11 26200; this branch at `46fa699` with the four --rt env vars (VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=0 VICTORY_ACTIVATE_RAYS=1 VICTORY_RT_RESOLVE=1), TdrDelay=30. **Result:** into the world, 12 min 43 s, no device loss. Started at ~11.5 s/frame (GPU wait 2.2 s, CPU prep 1.7 s, copy-back 2.2 s, 0 dropped) and reached ~2.7 s/frame at the end (948 draws/frame, GPU 27% busy, RAM ~23 GB). Characters and sky/water render and are lit; near ground/terrain is black. **How it ended:** a title null write at `victory-image+0x23cf683` (frames `+0x2215c35` / `+0x2215eca`), the same address and registers I get on upstream builds without --rt. `rcx 0xd0024c348` and `r8`–`r11` are identical across four different builds (upstream #1763, DexNom main, upstream #2628+#2626, this branch with --rt). The title's Breakpad report showed memory.load 88%, about 8 GB free, about 8.6 GB commit free. **The title's own crash context** (`T:\victory-*.crash.log`) for two of these runs (upstream #2628+#2626 at 4:42, and this branch with --rt at 12:43) shows the same state both times: ``` Current SRL Name: fbk_stry000_FBK_STRY000_INTRO Current SRL State: Prestream Game Physical: 2182418512/2305818624 (and 2183082608/2305818624) Pool: 591978288/624951280 (and 591978224/624951280) Unused: 0/590348272 ``` That's at different running times (4:42 vs 12:43), frames (9358 vs 6194) and positions. It matches the "3/3 crashes in the fbk_stry000_FBK_STRY000_INTRO Prestream" reported in Marvisak/VIctory#71. The title's physical memory and pool are ~95% used with nothing unused in both, so the `+0x23cf683` null write may be a failed allocation during the intro's prestream rather than a GPU or --rt problem. No game data: counts, hashes and log lines only. AI-assisted (Claude).
Author
Owner

@⁠Artking175 on GitHub · 2026-11-25 20:58 UTC · original

Independent RTX 2060 check of 46fa699aad9ae28397e2439b13ccc93cd93dc608 against 2e01ab4760db91820ef5f9a9f85761f83cd6b5d0. Windows 10, NVIDIA 531.41, Agility 1.614.1 and the same DXIL validator on both builds. Both used the #12 SDK loader overlay (999fd75) and VICTORY_HOST_MAX_WAVE=32.

victory translate --jobs 1 --validate --pipelines --list XboxBvhBuilder.dll:

Build DXIL emitted Validated D3D12 PSOs
main 49/52 49/52 47/52
#35 52/52 52/52 52/52

The guarded uniform-write test passed. The partial-launch scan test also passed and explicitly reported hardware readback on 32-lane waves for limits 70, 100, 33, 1 and no limit over two groups. This was an offline check. Runtime builder activation and the prologue rendering remain untested with this PR on the RTX 2060.

**@⁠Artking175** on GitHub · 2026-11-25 20:58 UTC · [original](https://github.com/DexNom/VIctory/pull/35#issuecomment-7174445783) Independent RTX 2060 check of `46fa699aad9ae28397e2439b13ccc93cd93dc608` against `2e01ab4760db91820ef5f9a9f85761f83cd6b5d0`. Windows 10, NVIDIA 531.41, Agility 1.614.1 and the same DXIL validator on both builds. Both used the #12 SDK loader overlay (`999fd75`) and `VICTORY_HOST_MAX_WAVE=32`. `victory translate --jobs 1 --validate --pipelines --list XboxBvhBuilder.dll`: | Build | DXIL emitted | Validated | D3D12 PSOs | | --- | ---: | ---: | ---: | | main | 49/52 | 49/52 | 47/52 | | #35 | 52/52 | 52/52 | 52/52 | The guarded uniform-write test passed. The partial-launch scan test also passed and explicitly reported hardware readback on 32-lane waves for limits 70, 100, 33, 1 and no limit over two groups. This was an offline check. Runtime builder activation and the prologue rendering remain untested with this PR on the RTX 2060.
Author
Owner

@⁠Castyan on GitHub · 2026-11-25 21:08 UTC · original

PR #35 on an RTX 5060

On 25 November 2026, I built 46fa699aad9ae28397e2439b13ccc93cd93dc608, the head of PR #35, in release mode and tested it on Windows 11 with an NVIDIA GeForce RTX 5060. D3D12 reported a minimum and maximum wave size of 32 lanes.

I ran victory.exe warm <path-to-XboxBvhBuilder.dll> --jobs 2 against the same local DLL with separate empty runtime caches. The comparison build was the installed shader preload runtime at 8c53afb from PR #47. The comparison measures the difference between those two builds.

Build Translated Translation refusals D3D12 compute pipelines created Pipeline refusals
Installed preload runtime 8c53afb 49 3 47 2
PR #35 46fa699 52 0 52 0

The three baseline translation refusals were 77360df21e12ea43, 39321a95223001ed, and 9fc111d3be79364f. The PR build completed the first isolated warm-up in 9 seconds. All eight tests in emit::wave64_tests passed on the PR head.

This run covered translation and D3D12 compute pipeline creation for the builder DLL. In-game execution, ray-tracing output, and frame time still need a gameplay run on this commit.

**@⁠Castyan** on GitHub · 2026-11-25 21:08 UTC · [original](https://github.com/DexNom/VIctory/pull/35#issuecomment-7174666898) # PR #35 on an RTX 5060 On 25 November 2026, I built `46fa699aad9ae28397e2439b13ccc93cd93dc608`, the head of [PR #35](https://git.gtahub.st/github/DexNom--VIctory/pulls/35), in release mode and tested it on Windows 11 with an NVIDIA GeForce RTX 5060. D3D12 reported a minimum and maximum wave size of 32 lanes. I ran `victory.exe warm <path-to-XboxBvhBuilder.dll> --jobs 2` against the same local DLL with separate empty runtime caches. The comparison build was the installed shader preload runtime at `8c53afb` from [PR #47](https://git.gtahub.st/github/DexNom--VIctory/pulls/47). The comparison measures the difference between those two builds. | Build | Translated | Translation refusals | D3D12 compute pipelines created | Pipeline refusals | | --- | ---: | ---: | ---: | ---: | | Installed preload runtime `8c53afb` | 49 | 3 | 47 | 2 | | PR #35 `46fa699` | 52 | 0 | 52 | 0 | The three baseline translation refusals were `77360df21e12ea43`, `39321a95223001ed`, and `9fc111d3be79364f`. The PR build completed the first isolated warm-up in 9 seconds. All eight tests in `emit::wave64_tests` passed on the PR head. This run covered translation and D3D12 compute pipeline creation for the builder DLL. In-game execution, ray-tracing output, and frame time still need a gameplay run on this commit.
This pull request has changes conflicting with the target branch.
  • crates/victory-shader/src/emit/mod.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/35/head:github-bot/gh-35'
git switch 'github-bot/gh-35'

Merge

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