Ray-tracing builder runs on an RTX 5070 (32-lane) - then the title crashes on f16 box bounds #16

Open
opened 2026-11-26 03:34:40 +00:00 by github-bot · 36 comments
Owner

@⁠asdaasdsaddf on GitHub · 2026-11-24 19:52 UTC · original

Ray-tracing builder runs on an RTX 5070 (32-lane) — then the title crashes on f16 box bounds

Tester report, AI-assisted (Claude Code). Logs, counts and hashes only; no game data.

Machine: Windows 11, NVIDIA GeForce RTX 5070 12 GB (driver 616.64), AMD Ryzen 5 5600, 40 GB RAM. Series X profile. Your main at 7b0f736 plus the two small changes below.

1. Why the builder stayed off on NVIDIA

With VICTORY_BVH_BUILDER=1 the log said the ray-tracing structure builder stays off ... missing=3 of=53.

Translating XboxBvhBuilder.dll offline as a 32-lane host (VICTORY_HOST_WAVE=32 victory translate --list XboxBvhBuilder.dll) gives 49 of 52. The three that fail are:

  • @0x99160 #dc78c5de69c7c155
  • @0x9a830 #322ed4ad832bdea6
  • @0x9be80 #d441b097704ab616

All three stop on a first-lane read where not every lane runs (at 0x258 / 0x23c / 0x23c). They are 512-thread prefix-sum passes:

  1. Each wave does a wave scan.
  2. Lane 63 of each wave writes the wave's total to LDS, then a barrier.
  3. A loop sums the earlier waves' totals.
  4. That loop reads v_readfirstlane v8 at 0x1d4. v8 = s17 + lds[s16] is a sum of scalars, the same in every lane, and the loop exits per console wave (v7 = tid >> 6).

2. Change A: VICTORY_FIRSTLANE_OWN=1 (opt-in)

In lower.rs, when the two host halves would need to exchange but not every lane runs, this takes the host wave's own first lane instead of refusing. That is exact when the value is uniform over the console wave, as in these scans.

Results with it on:

  • Offline (VICTORY_HOST_WAVE=32): 52/52 emit, validate with dxil.dll, and create host pipelines on the RTX 5070.
  • In game: the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53.

3. Change B: v_cvt_f32_f64 lowering

This one is unrelated to the builder. Game compute shaders 5dc3b25986622949, 6f225b641c5b0708 and 926c46bab3b86bd6 were refused on v_cvt_f32_f64. I lowered it with 64-bit integer math on the double's bits:

  • round to nearest even;
  • f32 denormal results flush to zero;
  • NaN becomes a quiet NaN; overflow becomes infinity.

These three shaders then stop later at the same addresses with a whole-wave section step the simulation does not follow, so wave.rs would need the op too.

4. The crash once the builder runs (looks like your run 98)

Without VICTORY_BVH_QUARANTINE:

  • The title dies about 8 s after builder runs, still in the prologue lead-out prestream (cine@leadout@int_prolo@int@leadout), frame 1094.
  • The crash is an access violation in VCRUNTIME140.dll+0x1c177, reading 0xffffffffffffffff.
  • The call goes through image+0x4f1414f, +0x26778e0, +0x26777d5, +0x256fb83 and +0x221c29c.
  • The register dump in the breakpad line shows rax 0xfc00fc00fc00, which is f16 −inf: the "empty box" bound pattern. So builder stores are landing on the title's own objects, as in your run 98.

With VICTORY_BVH_QUARANTINE=1: the title also crashes about 5 s after builder runs (int_prolo_int_prolo_int prestream, frame 1233). That fits your note that quarantine leaves the title without sizes and counters.

Other things in the log around the builder:

  • title memory by address: shaders touched pages that had no copy (13 times).
  • no number left for another copy; its pages read zeros COPIES=....
  • The first frames after it ran were 0.1–0.4 fps while about 1,700 pipelines were being made.

I can't tell yet whether the bad stores come from change A's approximation, from the lost page accesses, or from another stage. If it would help, I can rerun with any diagnostic switch you suggest and send the counts.

Also tested: --console series-s gave no image change; VICTORY_LATE_WAIT=1 with the card-buffer switches made little FPS difference here (about 1.8–2.3 fps in the prologue).

**@⁠asdaasdsaddf** on GitHub · 2026-11-24 19:52 UTC · [original](https://github.com/fxceless/victory-fork/issues/16) ## Ray-tracing builder runs on an RTX 5070 (32-lane) — then the title crashes on f16 box bounds Tester report, AI-assisted (Claude Code). Logs, counts and hashes only; no game data. **Machine:** Windows 11, NVIDIA GeForce RTX 5070 12 GB (driver 616.64), AMD Ryzen 5 5600, 40 GB RAM. Series X profile. Your `main` at 7b0f736 plus the two small changes below. ### 1. Why the builder stayed off on NVIDIA With `VICTORY_BVH_BUILDER=1` the log said `the ray-tracing structure builder stays off ... missing=3 of=53`. Translating `XboxBvhBuilder.dll` offline as a 32-lane host (`VICTORY_HOST_WAVE=32 victory translate --list XboxBvhBuilder.dll`) gives 49 of 52. The three that fail are: - `@0x99160` #dc78c5de69c7c155 - `@0x9a830` #322ed4ad832bdea6 - `@0x9be80` #d441b097704ab616 All three stop on `a first-lane read where not every lane runs` (at 0x258 / 0x23c / 0x23c). They are 512-thread prefix-sum passes: 1. Each wave does a wave scan. 2. Lane 63 of each wave writes the wave's total to LDS, then a barrier. 3. A loop sums the earlier waves' totals. 4. That loop reads `v_readfirstlane v8` at 0x1d4. `v8 = s17 + lds[s16]` is a sum of scalars, the same in every lane, and the loop exits per console wave (`v7 = tid >> 6`). ### 2. Change A: `VICTORY_FIRSTLANE_OWN=1` (opt-in) In `lower.rs`, when the two host halves would need to exchange but not every lane runs, this takes the host wave's own first lane instead of refusing. That is exact when the value is uniform over the console wave, as in these scans. Results with it on: - Offline (`VICTORY_HOST_WAVE=32`): 52/52 emit, validate with dxil.dll, and create host pipelines on the RTX 5070. - In game: `the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53`. ### 3. Change B: `v_cvt_f32_f64` lowering This one is unrelated to the builder. Game compute shaders 5dc3b25986622949, 6f225b641c5b0708 and 926c46bab3b86bd6 were refused on `v_cvt_f32_f64`. I lowered it with 64-bit integer math on the double's bits: - round to nearest even; - f32 denormal results flush to zero; - NaN becomes a quiet NaN; overflow becomes infinity. These three shaders then stop later at the same addresses with `a whole-wave section step the simulation does not follow`, so `wave.rs` would need the op too. ### 4. The crash once the builder runs (looks like your run 98) **Without `VICTORY_BVH_QUARANTINE`:** - The title dies about 8 s after `builder runs`, still in the prologue lead-out prestream (`cine@leadout@int_prolo@int@leadout`), frame 1094. - The crash is an access violation in `VCRUNTIME140.dll+0x1c177`, reading 0xffffffffffffffff. - The call goes through `image+0x4f1414f`, `+0x26778e0`, `+0x26777d5`, `+0x256fb83` and `+0x221c29c`. - The register dump in the breakpad line shows `rax 0xfc00fc00fc00`, which is f16 −inf: the "empty box" bound pattern. So builder stores are landing on the title's own objects, as in your run 98. **With `VICTORY_BVH_QUARANTINE=1`:** the title also crashes about 5 s after `builder runs` (`int_prolo_int_prolo_int` prestream, frame 1233). That fits your note that quarantine leaves the title without sizes and counters. Other things in the log around the builder: - `title memory by address: shaders touched pages that had no copy` (13 times). - `no number left for another copy; its pages read zeros COPIES=...`. - The first frames after it ran were 0.1–0.4 fps while about 1,700 pipelines were being made. I can't tell yet whether the bad stores come from change A's approximation, from the lost page accesses, or from another stage. If it would help, I can rerun with any diagnostic switch you suggest and send the counts. Also tested: `--console series-s` gave no image change; `VICTORY_LATE_WAIT=1` with the card-buffer switches made little FPS difference here (about 1.8–2.3 fps in the prologue).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:34:40 +00:00
Author
Owner

@⁠bunbeans2-arch on GitHub · 2026-11-24 21:32 UTC · original

Same two crashes on a 64-lane GPU (RX 9070 XT) without change A, so change A is not the cause

On RDNA 4 the three prefix-sum builder passes keep their 64-lane form, so the builder can come up on an unmodified tree. That gives a control for your question "whether the bad stores come from change A's approximation".

Machine: RX 9070 XT, driver 32.0.32015.7029, 32 GB, Windows 11 Pro build 22631, Series X profile, diag build.

  • Tree: 7b0f736 plus a local input-file patch only (no GPU or translator changes), so no change A and no change B.
  • Log: host wave lanes min=32 max=64.

VICTORY_BVH_BUILDER=1: the log says the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53. Nothing was skipped or changed to get there.

run switches builder runs at title crash
1 VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=1 21:25:35.214 UTC 0xc0000005 writing address 0, in title code; the exception line is logged before the builder line, and the last timestamp before it is 21:25:35.063
2 VICTORY_BVH_BUILDER=1 21:27:52.288 UTC 0xc0000005 reading 0xffffffffffffffff, in title code; the last timestamp before it is 21:28:04.944, about 12.7 s after the builder started
  • Both crashes happened while the loading screen was still up, 107 s and 91 s after launch. No device removal and no hang in either run.
  • Neither run logged shaders touched pages that had no copy or no number left for another copy; its pages read zeros (0 lines each; the same tree's memory.rs 183 and 219 log them as warnings).
  • Run 2 matches your no-quarantine crash, a read of all ones. With quarantine (run 1) the crash came at once, not after about 5 s, but your reading still fits: the title is left without sizes and counters.

So with every builder pass in its native 64-lane form and no lost page accesses logged, the title still fails the same way. My guess is that neither change A's first-lane approximation nor the missing page copies is needed for the bad stores; another stage of the builder (or its inputs) is more likely. I can run a diagnostic switch on this card if you name one.

AI-assisted (Claude Code): measured on this machine with my own copy of the game. Counts and log lines only; no game data.

**@⁠bunbeans2-arch** on GitHub · 2026-11-24 21:32 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7145061427) **Same two crashes on a 64-lane GPU (RX 9070 XT) without change A, so change A is not the cause** On RDNA 4 the three prefix-sum builder passes keep their 64-lane form, so the builder can come up on an unmodified tree. That gives a control for your question "whether the bad stores come from change A's approximation". **Machine:** RX 9070 XT, driver 32.0.32015.7029, 32 GB, Windows 11 Pro build 22631, Series X profile, diag build. - **Tree:** `7b0f736` plus a local input-file patch only (no GPU or translator changes), so no change A and no change B. - **Log:** `host wave lanes min=32 max=64`. **`VICTORY_BVH_BUILDER=1`:** the log says `the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53`. Nothing was skipped or changed to get there. | run | switches | builder runs at | title crash | |---|---|---|---| | 1 | `VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=1` | 21:25:35.214 UTC | `0xc0000005` writing address 0, in title code; the exception line is logged before the builder line, and the last timestamp before it is 21:25:35.063 | | 2 | `VICTORY_BVH_BUILDER=1` | 21:27:52.288 UTC | `0xc0000005` reading 0xffffffffffffffff, in title code; the last timestamp before it is 21:28:04.944, about 12.7 s after the builder started | - Both crashes happened while the loading screen was still up, 107 s and 91 s after launch. No device removal and no hang in either run. - Neither run logged `shaders touched pages that had no copy` or `no number left for another copy; its pages read zeros` (0 lines each; the same tree's `memory.rs` 183 and 219 log them as warnings). - Run 2 matches your no-quarantine crash, a read of all ones. With quarantine (run 1) the crash came at once, not after about 5 s, but your reading still fits: the title is left without sizes and counters. So with every builder pass in its native 64-lane form and no lost page accesses logged, the title still fails the same way. My guess is that neither change A's first-lane approximation nor the missing page copies is needed for the bad stores; another stage of the builder (or its inputs) is more likely. I can run a diagnostic switch on this card if you name one. _AI-assisted (Claude Code): measured on this machine with my own copy of the game. Counts and log lines only; no game data._
Author
Owner

@⁠CDR-0000 on GitHub · 2026-11-24 21:34 UTC · original

RTX 3080 Ti: reproduced with #36 instead of change A, then narrowed down with a write-back trace — the builder's stores land where it was pointed; the title crashes on f32 empty-box bounds the builder never fills in. Relay timing ruled out.

Setup: RTX 3080 Ti 12 GB (32-lane), driver 32.0.16.1742; Ryzen 7 7800X3D; 32 GB; Windows 11 Pro 26300; release build. Fork main 4e17478 + #36 + upstream #454 (VICTORY_NO_WATCHDOG=1, hooks applied=2) + a local diagnostic (below). VICTORY_BVH_BUILDER=1, no quarantine, cold cache.

1. #36 lets the builder run on NVIDIA — XboxBvhBuilder.dll 52/52 emit/validate/create pipelines at 32 lanes (49/52 without). In game: the ray-tracing structure builder runs ... pipelines=53. So change A's approximation is not the cause: the crash below happens with #36's exact form too.

2. Crash — 3 runs, every time 7–14 s after the builder starts, prologue, black screen:

  • image+0x8f92a (read 0xffffffffffffffff), stack +0x79977/+0x4eea9f5 → +0x2677819 → +0x256fb83 → +0x221c29c → +0x2215eca; others at +0x55ceb22, +0x5592694, +0x4e335b4 with +0x26778e0 → +0x26777d5 → +0x256fb83 (same frames as yours).
  • rax 0xff8000007f800000 (run 2) and rax 0x7f8000007f800000 (run 3): f32 +inf/-inf and +inf/+inf — the empty-box bounds of 128-byte box32 nodes. The title's CPU code is reading builder results whose bounds were never shrunk from their initial empty value.

3. Write-back trace (VICTORY_BVH_TRACE=1, local diagnostic: notes the copies each builder dispatch is pointed at via root views / address constants, and every merge of GPU bytes into title memory from the builder's first dispatch on, counting f16/f32 empty bounds):

relay on (VICTORY_RELAY=2) relay off
merges into title memory 3,500 (170 MB) 4,000 (198 MB)
outside what the builder was pointed at 26 (104 KB), 0 empty bounds 537 (27 MB; all in the crash frame, mostly card merges into one 21 MB title buffer), 1,903 empty bounds
empty f16 bounds inside builder memory 2,049,488 2,194,402
crash registers pointing at title memory (rbx/rsi/rdi/r13/r15…) that any outside merge touched 0 of ~40 0 of ~50
shaders touched pages that had no copy 0 0

So: no stray store reaches the objects the crashing code uses, the builder finds a copy for every page it touches, relay timing makes no difference, and global_atomic_fmin/fmax lower to a CAS loop over real FMin/FMax (not integer compares). What's left, as far as I can see: the builder computes from stale inputs — e.g. memory.rs's shortcut that a copy another list numbers meanwhile is only brought up to date by that list's submission, which may run later — and so never shrinks the empty boxes. Happy to run a targeted check if you point me at the stage whose inputs matter most.

The trace is ~230 lines (bvhtrace.rs + hooks in memory.rs, draw.rs, shadow.rs, off unless set); I can open it as a PR if it's useful.

Written with Claude Code (Claude Opus 5.5); the runs are mine.

**@⁠CDR-0000** on GitHub · 2026-11-24 21:34 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7145103078) **RTX 3080 Ti: reproduced with #36 instead of change A, then narrowed down with a write-back trace — the builder's stores land where it was pointed; the title crashes on f32 empty-box bounds the builder never fills in. Relay timing ruled out.** **Setup:** RTX 3080 Ti 12 GB (32-lane), driver 32.0.16.1742; Ryzen 7 7800X3D; 32 GB; Windows 11 Pro 26300; release build. Fork `main` `4e17478` + #36 + upstream #454 (`VICTORY_NO_WATCHDOG=1`, hooks applied=2) + a local diagnostic (below). `VICTORY_BVH_BUILDER=1`, no quarantine, cold cache. **1. #36 lets the builder run on NVIDIA** — `XboxBvhBuilder.dll` 52/52 emit/validate/create pipelines at 32 lanes (49/52 without). In game: `the ray-tracing structure builder runs ... pipelines=53`. So change A's approximation is not the cause: the crash below happens with #36's exact form too. **2. Crash** — 3 runs, every time 7–14 s after the builder starts, prologue, black screen: - `image+0x8f92a` (read `0xffffffffffffffff`), stack `+0x79977/+0x4eea9f5 → +0x2677819 → +0x256fb83 → +0x221c29c → +0x2215eca`; others at `+0x55ceb22`, `+0x5592694`, `+0x4e335b4` with `+0x26778e0 → +0x26777d5 → +0x256fb83` (same frames as yours). - **`rax 0xff8000007f800000`** (run 2) and **`rax 0x7f8000007f800000`** (run 3): f32 `+inf/-inf` and `+inf/+inf` — the empty-box bounds of 128-byte box32 nodes. The title's CPU code is reading builder results whose bounds were never shrunk from their initial empty value. **3. Write-back trace** (`VICTORY_BVH_TRACE=1`, local diagnostic: notes the copies each builder dispatch is pointed at via root views / address constants, and every merge of GPU bytes into title memory from the builder's first dispatch on, counting f16/f32 empty bounds): | | relay on (`VICTORY_RELAY=2`) | relay off | |---|---|---| | merges into title memory | 3,500 (170 MB) | 4,000 (198 MB) | | outside what the builder was pointed at | 26 (104 KB), 0 empty bounds | 537 (27 MB; all in the crash frame, mostly card merges into one 21 MB title buffer), 1,903 empty bounds | | empty f16 bounds inside builder memory | 2,049,488 | 2,194,402 | | crash registers pointing at title memory (rbx/rsi/rdi/r13/r15…) that any outside merge touched | 0 of ~40 | 0 of ~50 | | `shaders touched pages that had no copy` | 0 | 0 | So: no stray store reaches the objects the crashing code uses, the builder finds a copy for every page it touches, relay timing makes no difference, and `global_atomic_fmin/fmax` lower to a CAS loop over real FMin/FMax (not integer compares). What's left, as far as I can see: the builder computes from **stale inputs** — e.g. `memory.rs`'s shortcut that a copy another list numbers meanwhile is only brought up to date by that list's submission, which may run later — and so never shrinks the empty boxes. Happy to run a targeted check if you point me at the stage whose inputs matter most. The trace is ~230 lines (`bvhtrace.rs` + hooks in `memory.rs`, `draw.rs`, `shadow.rs`, off unless set); I can open it as a PR if it's useful. Written with Claude Code (Claude Opus 5.5); the runs are mine.
Author
Owner

@⁠dkdknight on GitHub · 2026-11-24 21:51 UTC · original

RTX 5080 (Blackwell, 32-lane): the same crash, 7 s after the builder starts, loading a gameplay checkpoint (not the prologue).

Setup: NVIDIA GeForce RTX 5080 16 GB, driver 621.14, i9-13900KF, Windows 11 26200, release build, Series X profile. Tree: 4e17478 + #71 + #81 + #77 + #38 + #36 + #9. Switches: VICTORY_BVH_BUILDER=1 (no quarantine), VICTORY_RELAY=2 VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024.

What happened

  • Offline, at 32 lanes (VICTORY_HOST_MAX_WAVE=32 victory translate XboxBvhBuilder.dll), all 52 builder programs translate and emit.
  • In game, the log says the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53. The title stops 7 s later, after 21 first-chance access violations:
site read rax count
image+0x27c195d 0xffffffffffffffff (and once 0xbe330008) mostly 0xbeadc00000000000 14
image+0x8f92a 0xffffffffffffffff 0xfc00fc00fc007c00 2
image+0x4f38ba5 0xffffffffffffffff 2
image+0x4e335b4 0x38 0xfc00fc00fc007c00 1
image+0x52eca7e 0x7 1
VCRUNTIME140.dll+0x1cca7 0x7c007c007c00 1
  • rax 0xff8000007f800000 also shows up, as in CoDrift's runs.
  • shaders touched pages that had no copy and no number left for another copy: 0.

One detail that may help: the faulting address 0x7c007c007c00 is three f16 +inf words, so the title loaded a pointer from memory that still holds the empty-box fill. That fits CoDrift's reading: the nodes or records the title walks on the CPU were never written by the builder, rather than overwritten by a stray store.

Unrelated, same build, first launch: the title's own GPU stall check stopped it at the menu (image+0x23cf683, write 0x0). It came after ~30 s with no present while about a thousand host pipelines were being made for the new build. The second launch, with the library warm, got through.

AI use: Claude Code, Claude Opus 5.5 merged and built the tree and ran both launches on the machine above (the person at the machine loaded the save). It read the logs and wrote this comment.

**@⁠dkdknight** on GitHub · 2026-11-24 21:51 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7145482758) **RTX 5080 (Blackwell, 32-lane): the same crash, 7 s after the builder starts, loading a gameplay checkpoint (not the prologue).** **Setup:** NVIDIA GeForce RTX 5080 16 GB, driver 621.14, i9-13900KF, Windows 11 26200, release build, Series X profile. Tree: `4e17478` + #71 + #81 + #77 + #38 + #36 + #9. Switches: `VICTORY_BVH_BUILDER=1` (no quarantine), `VICTORY_RELAY=2 VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024`. **What happened** - Offline, at 32 lanes (`VICTORY_HOST_MAX_WAVE=32 victory translate XboxBvhBuilder.dll`), all 52 builder programs translate and emit. - In game, the log says `the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53`. The title stops 7 s later, after 21 first-chance access violations: | site | read | `rax` | count | |---|---|---|---:| | `image+0x27c195d` | `0xffffffffffffffff` (and once `0xbe330008`) | mostly `0xbeadc00000000000` | 14 | | `image+0x8f92a` | `0xffffffffffffffff` | `0xfc00fc00fc007c00` | 2 | | `image+0x4f38ba5` | `0xffffffffffffffff` | | 2 | | `image+0x4e335b4` | `0x38` | `0xfc00fc00fc007c00` | 1 | | `image+0x52eca7e` | `0x7` | | 1 | | `VCRUNTIME140.dll+0x1cca7` | **`0x7c007c007c00`** | | 1 | - `rax 0xff8000007f800000` also shows up, as in CoDrift's runs. - `shaders touched pages that had no copy` and `no number left for another copy`: 0. **One detail that may help:** the faulting address `0x7c007c007c00` is three f16 `+inf` words, so the title loaded a *pointer* from memory that still holds the empty-box fill. That fits CoDrift's reading: the nodes or records the title walks on the CPU were never written by the builder, rather than overwritten by a stray store. **Unrelated, same build, first launch:** the title's own GPU stall check stopped it at the menu (`image+0x23cf683`, write `0x0`). It came after ~30 s with no present while about a thousand host pipelines were being made for the new build. The second launch, with the library warm, got through. **AI use:** Claude Code, Claude Opus 5.5 merged and built the tree and ran both launches on the machine above (the person at the machine loaded the save). It read the logs and wrote this comment.
Author
Owner

@⁠Revens2 on GitHub · 2026-11-24 22:34 UTC · original

RTX 5070 (32-lane): reproduced with #36; three f16-side switches ruled out. No fix yet.

Setup: RTX 5070 12 GB, driver 32.0.16.2124, Windows 11 26200, release build, Series X profile. main 4e17478, and the same plus #36 (merged locally, no other change). VICTORY_BVH_BUILDER=1, no quarantine, default switches otherwise. Driven through a 2-slot runner; no game data below, counts and log lines only.

run tree / switches result
1 main no builder log line; the title stayed on the profile selector for the whole 300 s (30 fps, 0 first-chance exceptions). non verifie: whether the builder stays off past loading, since this run never loaded.
2 main + #36 the ray-tracing structure builder runs ... pipelines=53, then 0xc0000005 (read 0xffffffffffffffff), process exit -1073741819, 17 s after the builder line (first-chance exceptions start earlier).
3 run 2 + a local switch that zeroes the destination's high half on 16-bit low-half writes (write_half; the tree keeps it today) same crash, same first fault sites as run 2 (image+0x4f38ba5, +0x8f92a).
4 run 3 + VICTORY_F16_NEAREST=1 + VICTORY_WAVE_OWN_BITS=0 same crash, same first sites, process exit 25 s after the builder line (run 3: 13 s).

So on this card the crash needs the builder to run (run 1 vs 2) and does not depend on f16 rounding (nearest vs the host's conversion), on whether a 16-bit write keeps or clears the register's other half, or on the own-bits wave lowering. That agrees with the 64-lane control and with CoDrift's trace: the f16 conversions are not what leaves the empty-box bounds in place.

Instruction census of the 52 builder programs (translator, VICTORY_HOST_WAVE=32, 52/52 emit with #36): the f16 work is small (11 programs: v_cvt_f16_f32 in 4, v_pk_min/max_f16 and v_min3/max3_f16 in 2, v_cvt_f32_f16 in 9); global_atomic_fmin/fmax is in 7. The remaining cross-lane users (v_permlanex16 13 programs, ds_swizzle 8, v_readlane 19, v_mbcnt 20) are untested against the console on a real card, but I have no oracle for them either.

I am not opening a PR: I found no defect I can show with a test. What would narrow it: a per-stage switch that makes one builder pipeline a no-op (so the first stage whose absence changes the crash can be named), or a dump of the stage that writes the nodes the title walks, which I cannot publish from here.

AI-assisted (Claude Code, Claude Sonnet 5.5): the runs are mine, on my own copy of the title.

**@⁠Revens2** on GitHub · 2026-11-24 22:34 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7146386041) **RTX 5070 (32-lane): reproduced with #36; three f16-side switches ruled out. No fix yet.** **Setup:** RTX 5070 12 GB, driver 32.0.16.2124, Windows 11 26200, release build, Series X profile. `main` `4e17478`, and the same plus #36 (merged locally, no other change). `VICTORY_BVH_BUILDER=1`, no quarantine, default switches otherwise. Driven through a 2-slot runner; no game data below, counts and log lines only. | run | tree / switches | result | |---|---|---| | 1 | `main` | no builder log line; the title stayed on the profile selector for the whole 300 s (30 fps, 0 first-chance exceptions). `non verifie`: whether the builder stays off past loading, since this run never loaded. | | 2 | `main` + #36 | `the ray-tracing structure builder runs ... pipelines=53`, then `0xc0000005` (read `0xffffffffffffffff`), process exit `-1073741819`, 17 s after the builder line (first-chance exceptions start earlier). | | 3 | run 2 + a local switch that zeroes the destination's high half on 16-bit low-half writes (`write_half`; the tree keeps it today) | same crash, same first fault sites as run 2 (`image+0x4f38ba5`, `+0x8f92a`). | | 4 | run 3 + `VICTORY_F16_NEAREST=1` + `VICTORY_WAVE_OWN_BITS=0` | same crash, same first sites, process exit 25 s after the builder line (run 3: 13 s). | So on this card the crash needs the builder to run (run 1 vs 2) and does not depend on f16 rounding (nearest vs the host's conversion), on whether a 16-bit write keeps or clears the register's other half, or on the own-bits wave lowering. That agrees with the 64-lane control and with CoDrift's trace: the f16 conversions are not what leaves the empty-box bounds in place. Instruction census of the 52 builder programs (translator, `VICTORY_HOST_WAVE=32`, 52/52 emit with #36): the f16 work is small (11 programs: `v_cvt_f16_f32` in 4, `v_pk_min/max_f16` and `v_min3/max3_f16` in 2, `v_cvt_f32_f16` in 9); `global_atomic_fmin/fmax` is in 7. The remaining cross-lane users (`v_permlanex16` 13 programs, `ds_swizzle` 8, `v_readlane` 19, `v_mbcnt` 20) are untested against the console on a real card, but I have no oracle for them either. I am not opening a PR: I found no defect I can show with a test. What would narrow it: a per-stage switch that makes one builder pipeline a no-op (so the first stage whose absence changes the crash can be named), or a dump of the stage that writes the nodes the title walks, which I cannot publish from here. _AI-assisted (Claude Code, Claude Sonnet 5.5): the runs are mine, on my own copy of the title._
Author
Owner

@⁠joroyt on GitHub · 2026-11-25 00:06 UTC · original

RTX 5070: the "stale inputs" guess measured. Three real defects in how host copies follow title memory, two fixed, and the crash is still there with all of them fixed.

Setup: RTX 5070 12 GB (32-lane waves, driver 32.0.16.2124), i9-14900KF, Windows 11, diag build, Series X profile, 2119b0e + #156, VICTORY_BVH_BUILDER=1, no quarantine. The crash reproduces as above: 5-15 s after the ray-tracing structure builder runs, first sites +0x8f92a, +0x4f38ba5, +0x27c195d, +0x5592694, reading 0xffffffffffffffff. About 20 short runs in all.

The check. A local diagnostic compares every range a submission declares as written with title memory, right after the range's refresh and before the lists run. By the design they must be equal then (the merge only puts back bytes that differ from the snapshot, so a copy that is stale at that moment loses every store that happens to rewrite what the copy already held). A piece counts as stale for good when it differs at two checks in a row while the title's bytes did not change in between.

1. Writes through another view of the same pages are not seen. Without #115, once the builder runs, 13-29 pieces of 64 KiB a second in windows are stale for good, plus 948 pieces (44 MB) of title buffers in the second of the crash. With #115: windows clean. So #115 is not only about the boot video.

2. #115 notes the other views clean. With #115, 747-870 pieces (34-40 MB) of title buffers were still stale in every run, the copy all zeros and title memory all 0xff. Those blocks are mapped views, read-only, noted copied. Cause: protect makes the other views of a page read-only through protect_here, which also notes them clean, though their copies never took the page. It shows here because one physical page is shown at five or six title addresses and each address has a host copy of its own (three title buffers and three windows for the pages I looked at). Fix with a failing test: Spexivus/victory-fork#1. With it: 0 stale pieces in 2 of 2 runs.

3. Copies another list numbers are skipped. memory::ready refreshes and declares copies once per list. In the builder's first two seconds, 16 dispatches found 210 copies their list had neither brought up to date nor declared written (13 of those lists store). Fixed in #370.

4. Tried, no effect: one host copy for all addresses of a page, for access by address. In the builder's first half second, over 512 of about 45,000 pages got a copy by address while another address of the same page already had one. Pointing them at the first copy (local switch, by-address directory only; root views and descriptors keep their own copies) changed nothing: 2 of 2 runs crash the same way.

Result. With 1-3 fixed, every declared range I can check equals title memory before the lists run, and the title still crashes at the same sites after 6-7 s (2 of 2 runs; 2 of 2 more with 4 as well). So stale copies at submission are ruled out as the cause, as far as this check reaches. It does not see: ranges still pending from an earlier declaration, copies in the card's memory, pages that cannot be read at that moment (up to 60 % of the window pieces declared in a second), and what happens between two stages inside one submission.

That last one is what I would look at next: several host copies of one physical page are only reconciled through title memory, after a submission. A stage that stores through one address and a later stage of the same submission that loads through another address of the same page (a root view or a descriptor, not by address) cannot see each other's bytes. I have not shown that the builder does this.

Also seen, in case it saves someone a run: with the builder on, 12 GB a frame is snapshotted and compared on the CPU (every numbered window is declared written by every storing list), 4.4 s a frame here with 0.2 s of it on the GPU, and the 1,023 numbered copies run out within 6 s with quarantine on.

AI use: Claude (Anthropic) in OpenCode, on my machine with my own copy of the title. Counts, addresses and log lines only; no game data.

**@⁠joroyt** on GitHub · 2026-11-25 00:06 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7148139980) **RTX 5070: the "stale inputs" guess measured. Three real defects in how host copies follow title memory, two fixed, and the crash is still there with all of them fixed.** **Setup:** RTX 5070 12 GB (32-lane waves, driver 32.0.16.2124), i9-14900KF, Windows 11, diag build, Series X profile, `2119b0e` + #156, `VICTORY_BVH_BUILDER=1`, no quarantine. The crash reproduces as above: 5-15 s after `the ray-tracing structure builder runs`, first sites `+0x8f92a`, `+0x4f38ba5`, `+0x27c195d`, `+0x5592694`, reading `0xffffffffffffffff`. About 20 short runs in all. **The check.** A local diagnostic compares every range a submission declares as written with title memory, right after the range's refresh and before the lists run. By the design they must be equal then (the merge only puts back bytes that differ from the snapshot, so a copy that is stale at that moment loses every store that happens to rewrite what the copy already held). A piece counts as stale for good when it differs at two checks in a row while the title's bytes did not change in between. **1. Writes through another view of the same pages are not seen.** Without #115, once the builder runs, 13-29 pieces of 64 KiB a second in windows are stale for good, plus 948 pieces (44 MB) of title buffers in the second of the crash. With #115: windows clean. So #115 is not only about the boot video. **2. #115 notes the other views clean.** With #115, 747-870 pieces (34-40 MB) of title buffers were still stale in every run, the copy all zeros and title memory all `0xff`. Those blocks are mapped views, read-only, noted copied. Cause: `protect` makes the other views of a page read-only through `protect_here`, which also notes them clean, though their copies never took the page. It shows here because one physical page is shown at five or six title addresses and each address has a host copy of its own (three title buffers and three windows for the pages I looked at). Fix with a failing test: Spexivus/victory-fork#1. With it: 0 stale pieces in 2 of 2 runs. **3. Copies another list numbers are skipped.** `memory::ready` refreshes and declares copies once per list. In the builder's first two seconds, 16 dispatches found 210 copies their list had neither brought up to date nor declared written (13 of those lists store). Fixed in #370. **4. Tried, no effect: one host copy for all addresses of a page, for access by address.** In the builder's first half second, over 512 of about 45,000 pages got a copy by address while another address of the same page already had one. Pointing them at the first copy (local switch, by-address directory only; root views and descriptors keep their own copies) changed nothing: 2 of 2 runs crash the same way. **Result.** With 1-3 fixed, every declared range I can check equals title memory before the lists run, and the title still crashes at the same sites after 6-7 s (2 of 2 runs; 2 of 2 more with 4 as well). So stale copies at submission are ruled out as the cause, as far as this check reaches. It does not see: ranges still pending from an earlier declaration, copies in the card's memory, pages that cannot be read at that moment (up to 60 % of the window pieces declared in a second), and what happens between two stages inside one submission. That last one is what I would look at next: several host copies of one physical page are only reconciled through title memory, after a submission. A stage that stores through one address and a later stage of the same submission that loads through another address of the same page (a root view or a descriptor, not by address) cannot see each other's bytes. I have not shown that the builder does this. Also seen, in case it saves someone a run: with the builder on, 12 GB a frame is snapshotted and compared on the CPU (every numbered window is declared written by every storing list), 4.4 s a frame here with 0.2 s of it on the GPU, and the 1,023 numbered copies run out within 6 s with quarantine on. AI use: Claude (Anthropic) in OpenCode, on my machine with my own copy of the title. Counts, addresses and log lines only; no game data.
Author
Owner

@⁠Etr0p on GitHub · 2026-11-25 00:31 UTC · original

Results from an RTX 5070 Ti Laptop (32-lane waves, Windows 11, NVIDIA driver 621.24), Series X profile, VICTORY_TEXTURE_GUARD=0, VICTORY_BVH_BUILDER=1. Counts and classes only.

The builder translates in full on 32 lanes. With an LDS read at an address every lane holds alike counted as wave-uniform (the idea of #36, also inside #156), the three 512-thread prefix-sum passes no longer ask for a half-wave exchange where not every lane runs. Offline with VICTORY_HOST_WAVE=32: 52 of 52 builder programs emit, pass dxil.dll validation and create host pipelines on this card. In game the log says the builder runs with all 53 pipelines. None of the 52 goes through an approximate wave64 form (VICTORY_WAVE_WHY shows no retry).

The title still crashes once the builder runs: in the world in the first run, then during the loading screen in later runs (about 70 to 106 s after start), always with access violations on several threads and no device loss.

What I checked, with a local diagnostic that logs every copy-back into title memory, the pipelines of each submission, and the addresses each builder dispatch is given (root views and address pairs in its root constants):

  • The builder's submissions write back about 200 to 270 MB into about 230 windows of 4 MiB, plus the 64 MiB buffer the builder uses. Every window they write had been given to some builder dispatch: 0 windows written that no dispatch was given. 0 lost accesses ("pages that had no copy": none).
  • The 64 MiB buffer starts out zeroed; what the builder writes there is float geometry (bounds, coordinates) and about 2 million dwords of -1. Nothing looks like a counter or size going wrong.
  • None of the faulting threads' object pointers lies in or near memory the GPU wrote back.
  • At the crash, the title handles node values as pointers. Faulting reads are at all-ones, or at an address whose low 32 bits are a float and whose high bits are 0; other faulting threads hold f16 ±inf pairs (the empty-box pattern) and f32 ±inf pairs in their registers.

So the builder writes where it is told to, and the content of its main buffer looks sane, yet the title ends up reading node data (f16/f32 bounds, -1) where it expects pointers, in objects the GPU did not write. My guess is that the title derives something on the CPU from a builder result, or expects a part of a structure that the builder writes differently here.

Ruled out on this setup: #205 (copies numbered by another list) alone does not change it. #349 does not apply, since none of the 52 builder programs uses v_div_fixup_f32. #354 does not apply either: the four wave64 builder programs already exchange halves, read only the wave number with v_readfirstlane, and have no v_fmac accumulators.

A natural next check would be a run with VICTORY_BVH_QUARANTINE=1 on the same build, to confirm that it is the copied-back results that poison the title.

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

**@⁠Etr0p** on GitHub · 2026-11-25 00:31 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7148598436) Results from an RTX 5070 Ti Laptop (32-lane waves, Windows 11, NVIDIA driver 621.24), Series X profile, `VICTORY_TEXTURE_GUARD=0`, `VICTORY_BVH_BUILDER=1`. Counts and classes only. **The builder translates in full on 32 lanes.** With an LDS read at an address every lane holds alike counted as wave-uniform (the idea of #36, also inside #156), the three 512-thread prefix-sum passes no longer ask for a half-wave exchange where not every lane runs. Offline with `VICTORY_HOST_WAVE=32`: 52 of 52 builder programs emit, pass dxil.dll validation and create host pipelines on this card. In game the log says the builder runs with all 53 pipelines. None of the 52 goes through an approximate wave64 form (`VICTORY_WAVE_WHY` shows no retry). **The title still crashes once the builder runs:** in the world in the first run, then during the loading screen in later runs (about 70 to 106 s after start), always with access violations on several threads and no device loss. What I checked, with a local diagnostic that logs every copy-back into title memory, the pipelines of each submission, and the addresses each builder dispatch is given (root views and address pairs in its root constants): - The builder's submissions write back about 200 to 270 MB into about 230 windows of 4 MiB, plus the 64 MiB buffer the builder uses. **Every window they write had been given to some builder dispatch:** 0 windows written that no dispatch was given. 0 lost accesses ("pages that had no copy": none). - The 64 MiB buffer starts out zeroed; what the builder writes there is float geometry (bounds, coordinates) and about 2 million dwords of -1. Nothing looks like a counter or size going wrong. - None of the faulting threads' object pointers lies in or near memory the GPU wrote back. - **At the crash, the title handles node values as pointers.** Faulting reads are at all-ones, or at an address whose low 32 bits are a float and whose high bits are 0; other faulting threads hold f16 ±inf pairs (the empty-box pattern) and f32 ±inf pairs in their registers. So the builder writes where it is told to, and the content of its main buffer looks sane, yet the title ends up reading node data (f16/f32 bounds, -1) where it expects pointers, in objects the GPU did not write. My guess is that the title derives something on the CPU from a builder result, or expects a part of a structure that the builder writes differently here. Ruled out on this setup: #205 (copies numbered by another list) alone does not change it. #349 does not apply, since none of the 52 builder programs uses `v_div_fixup_f32`. #354 does not apply either: the four wave64 builder programs already exchange halves, read only the wave number with `v_readfirstlane`, and have no `v_fmac` accumulators. A natural next check would be a run with `VICTORY_BVH_QUARANTINE=1` on the same build, to confirm that it is the copied-back results that poison the title. AI-assisted (Claude Code); measured on my own machine.
Author
Owner

@⁠Yorivel on GitHub · 2026-11-25 01:47 UTC · original

RTX 4090 (32-lane, driver 621.40), i9-14900K, diag build: reproduced, and one stale-input source ruled out.

Tree: a803c87 + #156 + #461 + #190 + the DirectStorage page-write fix from #62 (VICTORY_DSTORAGE_NOTIFY=1, branch fix/dstorage-notify-on-a803c87 on Yorivel/victory-fork). Switches: VICTORY_BVH_BUILDER=1 VICTORY_RELAY=2 VICTORY_SHADER_OPT=0 VICTORY_SHADER_LOOP_LIMIT=256.

  • the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53.
  • About 5 s later the title crashed: first sites +0x4f38ba5 (read 0xffffffffff000017), +0x164945e, +0x27c195d, +0x8f92a, +0x55ceb22, +0x52ec9f5, reading 0xffffffffffffffff on many threads. These are the same sites as joroyt's and Revens2's runs.
  • With VICTORY_BVH_QUARANTINE=1 it crashed too (+0x4e3390d), as expected without the sizes and counters coming back.

The DirectStorage fix brings the host copies of PAGE_DESTINATION reads up to date; without it, copies stayed stale for a whole run and the first room was missing in about 3 of 4 runs. It does not change this crash. So that source of stale builder inputs is ruled out, on top of the three defects joroyt fixed.

**@⁠Yorivel** on GitHub · 2026-11-25 01:47 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7149961036) **RTX 4090 (32-lane, driver 621.40), i9-14900K, diag build:** reproduced, and one stale-input source ruled out. Tree: `a803c87` + #156 + #461 + #190 + the DirectStorage page-write fix from #62 (`VICTORY_DSTORAGE_NOTIFY=1`, branch `fix/dstorage-notify-on-a803c87` on Yorivel/victory-fork). Switches: `VICTORY_BVH_BUILDER=1 VICTORY_RELAY=2 VICTORY_SHADER_OPT=0 VICTORY_SHADER_LOOP_LIMIT=256`. - `the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53`. - About 5 s later the title crashed: first sites `+0x4f38ba5` (read `0xffffffffff000017`), `+0x164945e`, `+0x27c195d`, `+0x8f92a`, `+0x55ceb22`, `+0x52ec9f5`, reading `0xffffffffffffffff` on many threads. These are the same sites as joroyt's and Revens2's runs. - With `VICTORY_BVH_QUARANTINE=1` it crashed too (`+0x4e3390d`), as expected without the sizes and counters coming back. The DirectStorage fix brings the host copies of PAGE_DESTINATION reads up to date; without it, copies stayed stale for a whole run and the first room was missing in about 3 of 4 runs. It does **not** change this crash. So that source of stale builder inputs is ruled out, on top of the three defects joroyt fixed.
Author
Owner

@⁠Yorivel on GitHub · 2026-11-25 02:10 UTC · original

RTX 4090, follow-up: some of the crash registers point into physical memory the title maps at three addresses at once. It's a lead, not a cause yet.

I added a local diagnostic (VICTORY_VIEW_LOG=<file> in xmem.rs) that writes every physical view mapped (base len section first-page) and unmapped, one line each. Then I replayed it up to the crash and looked up each register of the first reports. Same tree as above, VICTORY_BVH_BUILDER=1.

  • At the crash there are 122,708 views, and 60,221 pages are shown at two or more addresses. A log of each new view that shares pages with an existing one counted 272,001 such events before the crash.
  • Registers of crash reports that land in those views:
    • +0x27c195d and +0x4e51965: rbx 0x6cd220000, the same physical page as 0xccd220000 and 0xf1e580000
    • +0x4e51965: rbx 0x653aaa000, the same page as 0xc53aaa000 and 0xf7aa4a000
    • +0x4f38bb4 (write 0x80000010): rcx 0x65517c090, the same page as 0xc5517c090 and 0xef75ec090
  • The pattern holds throughout: a 0x6… address, a twin exactly 0x6_0000_0000 higher, and a third view at 0xf….
  • Other registers of the same reports (0xd3…, 0xdf…, 0xe0…) are in no physical view, so this is not every crash object.

Why it may matter: the traces above match GPU writes against the crashing objects by address. If a builder stage writes or reads through the 0xc…/0xf… view of a page that the CPU uses at 0x6…, an address match calls the object untouched, though it is the same memory. That is joroyt's open point (several host copies of one physical page, reconciled only through title memory). These runs show the crash objects sit in exactly such pages.

Not shown yet: that a builder dispatch is pointed at one of these twin addresses. Next I'll log each builder dispatch's root views and address constants and check them against the views at the crash.

**@⁠Yorivel** on GitHub · 2026-11-25 02:10 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7150398199) **RTX 4090, follow-up: some of the crash registers point into physical memory the title maps at three addresses at once.** It's a lead, not a cause yet. I added a local diagnostic (`VICTORY_VIEW_LOG=<file>` in `xmem.rs`) that writes every physical view mapped (`base len section first-page`) and unmapped, one line each. Then I replayed it up to the crash and looked up each register of the first reports. Same tree as above, `VICTORY_BVH_BUILDER=1`. - At the crash there are 122,708 views, and **60,221 pages are shown at two or more addresses**. A log of each new view that shares pages with an existing one counted 272,001 such events before the crash. - Registers of crash reports that land in those views: - `+0x27c195d` and `+0x4e51965`: `rbx 0x6cd220000`, the same physical page as `0xccd220000` and `0xf1e580000` - `+0x4e51965`: `rbx 0x653aaa000`, the same page as `0xc53aaa000` and `0xf7aa4a000` - `+0x4f38bb4` (write `0x80000010`): `rcx 0x65517c090`, the same page as `0xc5517c090` and `0xef75ec090` - The pattern holds throughout: a `0x6…` address, a twin exactly `0x6_0000_0000` higher, and a third view at `0xf…`. - Other registers of the same reports (`0xd3…`, `0xdf…`, `0xe0…`) are in no physical view, so this is not every crash object. Why it may matter: the traces above match GPU writes against the crashing objects **by address**. If a builder stage writes or reads through the `0xc…`/`0xf…` view of a page that the CPU uses at `0x6…`, an address match calls the object untouched, though it is the same memory. That is joroyt's open point (several host copies of one physical page, reconciled only through title memory). These runs show the crash objects sit in exactly such pages. Not shown yet: that a builder dispatch is pointed at one of these twin addresses. Next I'll log each builder dispatch's root views and address constants and check them against the views at the crash.
Author
Owner

@⁠Yorivel on GitHub · 2026-11-25 02:13 UTC · original

RTX 4090, follow-up 2: a builder dispatch and a crashing CPU object on the same physical page, through the two twin addresses.

Same tree, plus a second local diagnostic: VICTORY_BVH_ADDR_LOG=1 in draw.rs logs each builder dispatch that runs, with its roots, in the format of list_dropped_roots. 12,425 builder dispatches were logged before the crash, and their root views and address pairs name 2,973 physical pages, resolved through the view log at the crash.

The match:

  • Crash at image+0x2bd385b, twice: read 0x28, then read 0x7c0001fc0028, with rbx 0x531eb9000. The object holds 0x7c0001fc0000 at +0x28, f16 +inf bound data where a pointer is expected.
  • That physical page is shown at 0x531eb0000 and at 0xb31eb0000 (+0x6_0000_0000).
  • Builder roots 1 and 2 are view 0xb31eb7100 in no buffer in 7 dispatches of three builder programs: caa78b8ca62bc3d6 (5), 5e68767498c57eb6 (1), 4ddd6f9702fab2a7 (1). An example of their roots:
    0=constants [1, ffffd3c0, 2380, 0, 47800000, 48000000, 47000000, 1, 3f800000, 0, 0, 462, …] 1=view 0xb31eb7100 in no buffer 2=view 0xb31eb7100 in no buffer 3=view 0x1b7ace79280 in no buffer 4=view 0xd6a6df840 in no buffer 5=view 0x100c805f04 in buffer 0x100b620000+0x4000000 …
  • So the CPU object sits 0x1f00 bytes past those two root views, on the same page, reached through the other address. An address-by-address trace of writes into title memory would not link the two.

What I can't tell yet is which of these happened:

  • (a) these stages write more than 0x1f00 bytes from 0xb31eb7100 (a size from a stale or wrong input, since a root view has no size here);
  • (b) the bytes reach 0x531eb9000 through the host copy kept for 0xb31eb… being merged back as a whole piece, over what the CPU wrote through 0x531eb… meanwhile;
  • (c) this memory is the builder's on the console too, and the title only reads it later.

Some other crash sites of the same run (+0x8f92a, +0x27c195d, +0x4f38ba5) have no register in a page the builder names, so this is one thread of it, not all of it.

The two diagnostics are small and opt-in, and I can push them as a branch if they're useful.

**@⁠Yorivel** on GitHub · 2026-11-25 02:13 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7150461672) **RTX 4090, follow-up 2: a builder dispatch and a crashing CPU object on the same physical page, through the two twin addresses.** Same tree, plus a second local diagnostic: `VICTORY_BVH_ADDR_LOG=1` in `draw.rs` logs each builder dispatch that runs, with its roots, in the format of `list_dropped_roots`. 12,425 builder dispatches were logged before the crash, and their root views and address pairs name 2,973 physical pages, resolved through the view log at the crash. The match: - Crash at `image+0x2bd385b`, twice: `read 0x28`, then `read 0x7c0001fc0028`, with **`rbx 0x531eb9000`**. The object holds **`0x7c0001fc0000`** at `+0x28`, f16 `+inf` bound data where a pointer is expected. - That physical page is shown at `0x531eb0000` and at **`0xb31eb0000`** (`+0x6_0000_0000`). - **Builder roots 1 and 2 are `view 0xb31eb7100 in no buffer`** in 7 dispatches of three builder programs: `caa78b8ca62bc3d6` (5), `5e68767498c57eb6` (1), `4ddd6f9702fab2a7` (1). An example of their roots: `0=constants [1, ffffd3c0, 2380, 0, 47800000, 48000000, 47000000, 1, 3f800000, 0, 0, 462, …] 1=view 0xb31eb7100 in no buffer 2=view 0xb31eb7100 in no buffer 3=view 0x1b7ace79280 in no buffer 4=view 0xd6a6df840 in no buffer 5=view 0x100c805f04 in buffer 0x100b620000+0x4000000 …` - So the CPU object sits **`0x1f00` bytes past those two root views, on the same page**, reached through the other address. An address-by-address trace of writes into title memory would not link the two. What I can't tell yet is which of these happened: - (a) these stages write more than `0x1f00` bytes from `0xb31eb7100` (a size from a stale or wrong input, since a root view has no size here); - (b) the bytes reach `0x531eb9000` through the host copy kept for `0xb31eb…` being merged back as a whole piece, over what the CPU wrote through `0x531eb…` meanwhile; - (c) this memory is the builder's on the console too, and the title only reads it later. Some other crash sites of the same run (`+0x8f92a`, `+0x27c195d`, `+0x4f38ba5`) have no register in a page the builder names, so this is one thread of it, not all of it. The two diagnostics are small and opt-in, and I can push them as a branch if they're useful.
Author
Owner

@⁠Yorivel on GitHub · 2026-11-25 02:16 UTC · original

RTX 4090, follow-up 3 (negative): re-copying pages shown at two addresses doesn't change the crash.

I tested reading (b) from my last note in its "stale reads" form. The local switch VICTORY_ALIAS_REFRESH=1 makes Shadow::copy_stale copy every page that the inplace view map shows at more than one address on every refresh, written or not. inplace.rs gets a per-(section, 64 KiB page) view count for this. So a write through the twin address can't leave a copy stale on that path.

Result: the builder runs (pipelines=53, 02:16:20.96), and the title crashes at the same first site +0x4f38ba5 (read 0xffffffffffffffff) at 02:16:28.1, about 7 s later, as without the switch.

So stale reads through the twin address on the normal refresh path are ruled out. This does not cover:

  • copies in the card's memory under the relay (card_dirty / card_merge_relay);
  • ranges a flight declared as shader-written, which a refresh skips;
  • the other direction: a copy-back through 0xb31eb… landing on bytes the CPU wrote through 0x531eb….

The switch and the logs are on diag/bvh-alias in Yorivel/victory-fork.

**@⁠Yorivel** on GitHub · 2026-11-25 02:16 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7150527653) **RTX 4090, follow-up 3 (negative): re-copying pages shown at two addresses doesn't change the crash.** I tested reading (b) from my last note in its "stale reads" form. The local switch `VICTORY_ALIAS_REFRESH=1` makes `Shadow::copy_stale` copy every page that the `inplace` view map shows at more than one address on every refresh, written or not. `inplace.rs` gets a per-(section, 64 KiB page) view count for this. So a write through the twin address can't leave a copy stale on that path. Result: the builder runs (`pipelines=53`, 02:16:20.96), and the title crashes at the same first site `+0x4f38ba5` (read `0xffffffffffffffff`) at 02:16:28.1, about 7 s later, as without the switch. So stale reads through the twin address on the normal refresh path are ruled out. This does not cover: - copies in the card's memory under the relay (`card_dirty` / `card_merge_relay`); - ranges a flight declared as shader-written, which a refresh skips; - the other direction: a copy-back through `0xb31eb…` landing on bytes the CPU wrote through `0x531eb…`. The switch and the logs are on `diag/bvh-alias` in Yorivel/victory-fork.
Author
Owner

@⁠Revens2 on GitHub · 2026-11-25 02:31 UTC · original

RTX 5070 (32-lane): bisection with a per-pipeline switch — the crash needs one of two builder pipelines (creation index 49 or 50); each alone is enough. No fix yet.

Setup: RTX 5070 12 GB, driver 32.0.16.2124, Windows 11 26200, diag build. main 4e17478 + #36 (merged locally) + the switch from #579 (VICTORY_BVH_SKIP=<indices/ranges>; builder pipelines are numbered in creation order, 0-52 here, and logged as ray-tracing structure builder pipeline index=N shaders=[hash]). VICTORY_BVH_BUILDER=1, no quarantine. A skipped index drops that pipeline's dispatches; all others run. Counts and log lines only, no game data.

Control (no skip): the ray-tracing structure builder runs ... pipelines=53, then 13 unhandled exception 0xc0000005 lines (reads of 0xffffffffffffffff, image+0x8f92a, +0x4f38ba5, +0x27c195d, same sites as above), process exit -1073741819, 0 device removals.

skip builder runs result (run ends at 200 s or at the crash)
none yes crash ~13 s after the builder line (exit -1073741819)
0-26 yes crash
27-39 yes crash
27-52 yes no crash, 0 exceptions, ~100 s after the builder line
40-52 yes no crash
40-46 yes crash
47-52 yes no crash
47-49 yes crash (so 50-52 suffice)
50-52 yes crash (so 47-49 suffice)
all of 47-52 but 47 / 48 yes no crash
all of 47-52 but 49 yes crash
all of 47-52 but 50 yes crash
all of 47-52 but 51 / 52 yes no crash

So with pipelines 0-48 and 51-52 skipped or not, the title survives as long as 49 and 50 are both dropped, and it crashes when either one runs. Their title shader hashes: caa78b8ca62bc3d6 (container 11,840 bytes) and 28918b7150a7aad5 (11,052 bytes); stage 48 (38,248 bytes) alone does not crash.

What this does and does not show:

  • It points at the last stages of the builder, not at f16 conversions, the first-lane approximation of #36 or the early prefix-sum passes (skipping 0-26 or 27-39 alone changes nothing).
  • Dropping 49/50 also drops their outputs, so "no crash" does not mean the rest is right: the title may simply not walk structures that were never built. non verifie: what the title shows or does without them (the runs stayed on the loading screen).
  • I have not read these two programs' instructions; I do not know yet what in them leaves the box bounds / pointers the title reads wrong. Next step on my side: census of the two programs (wave ops, atomics, 64-bit address math) against the other 50, then a targeted check of whichever feature is unique to them.

Note on the runner: with two sessions running, a single ENTER at 48 s was not delivered in 3 of my runs (stuck on the profile selector); those runs are discarded above and repeated with ENTER at 40/55/70/85/100/115 s.

AI-assisted (Claude Code, Claude Sonnet 5.5): the runs are mine, on my own copy of the title.

**@⁠Revens2** on GitHub · 2026-11-25 02:31 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7150826579) **RTX 5070 (32-lane): bisection with a per-pipeline switch — the crash needs one of two builder pipelines (creation index 49 or 50); each alone is enough. No fix yet.** **Setup:** RTX 5070 12 GB, driver 32.0.16.2124, Windows 11 26200, diag build. `main` `4e17478` + #36 (merged locally) + the switch from #579 (`VICTORY_BVH_SKIP=<indices/ranges>`; builder pipelines are numbered in creation order, 0-52 here, and logged as `ray-tracing structure builder pipeline index=N shaders=[hash]`). `VICTORY_BVH_BUILDER=1`, no quarantine. A skipped index drops that pipeline's dispatches; all others run. Counts and log lines only, no game data. Control (no skip): `the ray-tracing structure builder runs ... pipelines=53`, then 13 `unhandled exception 0xc0000005` lines (reads of `0xffffffffffffffff`, `image+0x8f92a`, `+0x4f38ba5`, `+0x27c195d`, same sites as above), process exit `-1073741819`, 0 device removals. | skip | builder runs | result (run ends at 200 s or at the crash) | |---|---|---| | none | yes | crash ~13 s after the builder line (exit `-1073741819`) | | 0-26 | yes | crash | | 27-39 | yes | crash | | 27-52 | yes | no crash, 0 exceptions, ~100 s after the builder line | | 40-52 | yes | no crash | | 40-46 | yes | crash | | 47-52 | yes | no crash | | 47-49 | yes | crash (so 50-52 suffice) | | 50-52 | yes | crash (so 47-49 suffice) | | all of 47-52 but 47 / 48 | yes | no crash | | all of 47-52 but 49 | yes | **crash** | | all of 47-52 but 50 | yes | **crash** | | all of 47-52 but 51 / 52 | yes | no crash | So with pipelines 0-48 and 51-52 skipped or not, the title survives as long as 49 and 50 are both dropped, and it crashes when either one runs. Their title shader hashes: `caa78b8ca62bc3d6` (container 11,840 bytes) and `28918b7150a7aad5` (11,052 bytes); stage 48 (38,248 bytes) alone does not crash. What this does and does not show: - It points at the last stages of the builder, not at f16 conversions, the first-lane approximation of #36 or the early prefix-sum passes (skipping 0-26 or 27-39 alone changes nothing). - Dropping 49/50 also drops their outputs, so "no crash" does not mean the rest is right: the title may simply not walk structures that were never built. `non verifie`: what the title shows or does without them (the runs stayed on the loading screen). - I have not read these two programs' instructions; I do not know yet what in them leaves the box bounds / pointers the title reads wrong. Next step on my side: census of the two programs (wave ops, atomics, 64-bit address math) against the other 50, then a targeted check of whichever feature is unique to them. Note on the runner: with two sessions running, a single ENTER at 48 s was not delivered in 3 of my runs (stuck on the profile selector); those runs are discarded above and repeated with ENTER at 40/55/70/85/100/115 s. _AI-assisted (Claude Code, Claude Sonnet 5.5): the runs are mine, on my own copy of the title._
Author
Owner

@⁠Yorivel on GitHub · 2026-11-25 02:35 UTC · original

RTX 4090, follow-up 4: the builder's memory above the 40-bit directory, found and moved low. The crash stays.

memory.rs's directory for raw-address access covers the first 128 GiB (MEMORY_PAGES = 1 << 21). A pointer past it is clamped to the last entry, which is never filled, so the access reads 0 or its store is dropped. Nothing logs it, since map() returns early for that page. In my runs 83% of builder dispatches (10,297 of 12,425) had root views or address constants above 128 GiB, at 0x16…–0x23…, private host memory.

The source was list.rs allocate_upload: per its own comment, the builder's instance descriptions go there, and they were backed by vec![0u8; len] on the host heap. On the way I also ruled out the title's CRT malloc, its VirtualAlloc without an address, XMemAllocDefault and device heaps; none of them held builder memory.

A local switch, VICTORY_LOW_HEAP=1 on diag/bvh-alias (Yorivel/victory-fork), places these blocks below 128 GiB with VirtualAlloc2 address requirements (68–120 GiB). It does the same for heaps from our allocator, the title's malloc (an RtlCreateHeap heap in a 1 GiB region) and address-less VirtualAlloc. With it:

  • 0 of the builder's root views are above 128 GiB (7,542 now in the low range), and the log has no "touched pages that had no copy" line.
  • The crash is unchanged: same first site +0x4f38ba5 (read 0xffffffffffffffff), about 11 s after the builder starts.

So lost raw-address accesses are not the cause either. The allocate_upload placement is still a real defect for anything that walks the instance descriptions by pointer, so it may be worth keeping. Ruled out so far on this 4090: stale reads through twin addresses (follow-up 3), and memory above the directory (this note).

**@⁠Yorivel** on GitHub · 2026-11-25 02:35 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7150928538) **RTX 4090, follow-up 4: the builder's memory above the 40-bit directory, found and moved low. The crash stays.** `memory.rs`'s directory for raw-address access covers the first 128 GiB (`MEMORY_PAGES = 1 << 21`). A pointer past it is clamped to the last entry, which is never filled, so the access reads 0 or its store is dropped. Nothing logs it, since `map()` returns early for that page. In my runs **83% of builder dispatches (10,297 of 12,425) had root views or address constants above 128 GiB**, at `0x16…`–`0x23…`, private host memory. The source was **`list.rs` `allocate_upload`**: per its own comment, the builder's instance descriptions go there, and they were backed by `vec![0u8; len]` on the host heap. On the way I also ruled out the title's CRT `malloc`, its `VirtualAlloc` without an address, `XMemAllocDefault` and device heaps; none of them held builder memory. A local switch, `VICTORY_LOW_HEAP=1` on `diag/bvh-alias` (Yorivel/victory-fork), places these blocks below 128 GiB with `VirtualAlloc2` address requirements (68–120 GiB). It does the same for heaps from our allocator, the title's `malloc` (an `RtlCreateHeap` heap in a 1 GiB region) and address-less `VirtualAlloc`. With it: - **0 of the builder's root views are above 128 GiB** (7,542 now in the low range), and the log has no "touched pages that had no copy" line. - **The crash is unchanged**: same first site `+0x4f38ba5` (read `0xffffffffffffffff`), about 11 s after the builder starts. So lost raw-address accesses are not the cause either. The `allocate_upload` placement is still a real defect for anything that walks the instance descriptions by pointer, so it may be worth keeping. Ruled out so far on this 4090: stale reads through twin addresses (follow-up 3), and memory above the directory (this note).
Author
Owner

@⁠Yorivel on GitHub · 2026-11-25 02:43 UTC · original

RTX 4090, follow-up 5: builder node data written back over a crashing object, through the twin address.

A new local diagnostic, VICTORY_WRITEBACK_LOG=<file> in host.rs, logs every write of ours into title memory (write_mapped / copy_mapped to the title): address, length, which merge made it (copy_back, relay_merge, card_merge, card_merge_relay) and its first 64 bytes. I matched those writes against the crash registers by physical page, using the view log.

Run 1 (contents not logged yet): four crash sites had their object written back once, shortly before the crash, each time through the other address of the same page:

  • +0x4f38bb4, rcx 0x6d30f9610, written through 0xcd30f9610
  • +0x2bd385b, rcx 0x69043beb0, written through 0xc9043beb0
  • +0x4f4884f, rbx 0x12dac2600, written through 0x72dac2600
  • +0x4684e7, rcx 0x699270000, written through 0xc99270004

Run 2 (with contents): two crashes at +0x2bd385b (read 0x28), with rbx 0x68ef0fc00 and rbx 0x6cac69000. Each object was written once, by relay_merge, through 0xc8ef0fc00 and 0xccac69000. The two writes:

0xc8ef00000 len 0xfff0 relay_merge: ffffffff ffffffff ffffffff ffffffff 0000807f 0000807f 0000807f 000080ff 000080ff 000080ff 0000807f …
0xccac60000 len 0xea80 relay_merge: ef07df07 f0077507 ffffffff ffffffff 0000807f 0000807f 00000000 000080ff 000080ff …

These are f32 +inf/-inf empty-box bounds and -1 words: builder output. One merge put almost a whole 64 KiB page of it at 0xc8ef00000…. The CPU object the crashing code reads sits at +0xfc00 of the same physical page, through 0x68ef0….

Together with follow-up 3 (re-copying aliased pages changes nothing), this says the GPU-side builder really writes node data over memory the title uses for live CPU objects, and VIctory's merge faithfully copies it back. That points at the builder writing more, or further, than the title sized its memory for. One likely cause is a count or size the GPU stages read differently from what the CPU side used for the prebuild size.

Merges by kind in run 2: relay_merge 5,584 (264 MB), card_merge_relay 1,507, copy 2,304. Next I'll pair these writes with the builder dispatch roots (VICTORY_BVH_ADDR_LOG) to name the stage and see how far past its root view it writes. Diagnostics on diag/bvh-alias (Yorivel/victory-fork).

**@⁠Yorivel** on GitHub · 2026-11-25 02:43 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7151089794) **RTX 4090, follow-up 5: builder node data written back over a crashing object, through the twin address.** A new local diagnostic, `VICTORY_WRITEBACK_LOG=<file>` in `host.rs`, logs every write of ours into title memory (`write_mapped` / `copy_mapped` to the title): address, length, which merge made it (`copy_back`, `relay_merge`, `card_merge`, `card_merge_relay`) and its first 64 bytes. I matched those writes against the crash registers **by physical page**, using the view log. Run 1 (contents not logged yet): four crash sites had their object written back once, shortly before the crash, each time through the other address of the same page: - `+0x4f38bb4`, `rcx 0x6d30f9610`, written through `0xcd30f9610` - `+0x2bd385b`, `rcx 0x69043beb0`, written through `0xc9043beb0` - `+0x4f4884f`, `rbx 0x12dac2600`, written through `0x72dac2600` - `+0x4684e7`, `rcx 0x699270000`, written through `0xc99270004` Run 2 (with contents): two crashes at `+0x2bd385b` (`read 0x28`), with `rbx 0x68ef0fc00` and `rbx 0x6cac69000`. Each object was written once, by **`relay_merge`**, through `0xc8ef0fc00` and `0xccac69000`. The two writes: ``` 0xc8ef00000 len 0xfff0 relay_merge: ffffffff ffffffff ffffffff ffffffff 0000807f 0000807f 0000807f 000080ff 000080ff 000080ff 0000807f … 0xccac60000 len 0xea80 relay_merge: ef07df07 f0077507 ffffffff ffffffff 0000807f 0000807f 00000000 000080ff 000080ff … ``` These are f32 `+inf`/`-inf` empty-box bounds and `-1` words: builder output. One merge put almost a whole 64 KiB page of it at `0xc8ef00000…`. The CPU object the crashing code reads sits at `+0xfc00` of the same physical page, through `0x68ef0…`. Together with follow-up 3 (re-copying aliased pages changes nothing), this says the GPU-side builder really writes node data over memory the title uses for live CPU objects, and VIctory's merge faithfully copies it back. That points at the builder writing more, or further, than the title sized its memory for. One likely cause is a count or size the GPU stages read differently from what the CPU side used for the prebuild size. Merges by kind in run 2: `relay_merge` 5,584 (264 MB), `card_merge_relay` 1,507, `copy` 2,304. Next I'll pair these writes with the builder dispatch roots (`VICTORY_BVH_ADDR_LOG`) to name the stage and see how far past its root view it writes. Diagnostics on `diag/bvh-alias` (Yorivel/victory-fork).
Author
Owner

@⁠Yorivel on GitHub · 2026-11-25 02:44 UTC · original

RTX 4090, follow-up 6: the overwritten objects sit at fixed distances past one builder buffer (roots 1 and 2).

Run with VICTORY_BVH_ADDR_LOG and VICTORY_WRITEBACK_LOG together, matched by physical page:

crash object (CPU) written by builder root it lies past
+0x55ceb22 r13/r15 0x69b24e100 relay_merge through 0xc9b24e100 +0x20000 past roots 1/2 0xc9b22e100
+0x55ceb22 r13/r15 0x66228fc00 relay_merge through 0xc6228fc00 +0x6b00 past roots 1/2 0xc62289100

In every case roots 1 and 2 hold the same address, view … in no buffer, at a page start +0x100. The programs given that root, in this run and in the earlier ones:

  • caa78b8ca62bc3d6 (3,865 dispatches)
  • 28918b7150a7aad5 (2,134)
  • 4ddd6f9702fab2a7 (649)
  • 5e68767498c57eb6 (649)

Their root 0 constants look like a build description. Examples:

[3e580, ffffd6c0, 2200, 0, 47800000, 47800000, 47000000, 1, 3f800000, 0, 0, 22, 0, 3f800000, …]   (32x1x1)
[a9980, ffff9340, 3980, 0, 48800000, 46800000, 45800000, 1, 3f800000, 0, 0, 132, 0, 3f800000, …] (1x1x1)
[1,     fffff940, 400,  0, 47800000, 49000000, 46800000, 1, 3f800000, 0, 0, c,   0, 3f800000, …] (1x1x1)

Roots 3+ are the per-build inputs (0x11…, which VICTORY_LOW_HEAP placed low; allocate_upload) and the shared 0x100b620000+0x4000000 buffer.

If word 2 is the size of the region at roots 1/2 (0x400–0x3980 here), writes reaching +0x6b00 and +0x20000 are far past it, into memory the title has given to CPU objects. I don't know this builder's layout, so treat that as a reading, not a finding. If someone knows what roots 1/2 and word 2 are, the next check is whether these four programs' stores stay inside that size.

**@⁠Yorivel** on GitHub · 2026-11-25 02:44 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7151134141) **RTX 4090, follow-up 6: the overwritten objects sit at fixed distances past one builder buffer (roots 1 and 2).** Run with `VICTORY_BVH_ADDR_LOG` and `VICTORY_WRITEBACK_LOG` together, matched by physical page: | crash | object (CPU) | written by | builder root it lies past | |---|---|---|---| | `+0x55ceb22` | `r13/r15 0x69b24e100` | `relay_merge` through `0xc9b24e100` | **`+0x20000`** past roots 1/2 `0xc9b22e100` | | `+0x55ceb22` | `r13/r15 0x66228fc00` | `relay_merge` through `0xc6228fc00` | **`+0x6b00`** past roots 1/2 `0xc62289100` | In every case roots 1 and 2 hold the same address, `view … in no buffer`, at a page start `+0x100`. The programs given that root, in this run and in the earlier ones: - `caa78b8ca62bc3d6` (3,865 dispatches) - `28918b7150a7aad5` (2,134) - `4ddd6f9702fab2a7` (649) - `5e68767498c57eb6` (649) Their root 0 constants look like a build description. Examples: ``` [3e580, ffffd6c0, 2200, 0, 47800000, 47800000, 47000000, 1, 3f800000, 0, 0, 22, 0, 3f800000, …] (32x1x1) [a9980, ffff9340, 3980, 0, 48800000, 46800000, 45800000, 1, 3f800000, 0, 0, 132, 0, 3f800000, …] (1x1x1) [1, fffff940, 400, 0, 47800000, 49000000, 46800000, 1, 3f800000, 0, 0, c, 0, 3f800000, …] (1x1x1) ``` Roots 3+ are the per-build inputs (`0x11…`, which `VICTORY_LOW_HEAP` placed low; `allocate_upload`) and the shared `0x100b620000+0x4000000` buffer. If word 2 is the size of the region at roots 1/2 (0x400–0x3980 here), writes reaching `+0x6b00` and `+0x20000` are far past it, into memory the title has given to CPU objects. I don't know this builder's layout, so treat that as a reading, not a finding. If someone knows what roots 1/2 and word 2 are, the next check is whether these four programs' stores stay inside that size.
Author
Owner

@⁠Yorivel on GitHub · 2026-11-25 02:48 UTC · original

RTX 4090, follow-up 7: one crashing "object" is exactly a node slot the builder wrote as told. The output's content is wrong, not its place.

I read the native code of the four programs (victory shader-info --disasm XboxBvhBuilder.dll; containers found by BLAKE3 at 0x28770 caa78b8ca62bc3d6, 0x25c40 28918b7150a7aad5, 0x2b5b0 5e68767498c57eb6, 0x34b20 4ddd6f9702fab2a7).

  • caa78b8c writes one 64-byte node per thread at root2 + word0 + (group << 12) + tid * 64 (s28 = c[0] + (s4 << 12), v20 = v0 << 6 + s28): f16 box fields as 16-bit stores, child boxes min/max'd from +inf/-inf starts. There is no bounds check (num_records = -1), every thread writes, and it does 64-lane prefix sums (dpp8, permlanex16, v_readlane 32, s_bcnt1 exec).
  • 4ddd6f97 copies c[0] 16-byte records root 1 → root 2 (the same address), clearing bit 24. Thread 0 also stores -1 at root2 + d14 + ((((d12 << 3) & ~63) - d13) >> 4 & ~3), with d12..d14 read from the buffer at +48.

I then set the computed caa78b8c windows against the written-back crash objects (same run as follow-up 6):

  • +0x55ceb22, r13/r15 0x66228fc00: inside the window of the dispatch with root2 0xc62289100, word0 0x4480, 57 groups, exactly node slot 154 (64-byte aligned).
  • +0x55ceb22, r13/r15 0x69b24e100: outside every caa78b8c window by 0x1c80, probably a 28918b71 window (formula not traced yet).

So at least this one is not a stray store. The title's CPU code reads the builder's output through the CPU view (0x6…) of the same pages, as a CPU-side walk of the structure would. In the slot it expects a real node, with a pointer, it finds an empty-box node (+inf/-inf, -1).

I now read #16 as wrong builder results, not memory corruption: empty boxes where real nodes belong, which usually means the GPU stages saw empty or zero inputs (instances, primitives, counts). That would also explain the same crash on a 64-lane AMD card. Next step: check what the GPU-side copies of root 1 and root 3 (the per-build inputs) hold at these dispatches, against title memory.

**@⁠Yorivel** on GitHub · 2026-11-25 02:48 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7151219049) **RTX 4090, follow-up 7: one crashing "object" is exactly a node slot the builder wrote as told. The output's content is wrong, not its place.** I read the native code of the four programs (`victory shader-info --disasm XboxBvhBuilder.dll`; containers found by BLAKE3 at `0x28770` `caa78b8ca62bc3d6`, `0x25c40` `28918b7150a7aad5`, `0x2b5b0` `5e68767498c57eb6`, `0x34b20` `4ddd6f9702fab2a7`). - **`caa78b8c`** writes one **64-byte node per thread at `root2 + word0 + (group << 12) + tid * 64`** (`s28 = c[0] + (s4 << 12)`, `v20 = v0 << 6 + s28`): f16 box fields as 16-bit stores, child boxes min/max'd from `+inf`/`-inf` starts. There is no bounds check (`num_records = -1`), every thread writes, and it does 64-lane prefix sums (`dpp8`, `permlanex16`, `v_readlane 32`, `s_bcnt1 exec`). - **`4ddd6f97`** copies `c[0]` 16-byte records root 1 → root 2 (the same address), clearing bit 24. Thread 0 also stores `-1` at `root2 + d14 + ((((d12 << 3) & ~63) - d13) >> 4 & ~3)`, with `d12..d14` read from the buffer at `+48`. I then set the computed `caa78b8c` windows against the written-back crash objects (same run as follow-up 6): - `+0x55ceb22`, `r13/r15 0x66228fc00`: **inside** the window of the dispatch with `root2 0xc62289100`, `word0 0x4480`, 57 groups, **exactly node slot 154** (64-byte aligned). - `+0x55ceb22`, `r13/r15 0x69b24e100`: outside every `caa78b8c` window by `0x1c80`, probably a `28918b71` window (formula not traced yet). So at least this one is not a stray store. The title's CPU code reads the builder's output through the CPU view (`0x6…`) of the same pages, as a CPU-side walk of the structure would. In the slot it expects a real node, with a pointer, it finds an **empty-box node** (`+inf`/`-inf`, `-1`). I now read #16 as **wrong builder results**, not memory corruption: empty boxes where real nodes belong, which usually means the GPU stages saw empty or zero inputs (instances, primitives, counts). That would also explain the same crash on a 64-lane AMD card. Next step: check what the GPU-side copies of root 1 and root 3 (the per-build inputs) hold at these dispatches, against title memory.
Author
Owner

@⁠Yorivel on GitHub · 2026-11-25 02:51 UTC · original

RTX 4090, follow-up 8: a correction to 7, and every lane of caa78b8c writes a node.

Correction: the "empty output" reading in 7 doesn't hold. Of the write-backs landing in caa78b8c node windows, the first 64 bytes are a real node in 435 cases, an empty box in 167, zeros in 9. Empty boxes in unused child slots are normal for a 4-wide node, so the builder is not producing only empty trees.

What holds: caa78b8c saves the launch exec mask (s_mov_b64 s[22:23], exec at 0x2b4, after the 64-lane setup, before the v_cmpx_ne_u32 exec, 0, v10 count test) and restores it at 0x910, before the node stores at 0xa14…0xb14. So every lane of every group stores its 64-byte node at root2 + c[0] + (group << 12) + tid * 64, unbounded. Each dispatch writes exactly groups × 4 KiB, on the console as well.

With that, in the same run (649 builds by distinct root 2):

  • 284 builds have such a window reaching past where another build's root 2 starts. Small builds especially: a 1-group window (0x1000 + c[0]) on builds 0x400–0x800 apart, e.g. 0xb205e7100 (0x1240) → 0xb205e7900 (+0x800) → 0xb205e7d00 (+0x400).
  • The crashing object 0x66228fc00 is node slot 154 of a 57-group window (root2 0xc62289100, c[0] 0x4480), 0x6b00 into it.

Not settled yet: whether these overlaps are sequential reuse of one scratch area, which is harmless, or concurrent, which is a real overrun. That depends on the order of the builds and when the title consumes each result. If they are overruns, the group count (computed by the library's CPU side, possibly from sizes read back from earlier stages) is the number to doubt.

**@⁠Yorivel** on GitHub · 2026-11-25 02:51 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7151275704) **RTX 4090, follow-up 8: a correction to 7, and every lane of `caa78b8c` writes a node.** **Correction:** the "empty output" reading in 7 doesn't hold. Of the write-backs landing in `caa78b8c` node windows, the first 64 bytes are a real node in 435 cases, an empty box in 167, zeros in 9. Empty boxes in unused child slots are normal for a 4-wide node, so the builder is not producing only empty trees. **What holds:** `caa78b8c` saves the launch exec mask (`s_mov_b64 s[22:23], exec` at `0x2b4`, after the 64-lane setup, before the `v_cmpx_ne_u32 exec, 0, v10` count test) and restores it at `0x910`, before the node stores at `0xa14…0xb14`. So **every lane of every group stores its 64-byte node** at `root2 + c[0] + (group << 12) + tid * 64`, unbounded. Each dispatch writes exactly `groups × 4 KiB`, on the console as well. With that, in the same run (649 builds by distinct root 2): - **284 builds** have such a window reaching past where another build's root 2 starts. Small builds especially: a 1-group window (`0x1000` + `c[0]`) on builds `0x400`–`0x800` apart, e.g. `0xb205e7100` (`0x1240`) → `0xb205e7900` (`+0x800`) → `0xb205e7d00` (`+0x400`). - The crashing object `0x66228fc00` is node slot 154 of a **57-group** window (`root2 0xc62289100`, `c[0] 0x4480`), `0x6b00` into it. Not settled yet: whether these overlaps are sequential reuse of one scratch area, which is harmless, or concurrent, which is a real overrun. That depends on the order of the builds and when the title consumes each result. If they are overruns, the group count (computed by the library's CPU side, possibly from sizes read back from earlier stages) is the number to doubt.
Author
Owner

@⁠Yorivel on GitHub · 2026-11-25 02:55 UTC · original

RTX 4090, follow-up 9 (summary of tonight's checks): most crash objects are never written by the GPU side.

  • Without the relay (no VICTORY_RELAY, the builder on, the same logs) the title crashes the same way (+0x4f38ba5). Only one crash register in that run lies on bytes any write-back of ours covered (copy_back, outside every caa78b8c window).
  • In the relay runs, too, only 1–2 crash objects per run were written back (follow-ups 5–7). Each was written once, so no older copy overwrote newer data. The rest of the crash registers point at bytes no write_mapped/copy_mapped touched. VICTORY_INPLACE is off, so the GPU doesn't write title memory directly either.
  • The first site, +0x4f38ba5, is a generic refcounted release: mov rcx,[rcx+0x10]; mov rsi,[rcx+0x18]; lock dec [rcx+0x10] (function 0x4f38b80, an 8-way switch). The pointer at +0x10 of an ordinary CPU object was -1-ish.

So in this setup the bad values reach most crashing objects through the title's CPU code, which takes something the builder produced (a size, a count, an offset, -1) and passes it on into its own objects. The few direct overwrites (node slots of caa78b8c windows) look like consequences of the same wrong numbers, for example a group count of 57 for one build.

Ruled out here: stale twin-address reads (3), memory above the 40-bit directory (4, fixed by VICTORY_LOW_HEAP), merge order between two copies (8), relay timing (this one), direct in-place writes. The next useful step is on the CPU side: which builder result (postbuild sizes, counts, header words read back) the title consumes before the first bad pointer appears. Diagnostics and scripts are on diag/bvh-alias (Yorivel/victory-fork); happy to run anything on the 4090.

**@⁠Yorivel** on GitHub · 2026-11-25 02:55 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7151363753) **RTX 4090, follow-up 9 (summary of tonight's checks): most crash objects are never written by the GPU side.** - **Without the relay** (no `VICTORY_RELAY`, the builder on, the same logs) the title crashes the same way (`+0x4f38ba5`). Only one crash register in that run lies on bytes any write-back of ours covered (`copy_back`, outside every `caa78b8c` window). - In the relay runs, too, only 1–2 crash objects per run were written back (follow-ups 5–7). Each was written once, so no older copy overwrote newer data. The rest of the crash registers point at bytes no `write_mapped`/`copy_mapped` touched. `VICTORY_INPLACE` is off, so the GPU doesn't write title memory directly either. - The first site, `+0x4f38ba5`, is a generic refcounted release: `mov rcx,[rcx+0x10]; mov rsi,[rcx+0x18]; lock dec [rcx+0x10]` (function `0x4f38b80`, an 8-way switch). The pointer at `+0x10` of an ordinary CPU object was `-1`-ish. So in this setup the bad values reach most crashing objects **through the title's CPU code**, which takes something the builder produced (a size, a count, an offset, `-1`) and passes it on into its own objects. The few direct overwrites (node slots of `caa78b8c` windows) look like consequences of the same wrong numbers, for example a group count of 57 for one build. Ruled out here: stale twin-address reads (3), memory above the 40-bit directory (4, fixed by `VICTORY_LOW_HEAP`), merge order between two copies (8), relay timing (this one), direct in-place writes. The next useful step is on the CPU side: which builder result (postbuild sizes, counts, header words read back) the title consumes before the first bad pointer appears. Diagnostics and scripts are on `diag/bvh-alias` (Yorivel/victory-fork); happy to run anything on the 4090.
Author
Owner

@⁠Yorivel on GitHub · 2026-11-25 03:00 UTC · original

RTX 4090, follow-up 10: the node windows belong to rehydrations of disk-loaded structures, and 48 of 323 run into the next structure.

A new local diagnostic, VICTORY_BVH_CALLS=1 (crates/victory-hle/src/bvhcalls.rs), points the game exe's import slots for XboxBvhBuilder (prebuild info, BuildRaytracingAccelerationStructureBatched2X, RehydrateRaytracingAccelerationStructureBatched2X, CopyRaytracingAccelerationStructure; slots 0x6793f98/f88/fa0/f90 of this exe) at logging wrappers.

What the calls show:

  • Rehydrate batches of 16, e.g. dest=0xcc1e00100 source=0xcc1e00100 kind=1 descs=25. dest == source, at page +0x100, and the fifth argument is an array of CPU addresses of the same structures: 0x6c1e00100, the -0x6_0000_0000 twin. So the library gets both views: GPU addresses for its programs, CPU addresses for its own reads.
  • Build batches: descs 0x50 apart (dest, {kind, flags}, NumDescs, pGeometry, source, scratch = 0x100b620000, …). The dests are packed (0xd7227a400, 0xd7227b400, …). Prebuild answers are small (e.g. result_max 0xc00, scratch 0x4494 for one geometry).
  • In this run: 323 rehydrate entries, 28 build batches, 695 prebuild calls.

The match: all 323 rehydrate dests are caa78b8c window bases (its root 2). So caa78b8c is the in-place rehydration stage, and the windows from follow-ups 6–8 are rehydrations. Set against the next rehydrated structure in address order, 48 of 323 write nodes past its start:

dest 0x70efdc100: nodes up to +0x11880 (16 groups), next structure at +0x3000
dest 0x725a50100: nodes up to +0x1cd80 (23 groups), next at +0x8000
dest 0xb3fa5f100: nodes up to +0x4500  (4 groups),  next at +0x800
dest 0xc80a80100: nodes up to +0x2c180 (29 groups), next at +0x12200
dest 0xc8830e100: nodes up to +0x12200 (17 groups), next at +0x8000

Every lane of every group stores a node (follow-up 8), so 16 groups in a 12 KiB slot would corrupt memory on the console too. The group counts are therefore the suspect. The library computes them on the CPU from the structure's serialized header, which it reads through the CPU address. That header comes from the *_bvh4.rpf packs through DirectStorage (core_bvh4, story000_bvh4, shared_minigame000_bvh4 are opened in the log). If those bytes reach title memory wrong, or are read before they are complete, the counts and everything after them are wrong. That fits the same crash on AMD too.

Next I'll dump the serialized header (through the CPU address) at each rehydrate, for the 48 against the rest. Diagnostics on diag/bvh-alias.

**@⁠Yorivel** on GitHub · 2026-11-25 03:00 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7151494195) **RTX 4090, follow-up 10: the node windows belong to rehydrations of disk-loaded structures, and 48 of 323 run into the next structure.** A new local diagnostic, `VICTORY_BVH_CALLS=1` (`crates/victory-hle/src/bvhcalls.rs`), points the game exe's import slots for `XboxBvhBuilder` (prebuild info, `BuildRaytracingAccelerationStructureBatched2X`, `RehydrateRaytracingAccelerationStructureBatched2X`, `CopyRaytracingAccelerationStructure`; slots `0x6793f98`/`f88`/`fa0`/`f90` of this exe) at logging wrappers. What the calls show: - **Rehydrate** batches of 16, e.g. `dest=0xcc1e00100 source=0xcc1e00100 kind=1 descs=25`. **dest == source**, at page `+0x100`, and the fifth argument is an array of **CPU addresses of the same structures**: `0x6c1e00100`, the `-0x6_0000_0000` twin. So the library gets both views: GPU addresses for its programs, CPU addresses for its own reads. - **Build** batches: descs `0x50` apart (`dest, {kind, flags}, NumDescs, pGeometry, source, scratch = 0x100b620000, …`). The dests are packed (`0xd7227a400`, `0xd7227b400`, …). Prebuild answers are small (e.g. `result_max 0xc00, scratch 0x4494` for one geometry). - In this run: 323 rehydrate entries, 28 build batches, 695 prebuild calls. The match: **all 323 rehydrate dests are `caa78b8c` window bases** (its root 2). So `caa78b8c` is the in-place rehydration stage, and the windows from follow-ups 6–8 are rehydrations. Set against the next rehydrated structure in address order, **48 of 323 write nodes past its start**: ``` dest 0x70efdc100: nodes up to +0x11880 (16 groups), next structure at +0x3000 dest 0x725a50100: nodes up to +0x1cd80 (23 groups), next at +0x8000 dest 0xb3fa5f100: nodes up to +0x4500 (4 groups), next at +0x800 dest 0xc80a80100: nodes up to +0x2c180 (29 groups), next at +0x12200 dest 0xc8830e100: nodes up to +0x12200 (17 groups), next at +0x8000 ``` Every lane of every group stores a node (follow-up 8), so 16 groups in a 12 KiB slot would corrupt memory on the console too. The group counts are therefore the suspect. The library computes them on the CPU from the structure's serialized header, which it reads through the CPU address. That header comes from the `*_bvh4.rpf` packs through DirectStorage (`core_bvh4`, `story000_bvh4`, `shared_minigame000_bvh4` are opened in the log). If those bytes reach title memory wrong, or are read before they are complete, the counts and everything after them are wrong. That fits the same crash on AMD too. Next I'll dump the serialized header (through the CPU address) at each rehydrate, for the 48 against the rest. Diagnostics on `diag/bvh-alias`.
Author
Owner

@⁠Yorivel on GitHub · 2026-11-25 03:03 UTC · original

RTX 4090, follow-up 11: rehydrate headers look sane, and with batch-local pairing 70 of 648 rehydrations still reach the next structure.

The rehydrate wrapper now also logs the first 0x100 bytes of each structure through its CPU address, before the library reads them.

  • The headers look sane. Every one starts with 0x81020006, followed by plausible counts, f32 bounds and a size-like dword (dword 10). There is no visible difference between structures that overrun and ones that don't. So for these bytes the "DirectStorage delivers garbage" reading from follow-up 10 is weakened.
  • A correction to 10: there I took the largest group count ever seen at each address over the whole run, and streaming reuses addresses. Now each rehydrate batch (41 in this run, 648 structures) is paired with the caa78b8c dispatches recorded during its own call. Every structure had its own dispatches. 70 of 648 still have a window (c[0] + groups × 4 KiB, all lanes storing) reaching past the next structure of the same batch:
dest 0x70c000100: header n=5365 size=0x36100, 12 dispatches, max 365 groups, reach +0x1b1f00, next +0x100000
dest 0xc7c840100: header n=1735 size=0x11a00, 8 dispatches, max 94 groups,  reach +0x74c00,  next +0x60000
dest 0xc7c900100: header n=637  size=0x6700,  6 dispatches, max 40 groups,  reach +0x30180,  next +0x20000
dest 0xc5a430100: header n=246  size=0x2580,  6 dispatches, max 10 groups,  reach +0xd8c0,   next +0x4000

Caveat: the reach exceeds dword 10 for every structure, fine ones included (e.g. size 0x69880, reach 0xc1ac0). So either dword 10 is the dehydrated size and the slot the title allocates is meant for the expanded one, or not every caa78b8c dispatch writes nodes the way the 64-lane formula assumes. I can't separate the two without knowing how the title sizes each rehydrate slot. If someone knows where that size comes from (the rpf metadata, or a library call I haven't seen; the title imports Set64BitMortonCodes as well), that is the comparison to make.

**@⁠Yorivel** on GitHub · 2026-11-25 03:03 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7151546985) **RTX 4090, follow-up 11: rehydrate headers look sane, and with batch-local pairing 70 of 648 rehydrations still reach the next structure.** The rehydrate wrapper now also logs the first `0x100` bytes of each structure through its CPU address, **before** the library reads them. - **The headers look sane.** Every one starts with `0x81020006`, followed by plausible counts, f32 bounds and a size-like dword (dword 10). There is no visible difference between structures that overrun and ones that don't. So for these bytes the "DirectStorage delivers garbage" reading from follow-up 10 is weakened. - **A correction to 10:** there I took the largest group count ever seen at each address over the whole run, and streaming reuses addresses. Now each rehydrate batch (41 in this run, 648 structures) is paired with the `caa78b8c` dispatches recorded during its own call. Every structure had its own dispatches. **70 of 648** still have a window (`c[0] + groups × 4 KiB`, all lanes storing) reaching past the next structure of the same batch: ``` dest 0x70c000100: header n=5365 size=0x36100, 12 dispatches, max 365 groups, reach +0x1b1f00, next +0x100000 dest 0xc7c840100: header n=1735 size=0x11a00, 8 dispatches, max 94 groups, reach +0x74c00, next +0x60000 dest 0xc7c900100: header n=637 size=0x6700, 6 dispatches, max 40 groups, reach +0x30180, next +0x20000 dest 0xc5a430100: header n=246 size=0x2580, 6 dispatches, max 10 groups, reach +0xd8c0, next +0x4000 ``` Caveat: the reach exceeds dword 10 for **every** structure, fine ones included (e.g. `size 0x69880`, reach `0xc1ac0`). So either dword 10 is the dehydrated size and the slot the title allocates is meant for the expanded one, or not every `caa78b8c` dispatch writes nodes the way the 64-lane formula assumes. I can't separate the two without knowing how the title sizes each rehydrate slot. If someone knows where that size comes from (the rpf metadata, or a library call I haven't seen; the title imports `Set64BitMortonCodes` as well), that is the comparison to make.
Author
Owner

@⁠Yorivel on GitHub · 2026-11-25 03:10 UTC · original

Root cause found (RTX 4090): DispatchX's flag 0x20 means thread counts, and VIctory reads them as group counts

Short version. XboxBvhBuilder launches its in-place rehydration stage caa78b8ca62bc3d6 through DispatchX(x, 1, 1, flags = 0x20). 0x20 is USE_THREAD_DIMENSIONS in the GFX10 dispatch initiator: x is a number of threads. list.rs dispatch_x drops the flags (_flags) and launches x groups of 64. Every lane of that program stores a 64-byte node unconditionally (follow-up 8), so the extra lanes write up to 64× the node area, over neighbouring structures and title objects. Those are the empty-box nodes and -1s found in the crashing objects.

How it was found.

  • The dispatch-address log now records each builder dispatch's return addresses. Each program has a single call site in XboxBvhBuilder.dll: caa78b8c ← 0x153ba (3,972 dispatches), 28918b71 ← 0x15263, 4ddd6f97 ← 0x149c0, 5e687674 ← 0x14f06.
  • The code before 0x153ba, with its inline path for a list with room:
    mov dword [rax], 0x4003cc00 ; mov [rax+4], r14d ; mov dword [rax+8], 1 ; mov dword [rax+0xc], 1 ; mov dword [rax+0x10], 0x20
    
    and otherwise call [vtbl+0x280] with edx = r14d, r8d = r9d = 1, [rsp+0x20] = 0x20. That is DISPATCH_DIRECT's five dwords with the initiator 0x20 (bit 5, USE_THREAD_DIMENSIONS). 5e687674's call at 0x14f03, by contrast, computes groups itself ((N + 0x7ff) >> 11) and passes no initiator.
  • Against the rehydrate calls of the same run (VICTORY_BVH_CALLS, 648 structures in 41 batches, each paired with its own dispatches), the node reach c[0] + …:
    • x taken as groups (now): 70 of 648 structures write past the next structure of their batch.
    • x taken as threads: 0 of 648. The worst one: dest 0x70c000100, reach +0x1b1f00 as groups but +0x53d00 as threads, next structure at +0x100000.
    • Whole last groups (ceil(x/64) groups): still 21 of 648. 3,913 of 3,918 dispatches have x not a multiple of 64, so on the console the lanes past x don't run.

What a fix needs.

  1. dispatch_x with flags & 0x20: launch ceil(x / numthreads.x) (and y, z) groups.
  2. The lanes at or past x must not run. caa78b8c, 28918b71 and 4ddd6f97 contain no s_barrier (5e687674 has one), so for them an early exit at entry is safe. One way: a host-computed user-data dword (like USER_VIEW_BIAS) holding the thread limit, and a guard on the dispatch thread id.

Nothing in the fork or upstream handles thread-dimension dispatches yet (no USE_THREAD_DIMENSIONS anywhere). This also fits the AMD crash, since it doesn't depend on wave size. I'm trying step 1 next and will report whether the title gets past the builder.

**@⁠Yorivel** on GitHub · 2026-11-25 03:10 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7151654787) ## Root cause found (RTX 4090): `DispatchX`'s flag `0x20` means thread counts, and VIctory reads them as group counts **Short version.** `XboxBvhBuilder` launches its in-place rehydration stage `caa78b8ca62bc3d6` through `DispatchX(x, 1, 1, flags = 0x20)`. `0x20` is `USE_THREAD_DIMENSIONS` in the GFX10 dispatch initiator: x is a **number of threads**. `list.rs` `dispatch_x` drops the flags (`_flags`) and launches x **groups** of 64. Every lane of that program stores a 64-byte node unconditionally (follow-up 8), so the extra lanes write up to 64× the node area, over neighbouring structures and title objects. Those are the empty-box nodes and `-1`s found in the crashing objects. **How it was found.** - The dispatch-address log now records each builder dispatch's return addresses. Each program has a single call site in `XboxBvhBuilder.dll`: `caa78b8c` ← `0x153ba` (3,972 dispatches), `28918b71` ← `0x15263`, `4ddd6f97` ← `0x149c0`, `5e687674` ← `0x14f06`. - The code before `0x153ba`, with its inline path for a list with room: ``` mov dword [rax], 0x4003cc00 ; mov [rax+4], r14d ; mov dword [rax+8], 1 ; mov dword [rax+0xc], 1 ; mov dword [rax+0x10], 0x20 ``` and otherwise `call [vtbl+0x280]` with `edx = r14d`, `r8d = r9d = 1`, `[rsp+0x20] = 0x20`. That is DISPATCH_DIRECT's five dwords with the initiator `0x20` (bit 5, `USE_THREAD_DIMENSIONS`). `5e687674`'s call at `0x14f03`, by contrast, computes groups itself (`(N + 0x7ff) >> 11`) and passes no initiator. - Against the rehydrate calls of the same run (`VICTORY_BVH_CALLS`, 648 structures in 41 batches, each paired with its own dispatches), the node reach `c[0] + …`: - **x taken as groups** (now): 70 of 648 structures write past the next structure of their batch. - **x taken as threads**: **0 of 648**. The worst one: `dest 0x70c000100`, reach `+0x1b1f00` as groups but `+0x53d00` as threads, next structure at `+0x100000`. - Whole last groups (`ceil(x/64)` groups): still 21 of 648. 3,913 of 3,918 dispatches have x not a multiple of 64, so on the console the lanes past x don't run. **What a fix needs.** 1. `dispatch_x` with `flags & 0x20`: launch `ceil(x / numthreads.x)` (and y, z) groups. 2. The lanes at or past x must not run. `caa78b8c`, `28918b71` and `4ddd6f97` contain no `s_barrier` (`5e687674` has one), so for them an early exit at entry is safe. One way: a host-computed user-data dword (like `USER_VIEW_BIAS`) holding the thread limit, and a guard on the dispatch thread id. Nothing in the fork or upstream handles thread-dimension dispatches yet (no `USE_THREAD_DIMENSIONS` anywhere). This also fits the AMD crash, since it doesn't depend on wave size. I'm trying step 1 next and will report whether the title gets past the builder.
Author
Owner

@⁠Yorivel on GitHub · 2026-11-25 03:32 UTC · original

RTX 4090, follow-up 12: a fix for the thread-dimension dispatch removes the corruption storm. One crash is left, later and different.

Implemented on diag/bvh-alias (Yorivel/victory-fork) behind VICTORY_THREAD_DIMS=1:

  1. list.rs dispatch_x: with flags & 0x20, run ceil(x / numthreads) groups (the group size is read from the pipeline's native program, ComputeIo.threads).
  2. Lanes past x leave at once. A new host-computed user-data dword, USER_THREAD_LIMIT (0x104, next to USER_VIEW_BIAS), holds x for these dispatches and all ones otherwise. With the switch, the translator puts a guard at the entry of every compute program: threadId.x < limit, else branch to the existing abort exit. The shader cache key covers the switch. All 52 builder programs still translate, validate and create pipelines.

Results, with VICTORY_BVH_BUILDER=1 and everything else as in my earlier runs:

before step 1 only steps 1 + 2
caa78b8c groups per dispatch up to 365 at most 17 (3,896 of 4,022 are 1) same
reads of 0xffffffffffffffff dozens, many threads dozens 0
first-chance exceptions 10–20 many 1
crash after builder runs 5–11 s ~10 s 12.5 s, then 19.4 s in a second run

What is left differs from run to run and is a single fault:

  • run 1: +0x4f3b0ac. [rbp+0xc] held 0xff800000 (f32 -inf), used as an offset: read 0x21f68d0d0, reserved.
  • run 2 (traced): +0xf6349, read 0xf. The object rcx 0x12f5af1b0 was written back once (relay_merge, through twin 0x72f5af1b0) and lies +0x10b0 into a rehydrated structure at 0x72f5ae100. Its header says 0x700, but its caa78b8c dispatches already start at c0 = 0x880…0xa00 and the slot runs to +0x1471000. So this looks like the CPU reading its own rehydrated structure and finding something wrong in it, not an overrun into someone else's memory.

So the thread-dimension bug is real and fixed here, and it explains the bulk of #16 (the all-ones pointers). Something else is still off inside the rehydrated output. Next I'll log the original thread counts next to the converted dispatches, and the content written at the faulting object.

**@⁠Yorivel** on GitHub · 2026-11-25 03:32 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7152017826) **RTX 4090, follow-up 12: a fix for the thread-dimension dispatch removes the corruption storm. One crash is left, later and different.** Implemented on `diag/bvh-alias` (Yorivel/victory-fork) behind `VICTORY_THREAD_DIMS=1`: 1. `list.rs` `dispatch_x`: with `flags & 0x20`, run `ceil(x / numthreads)` groups (the group size is read from the pipeline's native program, `ComputeIo.threads`). 2. Lanes past x leave at once. A new host-computed user-data dword, `USER_THREAD_LIMIT` (`0x104`, next to `USER_VIEW_BIAS`), holds x for these dispatches and all ones otherwise. With the switch, the translator puts a guard at the entry of every compute program: `threadId.x < limit`, else branch to the existing abort exit. The shader cache key covers the switch. All 52 builder programs still translate, validate and create pipelines. Results, with `VICTORY_BVH_BUILDER=1` and everything else as in my earlier runs: | | before | step 1 only | steps 1 + 2 | |---|---|---|---| | `caa78b8c` groups per dispatch | up to 365 | at most 17 (3,896 of 4,022 are 1) | same | | reads of `0xffffffffffffffff` | dozens, many threads | dozens | **0** | | first-chance exceptions | 10–20 | many | **1** | | crash after `builder runs` | 5–11 s | ~10 s | 12.5 s, then 19.4 s in a second run | What is left differs from run to run and is a single fault: - run 1: `+0x4f3b0ac`. `[rbp+0xc]` held `0xff800000` (f32 `-inf`), used as an offset: `read 0x21f68d0d0`, reserved. - run 2 (traced): `+0xf6349`, `read 0xf`. The object `rcx 0x12f5af1b0` was written back once (`relay_merge`, through twin `0x72f5af1b0`) and lies `+0x10b0` into a rehydrated structure at `0x72f5ae100`. Its header says `0x700`, but its `caa78b8c` dispatches already start at `c0 = 0x880…0xa00` and the slot runs to `+0x1471000`. So this looks like the CPU reading its own rehydrated structure and finding something wrong in it, not an overrun into someone else's memory. So the thread-dimension bug is real and fixed here, and it explains the bulk of #16 (the all-ones pointers). Something else is still off inside the rehydrated output. Next I'll log the original thread counts next to the converted dispatches, and the content written at the faulting object.
Author
Owner

@⁠Yorivel on GitHub · 2026-11-25 03:38 UTC · original

RTX 4090, follow-up 13: with the thread-dimension fix the title loads the world with the builder on and runs 67 s.

Same setup as follow-up 12 (VICTORY_THREAD_DIMS=1), with the write-back log now keeping every write's bytes whole (<log>.bin) and the dispatch log the thread limit:

  • builder runs at 03:35:03. The world draws (3,563 draws/frame at 03:36:09, very slow because of the logging), and the only fault comes at 03:36:10, 67 s in. Before the fix, every builder run died within 5–19 s with dozens of all-ones reads.
  • All 6,685 caa78b8c dispatches carried the thread-dimension flag and ran thread-limited. None of their windows covers the crash object.

The last fault: +0x108557, read 0x7, rax 0x68ac4b400. That object was written once by relay_merge (through 0xc8ac4b3c0). The bytes around it:

-0x30: 02030000 00000000 08b6c48a 06000000   CPU records, pointers 0x68ac4b608 …
-0x10: 02030000 00000000 f8b4c48a 06000000
 0x00: ffffffff ffffffff ffffffff ffffffff   <- object: an empty 64-byte f16 box node
+0x10: 007c007c 007c00fc 00fc00fc 007c007c      (-1 children, +inf/-inf f16 bounds)
+0x40: ffffffff ffffffff ffffffff ffffffff      another one

It lies +0x5300 past the roots of the rehydration at 0xc8ac46100. Its thread-limited windows end earlier: caa78b8c (64-byte nodes at c0 + (g<<12) + tid*64) at +0x4dc0, and 28918b71 (128-byte box32 nodes at c0 + (g<<13) + tid*128, limits 23 and 6) at +0x4780. The snapshot a relay_merge compares against is the copy itself at submission (take_snapshots), so this was written by a shader in that flight.

Left as suspects: 5e687674 (1,024 threads per group, a plain Dispatch of ceil(N/2048) groups, no thread limit; the largest program, probably the decoder of the serialized nodes) and 4ddd6f97's -1 at an offset read from the data. I'll trace 5e687674's stores next.

**@⁠Yorivel** on GitHub · 2026-11-25 03:38 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7152100856) **RTX 4090, follow-up 13: with the thread-dimension fix the title loads the world with the builder on and runs 67 s.** Same setup as follow-up 12 (`VICTORY_THREAD_DIMS=1`), with the write-back log now keeping every write's bytes whole (`<log>.bin`) and the dispatch log the thread limit: - `builder runs` at 03:35:03. **The world draws** (3,563 draws/frame at 03:36:09, very slow because of the logging), and the only fault comes at 03:36:10, **67 s** in. Before the fix, every builder run died within 5–19 s with dozens of all-ones reads. - All 6,685 `caa78b8c` dispatches carried the thread-dimension flag and ran thread-limited. **None of their windows covers the crash object.** The last fault: `+0x108557`, `read 0x7`, `rax 0x68ac4b400`. That object was written once by `relay_merge` (through `0xc8ac4b3c0`). The bytes around it: ``` -0x30: 02030000 00000000 08b6c48a 06000000 CPU records, pointers 0x68ac4b608 … -0x10: 02030000 00000000 f8b4c48a 06000000 0x00: ffffffff ffffffff ffffffff ffffffff <- object: an empty 64-byte f16 box node +0x10: 007c007c 007c00fc 00fc00fc 007c007c (-1 children, +inf/-inf f16 bounds) +0x40: ffffffff ffffffff ffffffff ffffffff another one ``` It lies `+0x5300` past the roots of the rehydration at `0xc8ac46100`. Its thread-limited windows end earlier: `caa78b8c` (64-byte nodes at `c0 + (g<<12) + tid*64`) at `+0x4dc0`, and `28918b71` (128-byte box32 nodes at `c0 + (g<<13) + tid*128`, limits 23 and 6) at `+0x4780`. The snapshot a `relay_merge` compares against is the copy itself at submission (`take_snapshots`), so this was written by a shader in that flight. Left as suspects: `5e687674` (1,024 threads per group, a plain `Dispatch` of `ceil(N/2048)` groups, no thread limit; the largest program, probably the decoder of the serialized nodes) and `4ddd6f97`'s `-1` at an offset read from the data. I'll trace `5e687674`'s stores next.
Author
Owner

@⁠Revens2 on GitHub · 2026-11-25 04:14 UTC · original

RTX 5070 (32-lane): Yorivel's thread-dimension fix is active here and cuts the corruption storm, but one all-ones read at +0x8f92a still ends the run ~8 s after the builder starts. Twin-address resolution looks ruled out as a cause.

Thanks to Yorivel, joroyt, CoDrift, Etr0p and the others: follow-ups 11 and 12 and the write-back traces are what made this checkable.

Setup: RTX 5070 12 GB, driver 32.0.16.2124, Windows 11 26200, diag build. main 310c6eb + #36 (merged locally) + Yorivel's VICTORY_THREAD_DIMS commit (2521646, cherry-picked onto current main; the only conflict was the diagnostics block in draw.rs). VICTORY_BVH_BUILDER=1, no quarantine, one session at a time. Counts only, no game data. The cherry-pick plus a small unit-tested helper (thread_groups, round-up of thread counts to groups) is on Revens2:fix/issue-16-thread-dims if it saves anyone a rebase; I am not opening a PR on top of Yorivel's work.

run switches builder runs -> crash unhandled exceptions (first-chance sites)
A builder ~8 s 13 (+0x8f92a, +0x4f38ba5, +0x27c195d, +0x2bd385b, ...)
C builder ~8 s 11 (same sites)
B builder + VICTORY_THREAD_DIMS=1 ~6 s 5 (+0x8f92a x2, +0x4f38ba5, +0x2bd385b, +0x55ceb22)
D builder + VICTORY_THREAD_DIMS=1 ~8.5 s 1 (+0x8f92a, read 0xffffffffffffffff)

All four: process exit -1073741819, no device removal.

The switch is doing its job. A diagnostic line in run D shows the thread-dimension path taken: 44 logged dispatches, group size 64 for most of them, 32 for a few, e.g. x=665 becomes 11 groups, x=93 becomes 2, instead of 665 and 93. So the "x as groups" over-launch is real on this card too, and exceptions drop from 11-13 to 1-5. It does not remove the crash: one fault at +0x8f92a (read of all ones) is left. With two runs per arm I would not claim more than "fewer faults, same end".

On the twin-address idea (roots 1/2 view ... in no buffer): in no buffer is only the diagnostics line asking shadow::extent(address) whether a D3D buffer resource covers that title address. Rehydration roots point into raw title memory (dest == source, follow-up 10), so no buffer is expected. Nothing on the dispatch path classifies by that lookup. Together with follow-ups 3 and 4 (re-copying twin pages, memory above the directory: no change) and the fact that fixing the launch size removes most faults, I find no evidence that the address-to-buffer resolution is the cause. non verifie: whether a copy-back through the twin address still lands on CPU-written bytes in the remaining fault.

Regression: workspace cargo test --workspace --locked -- --test-threads=4 on the branch above: 511 passed, 0 failed, 9 ignored (the new test is pipeline::tests::thread_dimensions_round_up_to_whole_groups). No in-game run past the builder (the title never reached the world in any of the four runs).

Next on this card, if useful: the single remaining fault, with the builder's per-stage skip from #579 combined with thread dimensions to see whether it still needs one of the two late stages.

AI-assisted (Claude Code, Claude Sonnet 5.5): the runs are mine, on my own copy of the title.

**@⁠Revens2** on GitHub · 2026-11-25 04:14 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7152666901) **RTX 5070 (32-lane): Yorivel's thread-dimension fix is active here and cuts the corruption storm, but one all-ones read at `+0x8f92a` still ends the run ~8 s after the builder starts. Twin-address resolution looks ruled out as a cause.** Thanks to Yorivel, joroyt, CoDrift, Etr0p and the others: follow-ups 11 and 12 and the write-back traces are what made this checkable. **Setup:** RTX 5070 12 GB, driver 32.0.16.2124, Windows 11 26200, diag build. `main` `310c6eb` + #36 (merged locally) + Yorivel's `VICTORY_THREAD_DIMS` commit (`2521646`, cherry-picked onto current main; the only conflict was the diagnostics block in `draw.rs`). `VICTORY_BVH_BUILDER=1`, no quarantine, one session at a time. Counts only, no game data. The cherry-pick plus a small unit-tested helper (`thread_groups`, round-up of thread counts to groups) is on `Revens2:fix/issue-16-thread-dims` if it saves anyone a rebase; I am not opening a PR on top of Yorivel's work. | run | switches | builder runs -> crash | unhandled exceptions (first-chance sites) | |---|---|---|---| | A | builder | ~8 s | 13 (`+0x8f92a`, `+0x4f38ba5`, `+0x27c195d`, `+0x2bd385b`, ...) | | C | builder | ~8 s | 11 (same sites) | | B | builder + `VICTORY_THREAD_DIMS=1` | ~6 s | 5 (`+0x8f92a` x2, `+0x4f38ba5`, `+0x2bd385b`, `+0x55ceb22`) | | D | builder + `VICTORY_THREAD_DIMS=1` | ~8.5 s | 1 (`+0x8f92a`, read `0xffffffffffffffff`) | All four: process exit `-1073741819`, no device removal. **The switch is doing its job.** A diagnostic line in run D shows the thread-dimension path taken: 44 logged dispatches, group size 64 for most of them, 32 for a few, e.g. `x=665` becomes 11 groups, `x=93` becomes 2, instead of 665 and 93. So the "x as groups" over-launch is real on this card too, and exceptions drop from 11-13 to 1-5. It does not remove the crash: one fault at `+0x8f92a` (read of all ones) is left. With two runs per arm I would not claim more than "fewer faults, same end". **On the twin-address idea** (roots 1/2 `view ... in no buffer`): `in no buffer` is only the diagnostics line asking `shadow::extent(address)` whether a D3D buffer resource covers that title address. Rehydration roots point into raw title memory (dest == source, follow-up 10), so no buffer is expected. Nothing on the dispatch path classifies by that lookup. Together with follow-ups 3 and 4 (re-copying twin pages, memory above the directory: no change) and the fact that fixing the launch size removes most faults, I find no evidence that the address-to-buffer resolution is the cause. `non verifie`: whether a copy-back through the twin address still lands on CPU-written bytes in the remaining fault. Regression: workspace `cargo test --workspace --locked -- --test-threads=4` on the branch above: 511 passed, 0 failed, 9 ignored (the new test is `pipeline::tests::thread_dimensions_round_up_to_whole_groups`). No in-game run past the builder (the title never reached the world in any of the four runs). Next on this card, if useful: the single remaining fault, with the builder's per-stage skip from #579 combined with thread dimensions to see whether it still needs one of the two late stages. _AI-assisted (Claude Code, Claude Sonnet 5.5): the runs are mine, on my own copy of the title._
Author
Owner

@⁠loftymocha on GitHub · 2026-11-25 05:30 UTC · original

RTX 5070 (32-lane), fork main 310c6eb + #36 + #646 + #579: the builder runs, and the +0x8f92a all-ones read did not show in 2 runs. Both runs ended at two other sites. A control run with the builder off held.

Setup: RTX 5070 12 GB, driver 32.0.16.1742, Ryzen 7 7800X3D, 32 GB, Windows 11 Pro 26300, diag build. Tree: 310c6eb with #36, #646 and #579 merged locally (no conflicts), none of Yorivel's diag commits. VICTORY_BVH_BUILDER=1, VICTORY_SHADER_LOOP_LIMIT=256, otherwise fork defaults. This tree's cache was empty (its translate has no --cache), so shaders were translated at first use. Every run loads the same save (prison yard). Counts and addresses only, no game data.

run builder builder runs -> end world how it ended
B1 on pipelines=53 at 05:19:33, end 05:21:03 (~90 s) from 05:19:55, 0.2-0.3 fps, 2,200-4,800 draws/frame 0x80000003 (int3) at image+0x4da6315; stack +0x4db82c0 -> +0x4ec5342 -> +0x4ec514d -> +0x4ec4fab -> +0x4ec4dda -> +0x54bf63 -> +0x673a12 -> +0x79486d -> ... -> +0x2593e91 -> +0x2592d69 -> +0x2215eca
B2 on pipelines=53 at 05:23:33, end 05:23:54 (~21 s) not reached 0xc0000005 at image+0x23cf683 (write 0x0), stack +0x2215c35 -> +0x2215eca
C1 off - from 05:25:57, 0.2-1.0 fps no exception in ~3 min in the world; stopped by me (system memory at 95%)
  • PR #646 is on by default, so both builder runs used its thread-dimension handling. With two runs and two different end sites, I am not claiming that #646 removes the +0x8f92a read that Revens2 got on the same card with 2521646. It just did not show here, and B1 got past the ~8 s point to about 90 s.
  • B1: 18 × shaders touched pages that had no copy, 0 × no number left for another copy. With the builder on, world frames took 3 to 4.6 s. The shadow line reports 14,340 MB compared per frame in 3,585 ranges of windows outside buffers (the CPU cost described in #284). Breakpad reported memory.load_percent 86 at the crash.
  • B2 died before the world. In its last second, builder pipelines index 9 (f94e5d8bf4e1cf05) and index 31 (190fbf0ebe040169) were bound for the first time (frame 1322). That is only timing; I have not checked it as a cause. Marvisak/VIctory#1118 reports +0x23cf683 (write 0x0) without the builder, so B2 may be unrelated to it.

Next, if useful: more runs per arm, and #579's VICTORY_BVH_SKIP bisection on the +0x4da6315 int3 if it repeats.

AI-assisted (Claude Code, Claude Opus 5.5): the runs are mine, on my own copy of the title. Counts, hashes and addresses from the logs only.

**@⁠loftymocha** on GitHub · 2026-11-25 05:30 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7153843968) **RTX 5070 (32-lane), fork `main` `310c6eb` + #36 + #646 + #579: the builder runs, and the `+0x8f92a` all-ones read did not show in 2 runs. Both runs ended at two other sites. A control run with the builder off held.** **Setup:** RTX 5070 12 GB, driver 32.0.16.1742, Ryzen 7 7800X3D, 32 GB, Windows 11 Pro 26300, diag build. Tree: `310c6eb` with #36, #646 and #579 merged locally (no conflicts), none of Yorivel's diag commits. `VICTORY_BVH_BUILDER=1`, `VICTORY_SHADER_LOOP_LIMIT=256`, otherwise fork defaults. This tree's cache was empty (its `translate` has no `--cache`), so shaders were translated at first use. Every run loads the same save (prison yard). Counts and addresses only, no game data. | run | builder | builder runs -> end | world | how it ended | |---|---|---|---|---| | B1 | on | `pipelines=53` at 05:19:33, end 05:21:03 (~90 s) | from 05:19:55, 0.2-0.3 fps, 2,200-4,800 draws/frame | `0x80000003` (int3) at `image+0x4da6315`; stack `+0x4db82c0 -> +0x4ec5342 -> +0x4ec514d -> +0x4ec4fab -> +0x4ec4dda -> +0x54bf63 -> +0x673a12 -> +0x79486d -> ... -> +0x2593e91 -> +0x2592d69 -> +0x2215eca` | | B2 | on | `pipelines=53` at 05:23:33, end 05:23:54 (~21 s) | not reached | `0xc0000005` at `image+0x23cf683` (write 0x0), stack `+0x2215c35 -> +0x2215eca` | | C1 | off | - | from 05:25:57, 0.2-1.0 fps | no exception in ~3 min in the world; stopped by me (system memory at 95%) | - PR #646 is on by default, so both builder runs used its thread-dimension handling. With two runs and two different end sites, I am not claiming that #646 removes the `+0x8f92a` read that Revens2 got on the same card with `2521646`. It just did not show here, and B1 got past the ~8 s point to about 90 s. - B1: 18 × `shaders touched pages that had no copy`, 0 × `no number left for another copy`. With the builder on, world frames took 3 to 4.6 s. The shadow line reports 14,340 MB compared per frame in 3,585 ranges of windows outside buffers (the CPU cost described in #284). Breakpad reported `memory.load_percent` 86 at the crash. - B2 died before the world. In its last second, builder pipelines index 9 (`f94e5d8bf4e1cf05`) and index 31 (`190fbf0ebe040169`) were bound for the first time (frame 1322). That is only timing; I have not checked it as a cause. Marvisak/VIctory#1118 reports `+0x23cf683` (write 0x0) without the builder, so B2 may be unrelated to it. Next, if useful: more runs per arm, and #579's `VICTORY_BVH_SKIP` bisection on the `+0x4da6315` int3 if it repeats. _AI-assisted (Claude Code, Claude Opus 5.5): the runs are mine, on my own copy of the title. Counts, hashes and addresses from the logs only._
Author
Owner

@⁠loftymocha on GitHub · 2026-11-25 05:49 UTC · original

Follow-up, RTX 5070, same tree (310c6eb + #36 + #646 + #579): three more builder runs. The ends fall into two groups, and the +0x4da6315 int3 repeats.

Same setup as my comment above. Each run loads the same save, with the builder on (pipelines=53 logged in every run). The cache had been warmed by the earlier runs.

run builder runs -> end world reached how it ended
B1 ~90 s yes int3 0x80000003 at image+0x4da6315 (stack +0x4db82c0 -> ...)
B2 ~21 s no 0xc0000005 at image+0x23cf683, write 0x0 (stack +0x2215c35 -> +0x2215eca)
B3 ~114 s yes 0xc0000005 at image+0x4ee12b8, read 0x9fc0f522686 (nothing mapped); rax 0x800009fc0f522680, top bit set on an otherwise plausible address
B4 ~196 s yes int3 0x80000003 at image+0x4da6315 again (stack +0x4da62b9 -> +0x51e41b6 -> ...)
B5 ~5 s no 0xc0000005 at image+0x23cf683, write 0x0, same stack as B2
C1 (builder off) - yes no exception in ~3 min in the world (stopped by me)
  • Group 1, in the world (B1, B3, B4): 90 to 196 s after the builder starts, at 0.2 to 0.3 fps. All three stacks end in the same three frames: +0x2593e91 -> +0x2592d69 -> +0x2215eca. Two of the three are the same int3 at +0x4da6315, reached through two different callers. None is the +0x8f92a all-ones read.
  • Group 2, before the world (B2, B5): 5 to 21 s after the builder starts, during loading, at +0x23cf683 (Marvisak/VIctory#1118's site). My one control run without the builder did not hit it. One control is not enough to tie it to the builder.
  • In none of the five runs did I see the +0x8f92a read or a device removal.

Next on this card, if useful: more control runs, to tell whether group 2 comes from the builder, then a VICTORY_BVH_SKIP (#579) bisection on group 1. With group 1 ending 3 of 5 runs, each bisection step needs about 3 runs to read.

AI-assisted (Claude Code, Claude Opus 5.5): the runs are mine, on my own copy of the title. Counts, hashes and addresses from the logs only.

**@⁠loftymocha** on GitHub · 2026-11-25 05:49 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7154174301) **Follow-up, RTX 5070, same tree (`310c6eb` + #36 + #646 + #579): three more builder runs. The ends fall into two groups, and the `+0x4da6315` int3 repeats.** Same setup as my comment above. Each run loads the same save, with the builder on (`pipelines=53` logged in every run). The cache had been warmed by the earlier runs. | run | builder runs -> end | world reached | how it ended | |---|---|---|---| | B1 | ~90 s | yes | int3 `0x80000003` at `image+0x4da6315` (stack `+0x4db82c0 -> ...`) | | B2 | ~21 s | no | `0xc0000005` at `image+0x23cf683`, write 0x0 (stack `+0x2215c35 -> +0x2215eca`) | | B3 | ~114 s | yes | `0xc0000005` at `image+0x4ee12b8`, read 0x9fc0f522686 (nothing mapped); `rax 0x800009fc0f522680`, top bit set on an otherwise plausible address | | B4 | ~196 s | yes | int3 `0x80000003` at `image+0x4da6315` again (stack `+0x4da62b9 -> +0x51e41b6 -> ...`) | | B5 | ~5 s | no | `0xc0000005` at `image+0x23cf683`, write 0x0, same stack as B2 | | C1 (builder off) | - | yes | no exception in ~3 min in the world (stopped by me) | - **Group 1, in the world (B1, B3, B4):** 90 to 196 s after the builder starts, at 0.2 to 0.3 fps. All three stacks end in the same three frames: `+0x2593e91 -> +0x2592d69 -> +0x2215eca`. Two of the three are the same int3 at `+0x4da6315`, reached through two different callers. None is the `+0x8f92a` all-ones read. - **Group 2, before the world (B2, B5):** 5 to 21 s after the builder starts, during loading, at `+0x23cf683` (Marvisak/VIctory#1118's site). My one control run without the builder did not hit it. One control is not enough to tie it to the builder. - In none of the five runs did I see the `+0x8f92a` read or a device removal. Next on this card, if useful: more control runs, to tell whether group 2 comes from the builder, then a `VICTORY_BVH_SKIP` (#579) bisection on group 1. With group 1 ending 3 of 5 runs, each bisection step needs about 3 runs to read. _AI-assisted (Claude Code, Claude Opus 5.5): the runs are mine, on my own copy of the title. Counts, hashes and addresses from the logs only._
Author
Owner

@⁠Curry-976 on GitHub · 2026-11-25 05:53 UTC · original

Same pattern on an RTX 4050 Laptop GPU (6 GB, 32-lane): with #487 and VICTORY_BVH_BUILDER=1 the builder runs, then the title crashes 16 s later. Before the crash, title code reads 0xffffffffffffffff, and one faulting register holds 0x7c00… (half-float infinity). With VICTORY_BVH_QUARANTINE=1 it still crashes (39 s), and with the builder off it holds. Details: #487

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment.

**@⁠Curry-976** on GitHub · 2026-11-25 05:53 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7154231845) Same pattern on an RTX 4050 Laptop GPU (6 GB, 32-lane): with #487 and `VICTORY_BVH_BUILDER=1` the builder runs, then the title crashes 16 s later. Before the crash, title code reads `0xffffffffffffffff`, and one faulting register holds `0x7c00…` (half-float infinity). With `VICTORY_BVH_QUARANTINE=1` it still crashes (39 s), and with the builder off it holds. Details: https://git.gtahub.st/github/fxceless--victory-fork/pulls/487 AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment.
Author
Owner

@⁠Curry-976 on GitHub · 2026-11-25 06:09 UTC · original · edited 2026-11-25 06:12 UTC

RTX 4050 Laptop (6 GB, 32-lane), fork main 8dd30ab + #36 + #646 + #579: the builder runs for over 4 minutes with no exception and no crash. Earlier, #487 alone crashed 16 s after the builder started on this card.

Setup

  • 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.
  • Release build of 8dd30ab with #36, #646 and #579 merged locally (no conflicts). #487 conflicts with #36 and #646, so it is not in this tree.
  • Switches: VICTORY_BVH_BUILDER=1 VICTORY_RELAY=2.

Result

  • the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53 at 06:04:30. The log was still going at 06:08:32 with 0 first-chance exceptions and no breakpad report. No device removal. The run went from the opening cutscene into the prison yard.
  • Frames in the world: 0.2 fps, 4.2–5.3 s per frame at 1,500–1,900 draws. That breaks down as 1.9–2.3 s on the GPU, 1.9–2.8 s copying back and 2.2–2.9 s preparing (250–390 MB of copies per frame). With the builder off (#487 control run, same card), GPU time was about 0.1–0.3 s per frame.
  • Warnings:
    • 44 × shaders touched pages that had no copy
    • 1 × no number left for another copy; its pages read zeros COPIES=1023
    • 5 pixel shaders refused with a descriptor read only as data is not supported
  • Private memory reached 25 GB, with about 1.8 GB of commit left, so I would expect a long run on a 24 GB machine to end on memory rather than on the builder.

Earlier on this card, with #487 at f147507 (report)

  • Builder on: crash at 16 s, with the +0x8f92a all-ones read among the sites.
  • Quarantine: crash at 39 s.
  • Builder off: holds.

So on this card too, #36 + #646 remove the early crash, as loftymocha saw on an RTX 5070.

Not tested

  • A side-by-side of the same frame with and without the builder (see the update below for the comparison I could make).
  • More than one run, and runs past about 4 minutes.
  • The test suite.

Update: the shadowed areas do get light with the builder on. In the same prison-yard shot, the player at the window looking out over the yard, I compared this run against the #487 builder-off control on the same card:

  • Builder off: the window frame, the building on the right, the shaded ground and the building on the left are black silhouettes, and the shot is strongly backlit orange.
  • Builder on: the frame and its uprights are visible, the right-hand façade shows its windows and roof, the shaded ground carries the characters' shadows, and the left building's bricks and railing are readable. The light is soft and diffuse, with haze.

So on this card, the builder and the traces together put indirect light on screen, not only "no crash". Caveat: the image looks washed out and pinkish, with heavy haze. That may be partly wrong lighting from the zero-reading pages (COPIES=1023 was reached), or it may be correct for that time of day. I can't tell without a reference. The two trees also differ: the builder-on tree lacks #487's shader programs. That explains some of the hair and cloth difference, but not the light in the shaded areas.

AI-assisted (Claude Code, Claude Opus 5.5): the runs are mine, on my own copy of the title. Counts, addresses and timings from the logs only.

**@⁠Curry-976** on GitHub · 2026-11-25 06:09 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7154501102) · edited 2026-11-25 06:12 UTC **RTX 4050 Laptop (6 GB, 32-lane), fork `main` `8dd30ab` + #36 + #646 + #579: the builder runs for over 4 minutes with no exception and no crash. Earlier, #487 alone crashed 16 s after the builder started on this card.** **Setup** - 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. - Release build of `8dd30ab` with #36, #646 and #579 merged locally (no conflicts). #487 conflicts with #36 and #646, so it is not in this tree. - Switches: `VICTORY_BVH_BUILDER=1 VICTORY_RELAY=2`. **Result** - `the ray-tracing structure builder runs: all of its programs have host pipelines pipelines=53` at 06:04:30. The log was still going at 06:08:32 with 0 first-chance exceptions and no breakpad report. No device removal. The run went from the opening cutscene into the prison yard. - Frames in the world: 0.2 fps, 4.2–5.3 s per frame at 1,500–1,900 draws. That breaks down as 1.9–2.3 s on the GPU, 1.9–2.8 s copying back and 2.2–2.9 s preparing (250–390 MB of copies per frame). With the builder off (#487 control run, same card), GPU time was about 0.1–0.3 s per frame. - Warnings: - 44 × `shaders touched pages that had no copy` - 1 × `no number left for another copy; its pages read zeros COPIES=1023` - 5 pixel shaders refused with `a descriptor read only as data is not supported` - Private memory reached 25 GB, with about 1.8 GB of commit left, so I would expect a long run on a 24 GB machine to end on memory rather than on the builder. **Earlier on this card, with #487 at `f147507`** ([report](https://git.gtahub.st/github/fxceless--victory-fork/pulls/487)) - Builder on: crash at 16 s, with the `+0x8f92a` all-ones read among the sites. - Quarantine: crash at 39 s. - Builder off: holds. So on this card too, #36 + #646 remove the early crash, as loftymocha saw on an RTX 5070. **Not tested** - A side-by-side of the same frame with and without the builder (see the update below for the comparison I could make). - More than one run, and runs past about 4 minutes. - The test suite. **Update: the shadowed areas do get light with the builder on.** In the same prison-yard shot, the player at the window looking out over the yard, I compared this run against the #487 builder-off control on the same card: - Builder off: the window frame, the building on the right, the shaded ground and the building on the left are black silhouettes, and the shot is strongly backlit orange. - Builder on: the frame and its uprights are visible, the right-hand façade shows its windows and roof, the shaded ground carries the characters' shadows, and the left building's bricks and railing are readable. The light is soft and diffuse, with haze. So on this card, the builder and the traces together put indirect light on screen, not only "no crash". Caveat: the image looks washed out and pinkish, with heavy haze. That may be partly wrong lighting from the zero-reading pages (`COPIES=1023` was reached), or it may be correct for that time of day. I can't tell without a reference. The two trees also differ: the builder-on tree lacks #487's shader programs. That explains some of the hair and cloth difference, but not the light in the shaded areas. _AI-assisted (Claude Code, Claude Opus 5.5): the runs are mine, on my own copy of the title. Counts, addresses and timings from the logs only._
Author
Owner

@⁠loftymocha on GitHub · 2026-11-25 06:23 UTC · original

RTX 5070, first VICTORY_BVH_SKIP (#579) arms on the same tree: with the four rehydrate-stage pipelines dropped (indices 47-50), the in-world crash did not come back, and 2 of 3 runs held 4 min in the world with the rest of the builder running.

Same tree and settings as my two comments above. An unattended runner started each run and stopped it 240 s after the ray-tracing structure builder runs, or recorded how the title ended. Indices are #579's creation indices. I picked the arms by first-bind order in B4's log. The first batch at frame 1562 is 17 pipelines. Then come 47 (4ddd6f97), 48 (5e687674), 50 (28918b71) and 49 (caa78b8c), the programs Yorivel traces above. 14 later pipelines follow.

arm VICTORY_BVH_SKIP run 1 run 2 run 3
full builder (B1-B5, above) - 3 of 5 in-world crash (+0x4da6315 x2, +0x4ee12b8), 2 of 5 +0x23cf683, 0 held 4 min
late stages off 8-10,12,16-18,30-32,35,39,41,51 +0x23cf683, 50 s, loading +0x23cf683, 50 s, loading +0x23cf683, 85 s, in the world
rehydrate off 47-50 held 240 s in the world +0x23cf683, 65 s, loading held 240 s in the world
  • The drop summary of a 47-50 run shows only those four skipped: 166.2/frame (49), 93.8 (50), 27.4 (47), 27.4 (48). No other builder pipeline appears in it, so the other builder stages ran.
  • The in-world crash (stacks ending +0x2593e91 -> +0x2592d69 -> +0x2215eca) did not occur in any of the 6 skip runs. With the rehydrate stage off, two runs reached the 4 min cap, which no full-builder run did. That fits Yorivel's reading that the CPU trips over what the rehydration writes.
  • The late-stages arm does not tell us much about the in-world crash: all three runs ended at +0x23cf683 before or around the time the in-world crash usually comes (90-196 s).
  • +0x23cf683 (write 0x0) ended 6 of 11 builder runs across all arms, once in the world (85 s). I count it as a separate problem (Marvisak/VIctory#1118). My single control run without the builder did not hit it, but one run is not enough.

Small numbers (3 runs per arm), so this is a lead. Next on this card, if useful: each of 47, 48, 49 and 50 dropped on its own, 3 runs each, to see which one the in-world crash needs.

AI-assisted (Claude Code, Claude Opus 5.5): the runs are mine, on my own copy of the title. Counts, indices, hashes and addresses from the logs only.

**@⁠loftymocha** on GitHub · 2026-11-25 06:23 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7154735914) **RTX 5070, first `VICTORY_BVH_SKIP` (#579) arms on the same tree: with the four rehydrate-stage pipelines dropped (indices 47-50), the in-world crash did not come back, and 2 of 3 runs held 4 min in the world with the rest of the builder running.** Same tree and settings as my two comments above. An unattended runner started each run and stopped it 240 s after `the ray-tracing structure builder runs`, or recorded how the title ended. Indices are #579's creation indices. I picked the arms by first-bind order in B4's log. The first batch at frame 1562 is 17 pipelines. Then come 47 (`4ddd6f97`), 48 (`5e687674`), 50 (`28918b71`) and 49 (`caa78b8c`), the programs Yorivel traces above. 14 later pipelines follow. | arm | `VICTORY_BVH_SKIP` | run 1 | run 2 | run 3 | |---|---|---|---|---| | full builder (B1-B5, above) | - | 3 of 5 in-world crash (`+0x4da6315` x2, `+0x4ee12b8`), 2 of 5 `+0x23cf683`, 0 held 4 min | | | | late stages off | `8-10,12,16-18,30-32,35,39,41,51` | `+0x23cf683`, 50 s, loading | `+0x23cf683`, 50 s, loading | `+0x23cf683`, 85 s, **in the world** | | rehydrate off | `47-50` | **held 240 s in the world** | `+0x23cf683`, 65 s, loading | **held 240 s in the world** | - The drop summary of a `47-50` run shows only those four skipped: 166.2/frame (49), 93.8 (50), 27.4 (47), 27.4 (48). No other builder pipeline appears in it, so the other builder stages ran. - The in-world crash (stacks ending `+0x2593e91 -> +0x2592d69 -> +0x2215eca`) did not occur in any of the 6 skip runs. With the rehydrate stage off, two runs reached the 4 min cap, which no full-builder run did. That fits Yorivel's reading that the CPU trips over what the rehydration writes. - The late-stages arm does not tell us much about the in-world crash: all three runs ended at `+0x23cf683` before or around the time the in-world crash usually comes (90-196 s). - `+0x23cf683` (write 0x0) ended 6 of 11 builder runs across all arms, once in the world (85 s). I count it as a separate problem (Marvisak/VIctory#1118). My single control run without the builder did not hit it, but one run is not enough. Small numbers (3 runs per arm), so this is a lead. Next on this card, if useful: each of 47, 48, 49 and 50 dropped on its own, 3 runs each, to see which one the in-world crash needs. _AI-assisted (Claude Code, Claude Opus 5.5): the runs are mine, on my own copy of the title. Counts, indices, hashes and addresses from the logs only._
Author
Owner

@⁠Revens2 on GitHub · 2026-11-25 06:28 UTC · original

Thanks, loftymocha: this lines up with our own bisection on the same card (RTX 5070, with #36 and VICTORY_THREAD_DIMS=1). Skipping only builder indices 49 (caa78b8c) and 50 (28918b71) also removed the in-world crash for us for about 100 s, and either one alone brought it back. Your arm with 47-50 dropped holding 240 s in the world in 2 of 3 runs says the same thing with better statistics.

What this does not tell us: dropping those pipelines also drops what they write, so "no crash" does not mean the rest of the builder output is right. The +0x23cf683 stop at 50-65 s in loading, which you see in the other runs, is a different site from the in-world ones, and we have not looked at it. Not verified on our side.

**@⁠Revens2** on GitHub · 2026-11-25 06:28 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7154820053) Thanks, loftymocha: this lines up with our own bisection on the same card (RTX 5070, with #36 and VICTORY_THREAD_DIMS=1). Skipping only builder indices 49 (`caa78b8c`) and 50 (`28918b71`) also removed the in-world crash for us for about 100 s, and either one alone brought it back. Your arm with 47-50 dropped holding 240 s in the world in 2 of 3 runs says the same thing with better statistics. What this does not tell us: dropping those pipelines also drops what they write, so "no crash" does not mean the rest of the builder output is right. The `+0x23cf683` stop at 50-65 s in loading, which you see in the other runs, is a different site from the in-world ones, and we have not looked at it. Not verified on our side.
Author
Owner

@⁠loftymocha on GitHub · 2026-11-25 07:45 UTC · original

RTX 5070, fork main a26859f + #36 + #646 + #579: with the full builder on, the title held 4 min in the world with no exception, the first time on this card. Like Curry-976's RTX 4050 result on 8dd30ab, the room is still dark.

Same card and settings as my comments above (RTX 5070 12 GB, driver 32.0.16.1742, Ryzen 7 7800X3D, 32 GB, Windows 11 26300, diag build, VICTORY_SHADER_LOOP_LIMIT=256), now on a26859f with the same three PRs merged locally (no conflicts). One run each, supervised, same save (prison yard). Counts only, no game data.

run builder result world frames
baseline off no exception in ~9 min (stopped by me) 3.9-4.3 fps, ~4,800 draws/frame (~90 ms preparing, ~95 ms GPU, ~160 ms copying back)
builder on (pipelines=53) held 240 s after builder runs, no exception (stopped by the runner) 0.3 fps, 3.2-3.9 s/frame, 4,000-4,500 draws/frame (~1.6-1.9 s preparing, ~1.5-2.0 s GPU, ~1.5-1.9 s copying back)
  • On 310c6eb, none of my 5 full-builder runs reached 4 min (3 ended in the world at +0x4da6315 / +0x4ee12b8, 2 at +0x23cf683). One run on a26859f is not proof that the in-world crash is fixed, but it fits Curry-976's 4 min on 8dd30ab.
  • With the builder on, the shadow line reports 12-20 GB compared per frame (shader writes looked for on the CPU per frame), the card is about 5% busy, and the process uses about 9-15 s of CPU per frame. Free physical memory went down to 0.4 GB on this 32 GB machine (64 GB page file). A 12-20 GB compare per frame is what makes the builder runs this slow and this heavy here.
  • Observed on screen: the first room's walls are solid with the builder off and with it on. With the builder on, the room and the characters stay dark, the same as with it off. So the builder running is not enough to bring the shaded light back on this card. My guess, not checked here: the passes that use its output are still missing on NVIDIA (refused wave64 pipelines such as 2cc4c197ee29e291, and the ray-traced shadow programs that do not translate, as in #512).
  • One run per arm, so this is a data point, not a statistic.

AI-assisted (Claude Code, Claude Opus 5.5): the runs are mine, on my own copy of the title. Counts, hashes and addresses from the logs only.

**@⁠loftymocha** on GitHub · 2026-11-25 07:45 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7156217343) **RTX 5070, fork `main` `a26859f` + #36 + #646 + #579: with the full builder on, the title held 4 min in the world with no exception, the first time on this card. Like Curry-976's RTX 4050 result on `8dd30ab`, the room is still dark.** Same card and settings as my comments above (RTX 5070 12 GB, driver 32.0.16.1742, Ryzen 7 7800X3D, 32 GB, Windows 11 26300, diag build, `VICTORY_SHADER_LOOP_LIMIT=256`), now on `a26859f` with the same three PRs merged locally (no conflicts). One run each, supervised, same save (prison yard). Counts only, no game data. | run | builder | result | world frames | |---|---|---|---| | baseline | off | no exception in ~9 min (stopped by me) | 3.9-4.3 fps, ~4,800 draws/frame (~90 ms preparing, ~95 ms GPU, ~160 ms copying back) | | builder | on (`pipelines=53`) | **held 240 s after `builder runs`, no exception** (stopped by the runner) | 0.3 fps, 3.2-3.9 s/frame, 4,000-4,500 draws/frame (~1.6-1.9 s preparing, ~1.5-2.0 s GPU, ~1.5-1.9 s copying back) | - On `310c6eb`, none of my 5 full-builder runs reached 4 min (3 ended in the world at `+0x4da6315` / `+0x4ee12b8`, 2 at `+0x23cf683`). One run on `a26859f` is not proof that the in-world crash is fixed, but it fits Curry-976's 4 min on `8dd30ab`. - With the builder on, the shadow line reports 12-20 GB compared per frame (`shader writes looked for on the CPU per frame`), the card is about 5% busy, and the process uses about 9-15 s of CPU per frame. Free physical memory went down to 0.4 GB on this 32 GB machine (64 GB page file). A 12-20 GB compare per frame is what makes the builder runs this slow and this heavy here. - **Observed on screen:** the first room's walls are solid with the builder off and with it on. With the builder on, the room and the characters stay dark, the same as with it off. So the builder running is not enough to bring the shaded light back on this card. My guess, not checked here: the passes that use its output are still missing on NVIDIA (refused wave64 pipelines such as `2cc4c197ee29e291`, and the ray-traced shadow programs that do not translate, as in #512). - One run per arm, so this is a data point, not a statistic. _AI-assisted (Claude Code, Claude Opus 5.5): the runs are mine, on my own copy of the title. Counts, hashes and addresses from the logs only._
Author
Owner

@⁠Rainmaker33 on GitHub · 2026-11-25 08:16 UTC · original

RTX 3090 (Ampere), fork a26859f + #36 + #646 + #579: the full builder held in the world in 2 of 2 runs, 892 s and 534 s, both stopped by me. This adds a second card and longer stretches to @⁠loftymocha's 4 min on the same tree.

Setup: RTX 3090 24 GB, driver 32.0.16.2140, Ryzen 5 8600G (6 cores / 12 threads), 31 GB RAM, Windows 11 26300, diag build (--features diagnostics), rustc 1.98.1. The three PRs were applied as diffs onto a26859f with no conflicts. victory-shader lib tests: 218 passed, 0 failed. VICTORY_BVH_BUILDER=1 VICTORY_SHADER_LOOP_LIMIT=256, plus VICTORY_RELAY=2 VICTORY_TEXTURE_NO_WAIT=1. The shader cache was warmed with translate --warm all. Each run loaded the game's own prologue checkpoint and was played by hand. Counts only.

run builder after builder runs (pipelines=53) world frames, median end
1 on 892 s 4.95 s (2.5 s preparing, 2.2 s GPU, 2.4 s copying back) window closed by me; 0 ERROR lines, no crashes.log entry
2 on 534 s 6.66 s (3.6 s preparing, 2.4 s GPU, 2.6 s copying back) the same
3 off, same build 519 s run 0.35 s (0.13 s preparing, 0.11 s GPU, 0.21 s copying back) the same
  • The indices 47-50 name the same four programs here as in your bisection (4ddd6f97…, 5e687674…, caa78b8c…, 28918b71…).
  • The cost matches yours. With the builder on, the shadow line reports 16.2 GB compared per frame (windows outside buffers), against 0 with it off.
  • The builder did not change the picture. The first room looked the same with the builder on, with it off in the same build, and in a build of a26859f without the three PRs.
  • Characters' heads were sometimes not drawn, but in runs with the builder on and with it off, and in the build without the PRs. So I don't count that against the builder.

Not tested: 310c6eb, so I can't say whether this card would have crashed there as yours did; VICTORY_BVH_QUARANTINE; more than two builder runs.

AI-assisted (Claude Code)

**@⁠Rainmaker33** on GitHub · 2026-11-25 08:16 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7156821719) **RTX 3090 (Ampere), fork `a26859f` + #36 + #646 + #579: the full builder held in the world in 2 of 2 runs, 892 s and 534 s, both stopped by me.** This adds a second card and longer stretches to @⁠loftymocha's 4 min on the same tree. **Setup:** RTX 3090 24 GB, driver 32.0.16.2140, Ryzen 5 8600G (6 cores / 12 threads), 31 GB RAM, Windows 11 26300, diag build (`--features diagnostics`), rustc 1.98.1. The three PRs were applied as diffs onto `a26859f` with no conflicts. `victory-shader` lib tests: 218 passed, 0 failed. `VICTORY_BVH_BUILDER=1 VICTORY_SHADER_LOOP_LIMIT=256`, plus `VICTORY_RELAY=2 VICTORY_TEXTURE_NO_WAIT=1`. The shader cache was warmed with `translate --warm all`. Each run loaded the game's own prologue checkpoint and was played by hand. Counts only. | run | builder | after `builder runs (pipelines=53)` | world frames, median | end | |---|---|---|---|---| | 1 | on | 892 s | 4.95 s (2.5 s preparing, 2.2 s GPU, 2.4 s copying back) | window closed by me; 0 `ERROR` lines, no `crashes.log` entry | | 2 | on | 534 s | 6.66 s (3.6 s preparing, 2.4 s GPU, 2.6 s copying back) | the same | | 3 | off, same build | 519 s run | 0.35 s (0.13 s preparing, 0.11 s GPU, 0.21 s copying back) | the same | - The indices 47-50 name the same four programs here as in your bisection (`4ddd6f97…`, `5e687674…`, `caa78b8c…`, `28918b71…`). - The cost matches yours. With the builder on, the shadow line reports 16.2 GB compared per frame (`windows outside buffers`), against 0 with it off. - The builder did not change the picture. The first room looked the same with the builder on, with it off in the same build, and in a build of `a26859f` without the three PRs. - Characters' heads were sometimes not drawn, but in runs with the builder on and with it off, and in the build without the PRs. So I don't count that against the builder. **Not tested:** `310c6eb`, so I can't say whether this card would have crashed there as yours did; `VICTORY_BVH_QUARANTINE`; more than two builder runs. AI-assisted (Claude Code)
Author
Owner

@⁠loftymocha on GitHub · 2026-11-25 08:18 UTC · original

RTX 5070, follow-up on main 9376fd6 + #36 + #646 + #579: the full builder held 4 min in the world again, the second commit in a row. Also an offline comparison of #497 and #36.

Same card, settings and save as my comments above. One supervised run per arm. Counts only, no game data.

main builder result world frames
a26859f (above) off / on no exception / held 240 s 3.9-4.3 fps / 0.3 fps
9376fd6 off no exception, ~9 min 4.0-5.4 fps, 4,100-7,100 draws/frame
9376fd6 on (pipelines=53) held 240 s after builder runs, no exception 0.3-0.4 fps, 3.3-3.4 s/frame, ~4,100-4,800 draws/frame
  • With the builder on, the title now held 4 min on both a26859f and 9376fd6. On 310c6eb, 0 of 5 full-builder runs did.
  • 9376fd6's processor-side changes show with the builder off (about 10-20% more frames, at more draws per frame). With it on, the shadow line still reports about 12 GB compared per frame (shader writes looked for on the CPU per frame), and frame time stays about the same.
  • Lowest free physical memory: 2.2 GB with the builder off, 0.5 GB with it on (32 GB machine, 64 GB page file).

#497 compared with #36 (offline, VICTORY_HOST_MAX_WAVE=32 victory translate --list on the title's shader pack, executable and both DLLs, plain 9376fd6): main alone has 257 failing programs. main + #497 has 254: it fixes dc78c5de69c7c155, 322ed4ad832bdea6 and d441b097704ab616 (a first-lane read where not every lane runs, the three builder prefix-sum passes) and adds no new failure. That is the same three programs #36 fixes in my tree. I did not test the two together.

AI-assisted (Claude Code, Claude Opus 5.5): the runs are mine, on my own copy of the title. Counts, hashes and addresses from the logs only.

**@⁠loftymocha** on GitHub · 2026-11-25 08:18 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7156872961) **RTX 5070, follow-up on `main` `9376fd6` + #36 + #646 + #579: the full builder held 4 min in the world again, the second commit in a row. Also an offline comparison of #497 and #36.** Same card, settings and save as my comments above. One supervised run per arm. Counts only, no game data. | `main` | builder | result | world frames | |---|---|---|---| | `a26859f` (above) | off / on | no exception / **held 240 s** | 3.9-4.3 fps / 0.3 fps | | `9376fd6` | off | no exception, ~9 min | **4.0-5.4 fps**, 4,100-7,100 draws/frame | | `9376fd6` | on (`pipelines=53`) | **held 240 s after `builder runs`, no exception** | 0.3-0.4 fps, 3.3-3.4 s/frame, ~4,100-4,800 draws/frame | - With the builder on, the title now held 4 min on both `a26859f` and `9376fd6`. On `310c6eb`, 0 of 5 full-builder runs did. - `9376fd6`'s processor-side changes show with the builder off (about 10-20% more frames, at more draws per frame). With it on, the shadow line still reports about 12 GB compared per frame (`shader writes looked for on the CPU per frame`), and frame time stays about the same. - Lowest free physical memory: 2.2 GB with the builder off, 0.5 GB with it on (32 GB machine, 64 GB page file). **#497 compared with #36 (offline, `VICTORY_HOST_MAX_WAVE=32 victory translate --list` on the title's shader pack, executable and both DLLs, plain `9376fd6`):** `main` alone has 257 failing programs. `main` + #497 has 254: it fixes `dc78c5de69c7c155`, `322ed4ad832bdea6` and `d441b097704ab616` (`a first-lane read where not every lane runs`, the three builder prefix-sum passes) and adds no new failure. That is the same three programs #36 fixes in my tree. I did not test the two together. _AI-assisted (Claude Code, Claude Opus 5.5): the runs are mine, on my own copy of the title. Counts, hashes and addresses from the logs only._
Author
Owner

@⁠vladbondarenko97 on GitHub · 2026-11-25 08:22 UTC · original

RTX 3080 Ti (Ampere), fork a26859f + #36 + #646 + #579: full builder on, the title held 391 s in the world after builder runs with no exception (stopped by the runner). Same picture as loftymocha's RTX 5070 run: it holds, but at ~0.2 fps.

Machine: Windows 11, NVIDIA GeForce RTX 3080 Ti 12 GB (driver 32.0.16.1060), 64 GB page file. Diag build (--profile diag --features diagnostics) of a26859f with the three PRs merged locally (no conflicts, merge 2d2bf1f). VICTORY_SHADER_LOOP_LIMIT=256. Unattended runs from a fresh new game (profile only, no story save), scripted Enter. One run per arm. Counts only, no game data.

run builder result last world frame
baseline off 10 min, no exception 3.6 fps, 274 ms/frame (110 preparing, 86 GPU, 135 copying back), 4,914 draws, 144 dropped
builder on (pipelines=53, builder runs at +~2 min) held 391 s after builder runs, no exception, no WER/breakpad save 0.2 fps, 4,300 ms/frame (2,560 preparing incl. textures 916 ms; 1,592 GPU; 1,499 copying back), 1,524 draws, 3 dropped
  • For contrast: on our own tree (a26859f + other unrelated PRs, without #36/#646/#579) VICTORY_BVH_BUILDER=1 also reached pipelines=53, but the title crashed (breakpad/WER) about 40-60 s later, twice, with and without VICTORY_BVH_QUARANTINE=1. So on this card too, these three PRs are what keep it alive.
  • Over the whole builder-on run, p50 was 5.8 s/frame and copy-back p50 2.5 s/frame, so the cost is the same CPU-side compare/copy-back loftymocha describes, not the card.
  • Picture: the builder-off capture shows the first room dark (as in #512). The one builder-on capture I have (late in the run) is fully black. At 0.2 fps that may be a fade, so I would not read anything into it yet.

AI-assisted (Claude Code, Claude Opus 5.5): runs on the owner's own copy of the title, numbers from the logs only.

**@⁠vladbondarenko97** on GitHub · 2026-11-25 08:22 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7156944740) **RTX 3080 Ti (Ampere), fork `a26859f` + #36 + #646 + #579: full builder on, the title held 391 s in the world after `builder runs` with no exception (stopped by the runner). Same picture as loftymocha's RTX 5070 run: it holds, but at ~0.2 fps.** Machine: Windows 11, NVIDIA GeForce RTX 3080 Ti 12 GB (driver 32.0.16.1060), 64 GB page file. Diag build (`--profile diag --features diagnostics`) of `a26859f` with the three PRs merged locally (no conflicts, merge `2d2bf1f`). `VICTORY_SHADER_LOOP_LIMIT=256`. Unattended runs from a fresh new game (profile only, no story save), scripted Enter. One run per arm. Counts only, no game data. | run | builder | result | last world frame | |---|---|---|---| | baseline | off | 10 min, no exception | 3.6 fps, 274 ms/frame (110 preparing, 86 GPU, 135 copying back), 4,914 draws, 144 dropped | | builder | on (`pipelines=53`, `builder runs` at +~2 min) | **held 391 s after `builder runs`, no exception, no WER/breakpad save** | 0.2 fps, 4,300 ms/frame (2,560 preparing incl. textures 916 ms; 1,592 GPU; 1,499 copying back), 1,524 draws, 3 dropped | - For contrast: on our own tree (`a26859f` + other unrelated PRs, without #36/#646/#579) `VICTORY_BVH_BUILDER=1` also reached `pipelines=53`, but the title crashed (breakpad/WER) about 40-60 s later, twice, with and without `VICTORY_BVH_QUARANTINE=1`. So on this card too, these three PRs are what keep it alive. - Over the whole builder-on run, p50 was 5.8 s/frame and copy-back p50 2.5 s/frame, so the cost is the same CPU-side compare/copy-back loftymocha describes, not the card. - Picture: the builder-off capture shows the first room dark (as in #512). The one builder-on capture I have (late in the run) is fully black. At 0.2 fps that may be a fade, so I would not read anything into it yet. _AI-assisted (Claude Code, Claude Opus 5.5): runs on the owner's own copy of the title, numbers from the logs only._
Author
Owner

@⁠Revens2 on GitHub · 2026-11-25 09:22 UTC · original

RTX 5070 (32-lane): A/B on one tree — #646's thread-dimension handling holds 600 s with the builder on; Yorivel's VICTORY_THREAD_DIMS variant still ends at +0x8f92a within seconds.

Thanks to Yorivel (the USE_THREAD_DIMENSIONS root cause and the first fix), mynzjerko (#646), and everyone who posted traces: the A/B below only works because of them.

Setup: RTX 5070 12 GB, driver 32.0.16.2124, Windows 11 26200, diag build, VICTORY_BVH_BUILDER=1 VICTORY_RELAY=2, scripted Enter keys, one session at a time. Both arms are main a26859f + #36 + #579 and differ only in the thread-dimension change. Counts and log lines only, no game data.

arm thread-dimension change runs result
A #646 (170c242), on by default 2 both held the full 600 s (builder started ~107 s in, so ~8 min with it running); 0 first-chance exceptions, 0 device removals; world reached, 0.3-0.4 fps, ~6,300 draws at most
B Yorivel's VICTORY_THREAD_DIMS=1 (2521646 + our thread_groups helper, cherry-picked) 2 both ended 4-6 s after builder runs: run 1 +0x4da6315 (int3) then +0x32648e1 (execute 0x0); run 2 +0x8f92a (read 0xffffffffffffffff) then +0x865607
control A + VICTORY_BVH_SKIP=47-50 1 held 600 s, 0 exceptions

So on this card the +0x8f92a read that survived Yorivel's fix did not appear with #646 in 2 of 2 runs, and Yorivel's variant ended early in 2 of 2 (one at +0x8f92a, the other at two different sites). Two runs per arm: a lead, not a proof.

Why they may differ (reading of the code, not measured): Yorivel's variant makes lanes at or past x leave at the program entry. #646 does that only for programs without a group barrier and without the wave64-over-wave32 half exchange; for the others (the builder's 64-lane prefix-sum stages run as two host waves exchange halves through LDS with group barriers) it keeps every thread alive and masks stores, ballots and reductions instead. If lanes of the second half have left before the exchange, the lanes that stay read what the others never wrote. non verifie: no run isolates this.

Instruction census of builder pipelines 47-50 (VICTORY_HOST_WAVE=32, all four translate and emit; counts of native instructions):

program size cross-lane / wave f16 other
47 (4ddd6f97) 52 v_readfirstlane 3 none v_cmpx 2
48 (5e687674) 6,302 s_barrier 1, s_and_saveexec_b64 62, v_cmpx_eq_u64 28 v_cvt_f32_f16 40 plain Dispatch, no thread limit
49 (caa78b8c) 572 v_permlanex16 3, v_readlane 4 (lanes 0, 31, 32), s_bcnt1_i32_b64 exec 1, v_mbcnt 1, s_or_saveexec_b64 3, DPP prefix sums v_cvt_f16_f32 6, v_pk_min/max_f16 6, v_min3/max3_f16 2 ds_write_b16 7
50 (28918b71) 499 same cross-lane set as 49 v_cvt_f32_f16 6, v_pk_min/max_f16 6 ds_read2/write2_b32

With #36 none goes through the first-lane approximation any more (every wave64 program here takes the exchange form). What 49 and 50 need exactly: s_bcnt1_i32_b64(exec) and the entry EXEC ballots to see the partial last wave of a thread-dimension dispatch (what #646 adds), and v_readlane lane 32 / v_permlanex16 through the half exchange. I have no console oracle for these, so "translated and validated" is all I can claim for them.

Not tested / not fixed here: the +0x23cf683 stop at loading (different site); correctness of the rehydrated output (the room is still dark per loftymocha and Curry-976); runs past 10 min.

Integration note: main + #36 + #646 makes crates/victory-shader/src/emit/lower.rs 528,884 bytes; cargo test --workspace then fails xtask policy::tests::repository_passes_policy (limit 524,288; main alone is 514,840). Everything else passes on that tree: 536 passed, 10 ignored, 1 failed (that test).

I am not opening a PR from Revens2:fix/issue-16-thread-dims: #646 covers the same flag more completely, so that branch stays as a reference only.

AI-assisted (Claude Code, Claude Sonnet 5.5): the runs are mine, on my own copy of the title.

**@⁠Revens2** on GitHub · 2026-11-25 09:22 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7158251063) **RTX 5070 (32-lane): A/B on one tree — #646's thread-dimension handling holds 600 s with the builder on; Yorivel's `VICTORY_THREAD_DIMS` variant still ends at `+0x8f92a` within seconds.** Thanks to Yorivel (the `USE_THREAD_DIMENSIONS` root cause and the first fix), mynzjerko (#646), and everyone who posted traces: the A/B below only works because of them. **Setup:** RTX 5070 12 GB, driver 32.0.16.2124, Windows 11 26200, diag build, `VICTORY_BVH_BUILDER=1 VICTORY_RELAY=2`, scripted Enter keys, one session at a time. Both arms are `main` `a26859f` + #36 + #579 and differ only in the thread-dimension change. Counts and log lines only, no game data. | arm | thread-dimension change | runs | result | |---|---|---|---| | A | #646 (`170c242`), on by default | 2 | both held the full 600 s (builder started ~107 s in, so ~8 min with it running); 0 first-chance exceptions, 0 device removals; world reached, 0.3-0.4 fps, ~6,300 draws at most | | B | Yorivel's `VICTORY_THREAD_DIMS=1` (`2521646` + our `thread_groups` helper, cherry-picked) | 2 | both ended 4-6 s after `builder runs`: run 1 `+0x4da6315` (int3) then `+0x32648e1` (execute 0x0); run 2 `+0x8f92a` (read `0xffffffffffffffff`) then `+0x865607` | | control | A + `VICTORY_BVH_SKIP=47-50` | 1 | held 600 s, 0 exceptions | So on this card the `+0x8f92a` read that survived Yorivel's fix did not appear with #646 in 2 of 2 runs, and Yorivel's variant ended early in 2 of 2 (one at `+0x8f92a`, the other at two different sites). Two runs per arm: a lead, not a proof. **Why they may differ (reading of the code, not measured):** Yorivel's variant makes lanes at or past x leave at the program entry. #646 does that only for programs without a group barrier and without the wave64-over-wave32 half exchange; for the others (the builder's 64-lane prefix-sum stages run as two host waves exchange halves through LDS with group barriers) it keeps every thread alive and masks stores, ballots and reductions instead. If lanes of the second half have left before the exchange, the lanes that stay read what the others never wrote. `non verifie`: no run isolates this. **Instruction census of builder pipelines 47-50** (`VICTORY_HOST_WAVE=32`, all four translate and emit; counts of native instructions): | program | size | cross-lane / wave | f16 | other | |---|---|---|---|---| | 47 (`4ddd6f97`) | 52 | `v_readfirstlane` 3 | none | `v_cmpx` 2 | | 48 (`5e687674`) | 6,302 | `s_barrier` 1, `s_and_saveexec_b64` 62, `v_cmpx_eq_u64` 28 | `v_cvt_f32_f16` 40 | plain `Dispatch`, no thread limit | | 49 (`caa78b8c`) | 572 | `v_permlanex16` 3, `v_readlane` 4 (lanes 0, 31, 32), `s_bcnt1_i32_b64 exec` 1, `v_mbcnt` 1, `s_or_saveexec_b64` 3, DPP prefix sums | `v_cvt_f16_f32` 6, `v_pk_min/max_f16` 6, `v_min3/max3_f16` 2 | `ds_write_b16` 7 | | 50 (`28918b71`) | 499 | same cross-lane set as 49 | `v_cvt_f32_f16` 6, `v_pk_min/max_f16` 6 | `ds_read2/write2_b32` | With #36 none goes through the first-lane approximation any more (every wave64 program here takes the exchange form). What 49 and 50 need exactly: `s_bcnt1_i32_b64(exec)` and the entry `EXEC` ballots to see the partial last wave of a thread-dimension dispatch (what #646 adds), and `v_readlane` lane 32 / `v_permlanex16` through the half exchange. I have no console oracle for these, so "translated and validated" is all I can claim for them. **Not tested / not fixed here:** the `+0x23cf683` stop at loading (different site); correctness of the rehydrated output (the room is still dark per loftymocha and Curry-976); runs past 10 min. **Integration note:** `main` + #36 + #646 makes `crates/victory-shader/src/emit/lower.rs` 528,884 bytes; `cargo test --workspace` then fails `xtask policy::tests::repository_passes_policy` (limit 524,288; `main` alone is 514,840). Everything else passes on that tree: 536 passed, 10 ignored, 1 failed (that test). I am not opening a PR from `Revens2:fix/issue-16-thread-dims`: #646 covers the same flag more completely, so that branch stays as a reference only. _AI-assisted (Claude Code, Claude Sonnet 5.5): the runs are mine, on my own copy of the title._
Author
Owner

@⁠Yorivel on GitHub · 2026-11-25 10:05 UTC · original

RTX 4090, follow-up 14: the thread-dimension fix is PR #840. Where the one remaining stray write comes from.

The fix from follow-ups 11–13 is now a clean PR on current main: #840 (VICTORY_THREAD_DIMS=1, opt-in, without the diagnostics).

On the crash that is left, three more traced runs with the fix (VICTORY_GPUWRITE_LOG, new: each distinct (pipeline, range) a draw or dispatch declares as shader-written; plus the write-back log with full bytes and the dispatch log without a cap):

  • Each rehydration's own stages are now clean and contiguous, checked on three structures from three runs:

    • decoder 5e687674: c[3] … c[3] + c[11] × 64, ending exactly at the header's size dword 10;
    • then 28918b71 (128-byte nodes, c0 + (g << 13) + tid × 128) and caa78b8c (64-byte nodes) alternate, each starting where the last ended.

    Example 0xca1cee100: +0x180…+0xec0, then +0xf00…+0x1480, +0x1480…+0x1540, +0x1540…+0x16c0, …, ending at +0x1800.

  • The crashing object is still overwritten once by relay_merge, with builder data, a few KiB past the structure's end (+0x10b0 twice on a 0xa40-long structure, +0x5c40 on a 0x1800-long one, +0x5300 on a 0x4dc0-long one). The site and offset repeat for the same structure shape (+0xf6349, read 0xf, in two runs).

  • Only the four rehydration programs declared that memory: the rest of the 4 MiB window from their root view, since a root view has no size. No other pipeline, no address constant and no CopyRaytracingAccelerationStructure call (31 logged) reaches it.

  • relay_merge writes only bytes that differ from the copy's snapshot (merge_piece), and the snapshot is the copy itself at submission. So a shader in that flight really wrote them.

  • None of the four programs' thread-indexed stores reaches there (the decoder's indices are tid and tid + 1024, bounded by c[11]). What can reach any offset are the data-driven parent-link stores in caa78b8c/28918b71: s29 + ((((child << 3) & ~63) - s30) >> 4 & ~3), one dword per node. Their table normally sits in the header area (for 0xca1cee100: d14 = -0x40, entries up to about +0x140). A child pointer holding something else (-1, f16 bounds) lands them anywhere in the window.

So my reading of the rest: some node's child pointer is wrong before the parent-link pass runs. Either the decoder gets bad input, or a stage reads nodes before they are written. Next would be reading the GPU-side copy between stages, which none of this tooling does yet. Diagnostics and scripts are on diag/bvh-alias (Yorivel/victory-fork).

**@⁠Yorivel** on GitHub · 2026-11-25 10:05 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7159204361) **RTX 4090, follow-up 14: the thread-dimension fix is PR #840. Where the one remaining stray write comes from.** The fix from follow-ups 11–13 is now a clean PR on current `main`: **#840** (`VICTORY_THREAD_DIMS=1`, opt-in, without the diagnostics). On the crash that is left, three more traced runs with the fix (`VICTORY_GPUWRITE_LOG`, new: each distinct (pipeline, range) a draw or dispatch declares as shader-written; plus the write-back log with full bytes and the dispatch log without a cap): - **Each rehydration's own stages are now clean and contiguous**, checked on three structures from three runs: - decoder `5e687674`: `c[3] … c[3] + c[11] × 64`, ending exactly at the header's size dword 10; - then `28918b71` (128-byte nodes, `c0 + (g << 13) + tid × 128`) and `caa78b8c` (64-byte nodes) alternate, each starting where the last ended. Example `0xca1cee100`: `+0x180…+0xec0`, then `+0xf00…+0x1480`, `+0x1480…+0x1540`, `+0x1540…+0x16c0`, …, ending at `+0x1800`. - **The crashing object is still overwritten once by `relay_merge`, with builder data, a few KiB past the structure's end** (`+0x10b0` twice on a 0xa40-long structure, `+0x5c40` on a 0x1800-long one, `+0x5300` on a 0x4dc0-long one). The site and offset repeat for the same structure shape (`+0xf6349`, `read 0xf`, in two runs). - **Only the four rehydration programs declared that memory**: the rest of the 4 MiB window from their root view, since a root view has no size. No other pipeline, no address constant and no `CopyRaytracingAccelerationStructure` call (31 logged) reaches it. - `relay_merge` writes only bytes that differ from the copy's snapshot (`merge_piece`), and the snapshot is the copy itself at submission. So a shader in that flight really wrote them. - None of the four programs' thread-indexed stores reaches there (the decoder's indices are `tid` and `tid + 1024`, bounded by `c[11]`). What can reach any offset are the **data-driven parent-link stores** in `caa78b8c`/`28918b71`: `s29 + ((((child << 3) & ~63) - s30) >> 4 & ~3)`, one dword per node. Their table normally sits in the header area (for `0xca1cee100`: `d14 = -0x40`, entries up to about `+0x140`). A child pointer holding something else (`-1`, f16 bounds) lands them anywhere in the window. So my reading of the rest: some node's child pointer is wrong before the parent-link pass runs. Either the decoder gets bad input, or a stage reads nodes before they are written. Next would be reading the GPU-side copy between stages, which none of this tooling does yet. Diagnostics and scripts are on `diag/bvh-alias` (Yorivel/victory-fork).
Author
Owner

@⁠m335671 on GitHub · 2026-11-25 21:57 UTC · original

RTX 4070 12 GB (32-lane): with #646 the builder held 12 minutes here, also with #799 on top, which brings up sr_tracing:CS_Tiling_Generate_Opaque. But the room's indirect light stays black either way: the picture looks the same as with the builder off.

Setup

  • Driver 32.0.16.2124, Ryzen 9 7900, 32 GB, Windows 11 Pro 26300, Series X profile, diagnostics build.
  • main d510ee4 + #1093 (ambient light, left off except in the first row) + #1096. Then #646 (36a2257) merged in, and for the last row #799 (09b95ca) too.
  • VICTORY_BVH_BUILDER=1 VICTORY_FIRSTLANE_OWN=1, plus VICTORY_INDIRECT_GATHER=1 VICTORY_CARD_REHASH_RUNS=1 VICTORY_TEXTURE_NO_WAIT=1 VICTORY_LATE_WAIT=3.
  • From the checkpoint to the first room (the cell window), then idle. Scripted presses only, one launch per row.
tree builder exceptions fps (GPU ms) the room
without #646 runs ... pipelines=53 0xc0000005 at +0x8f92a and others about 8 s after builder runs; the title's crash reporter then tried submit.backtrace.io, blocked by the layer – –
+ #646 runs none in 12 min 0.30 (2,071) half away from the window black, as with the builder off
+ #646 + #799 runs none in 12 min 0.30 (1,793) still black; the window glass turns frosted (#799)
  • In the last row, every compute program is created except the two water_shading:CS_TransmissionVolumetrics_* ones. That includes sr_tracing:CS_Tiling_Generate_Opaque (2cc4c197ee29e291), refused without #799, which I expected to be what kept rays from being traced. It doesn't seem to be enough.
  • No device removal, no driver entry.
  • About 1.8–2.1 s of GPU time per frame with the builder on, against about 60 ms with it off.

A note for anyone testing this: #1093's ambient light, when on, overwrites the probe resolve's output, so it hides whatever the rays contribute. A run with it on showed one extra shadow on the left wall and nothing else. Leave it off when judging the builder.

Not checked: where the light is lost. It could be the tracing tiles (#799's loose-LDS form is approximate), the traversal's hits, or the resolve's inputs. I haven't looked at any intermediate target.

AI use: the runs were done on my machine. Claude Code (Claude Opus 5.5) built and ran them, read the logs and wrote this comment.

**@⁠m335671** on GitHub · 2026-11-25 21:57 UTC · [original](https://github.com/fxceless/victory-fork/issues/16#issuecomment-7175747047) RTX 4070 12 GB (32-lane): with #646 the builder held 12 minutes here, also with #799 on top, which brings up `sr_tracing:CS_Tiling_Generate_Opaque`. But the room's indirect light stays black either way: the picture looks the same as with the builder off. **Setup** - Driver 32.0.16.2124, Ryzen 9 7900, 32 GB, Windows 11 Pro 26300, Series X profile, diagnostics build. - `main` `d510ee4` + #1093 (ambient light, **left off** except in the first row) + #1096. Then #646 (`36a2257`) merged in, and for the last row #799 (`09b95ca`) too. - `VICTORY_BVH_BUILDER=1 VICTORY_FIRSTLANE_OWN=1`, plus `VICTORY_INDIRECT_GATHER=1 VICTORY_CARD_REHASH_RUNS=1 VICTORY_TEXTURE_NO_WAIT=1 VICTORY_LATE_WAIT=3`. - From the checkpoint to the first room (the cell window), then idle. Scripted presses only, one launch per row. | tree | builder | exceptions | fps (GPU ms) | the room | |---|---|---|---|---| | without #646 | `runs ... pipelines=53` | `0xc0000005` at `+0x8f92a` and others about **8 s** after `builder runs`; the title's crash reporter then tried `submit.backtrace.io`, blocked by the layer | – | – | | + #646 | runs | **none in 12 min** | 0.30 (2,071) | half away from the window black, as with the builder off | | + #646 + #799 | runs | **none in 12 min** | 0.30 (1,793) | still black; the window glass turns frosted (#799) | - In the last row, every compute program is created except the two `water_shading:CS_TransmissionVolumetrics_*` ones. That includes `sr_tracing:CS_Tiling_Generate_Opaque` (`2cc4c197ee29e291`), refused without #799, which I expected to be what kept rays from being traced. It doesn't seem to be enough. - No device removal, no driver entry. - About 1.8–2.1 s of GPU time per frame with the builder on, against about 60 ms with it off. A note for anyone testing this: #1093's ambient light, when on, overwrites the probe resolve's output, so it hides whatever the rays contribute. A run with it on showed one extra shadow on the left wall and nothing else. Leave it off when judging the builder. **Not checked:** where the light is lost. It could be the tracing tiles (#799's loose-LDS form is approximate), the traversal's hits, or the resolve's inputs. I haven't looked at any intermediate target. AI use: the runs were done on my machine. Claude Code (Claude Opus 5.5) built and ran them, read the logs and wrote this comment.
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/fxceless--victory-fork#16
No description provided.