Ray tracing: the title reads a reused compacted-size slot before our submission lands, and copies write over neighbouring structures (counted per run) #1412

Closed
opened 2026-11-28 19:21:38 +00:00 by Rafa7046 · 4 comments
Rafa7046 commented 2026-11-28 19:21:38 +00:00 (Migrated from github.com)
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Rafa7046 on 2026-11-28T19:21:38Z.


docs/fork-ray-tracing.md lists "Dynamic structures overlap each other" as open. Here is what I found, with a counter for the whole run and four ways of holding the title that did not mend it.

Setup: RTX 5080 16 GB (driver 621.24), Ryzen 9 9950X3D, 64 GB, Windows 11 26300. Series X, 1440p, DLSS Performance, frame generation off, diag build at e7d8150, VICTORY_BVH_BUILDER=1. A script plays the prologue cutscenes, then stands one minute on Jason's boat.

A counter for the whole run

With VICTORY_BVH_TRACE=1 the per-event lines stop after 6,000, about the first 130 frames. PR #1413 adds a line "bvh trace summary" every 600 frames. For the whole run it counts:

  • the copies to a place of the compacted size;
  • those made while the size's slot held another value than the one that came;
  • those landing on a copy of the same frame or of the 10 before, with the bytes written over.

What it shows

  • Hundreds of overlapping copies right after loading and at cutscene changes. One session had 374 same-frame overlaps at the start and 436 at the cutscene change, with 100–200 MB of structures written over. Another had 455 and 303 + 380.
  • Almost none in a steady scene: 0–8 per window on the boat.
  • Every one of 18 RT sessions of the night before shows it in its first 130 frames, with 4–79 same-frame overlaps each.

The mechanism, from one case

  • Frame 14508: the title asks structure B's compacted size into slot …e0f8.
  • Frame 14509: it asks structure C's into the same slot.
  • Then: it takes 0x1c00 bytes for C, which is B's size, while C's real size of 0x13100 lands a moment later. The next structure is placed 0x1c00 after C, and the copy of C writes over it.

The slot is reused frame after frame, so the title reads it within the frame that asked. On the console the size program has run by then.

Why waiting does not help here

With VICTORY_THIN the submissions go through VICTORY_ASYNC_SUBMIT. The title's submit call returns at once, and the title runs up to a frame ahead of our submitting thread. When it reads the slot, the asking submission may not even have been sent.

Tried, with numbers (patches on request)

  1. VICTORY_BVH_SIZES_WAIT=1 (waiting on our thread): as documented, no help.
  2. Holding the title at its present until the asks sent so far had landed, then until everything before the present was sent: stale reads 97 against 93 without it, and slower. The title reads within the frame.
  3. Holding the title's submit call of a list that asks, found by waiting for the list's translation: the title aborted while loading every time, even with a 5 ms cap on that wait. Without waiting, most asking lists are not translated yet at their submit.
  4. Marking the recording on the title's thread (list::thin: a dispatch of one group after SetComputeRoot32BitConstants that look like the size program's): this finds the asking submission at exactly 1.00 per frame. The wait for it to land then gives up anyway: 0.75–1.0 times a frame with a 30 ms cap, and 0.5–1.0 even with 150 ms. The asking submission is not sent while the title is held (something before it in the line seems to wait for the title). With one host queue it also runs behind the previous frame's work on the card. No change in the overlaps.

What I think it needs

The size program's submission has to run and land quickly, without waiting for the line or the card's other work: for example, the builder's size program and its read-back on a queue of their own, as the console's compute queue does. That is beyond what I can do safely from here. The counter should make any attempt measurable.

Also seen: in 18 RT sessions on unmodified builds, cutscenes ran at about 42 or about 20 fps, the boat collapsed below 13 fps in about one session of three, and the device was removed (TDR) in 3 of 12. One TDR ended in a Windows bugcheck 0x119 VIDEO_SCHEDULER_INTERNAL_ERROR that rebooted the PC. These outcomes vary from session to session on the same build. That fits structures being written over at random. It is also worth a warning that long unattended RT sessions can take the machine down.

Measurements and this report were prepared with an AI assistant (Claude Code); the runs were played on my machine.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:6670112331 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1412). Originally posted by [Rafa7046](https://github.com/Rafa7046) on 2026-11-28T19:21:38Z. --- `docs/fork-ray-tracing.md` lists "Dynamic structures overlap each other" as open. Here is what I found, with a counter for the whole run and four ways of holding the title that did not mend it. **Setup:** RTX 5080 16 GB (driver 621.24), Ryzen 9 9950X3D, 64 GB, Windows 11 26300. Series X, 1440p, DLSS Performance, frame generation off, diag build at `e7d8150`, `VICTORY_BVH_BUILDER=1`. A script plays the prologue cutscenes, then stands one minute on Jason's boat. ### A counter for the whole run With `VICTORY_BVH_TRACE=1` the per-event lines stop after 6,000, about the first 130 frames. PR #1413 adds a line "bvh trace summary" every 600 frames. For the whole run it counts: - the copies to a place of the compacted size; - those made while the size's slot held another value than the one that came; - those landing on a copy of the same frame or of the 10 before, with the bytes written over. ### What it shows - **Hundreds of overlapping copies right after loading and at cutscene changes.** One session had 374 same-frame overlaps at the start and 436 at the cutscene change, with 100–200 MB of structures written over. Another had 455 and 303 + 380. - **Almost none in a steady scene:** 0–8 per window on the boat. - **Every one of 18 RT sessions** of the night before shows it in its first 130 frames, with 4–79 same-frame overlaps each. ### The mechanism, from one case - **Frame 14508:** the title asks structure B's compacted size into slot `…e0f8`. - **Frame 14509:** it asks structure C's into the same slot. - **Then:** it takes 0x1c00 bytes for C, which is B's size, while C's real size of 0x13100 lands a moment later. The next structure is placed 0x1c00 after C, and the copy of C writes over it. The slot is reused frame after frame, so the title reads it within the frame that asked. On the console the size program has run by then. ### Why waiting does not help here With `VICTORY_THIN` the submissions go through `VICTORY_ASYNC_SUBMIT`. The title's submit call returns at once, and the title runs up to a frame ahead of our submitting thread. When it reads the slot, the asking submission may not even have been sent. ### Tried, with numbers (patches on request) 1. **`VICTORY_BVH_SIZES_WAIT=1` (waiting on our thread):** as documented, no help. 2. **Holding the title at its present until the asks sent so far had landed, then until everything before the present was sent:** stale reads 97 against 93 without it, and slower. The title reads within the frame. 3. **Holding the title's submit call of a list that asks, found by waiting for the list's translation:** the title aborted while loading every time, even with a 5 ms cap on that wait. Without waiting, most asking lists are not translated yet at their submit. 4. **Marking the recording on the title's thread** (`list::thin`: a dispatch of one group after `SetComputeRoot32BitConstant`s that look like the size program's): this finds the asking submission at exactly 1.00 per frame. The wait for it to land then gives up anyway: 0.75–1.0 times a frame with a 30 ms cap, and 0.5–1.0 even with 150 ms. The asking submission is not sent while the title is held (something before it in the line seems to wait for the title). With one host queue it also runs behind the previous frame's work on the card. No change in the overlaps. ### What I think it needs The size program's submission has to run and land quickly, without waiting for the line or the card's other work: for example, the builder's size program and its read-back on a queue of their own, as the console's compute queue does. That is beyond what I can do safely from here. The counter should make any attempt measurable. Also seen: in 18 RT sessions on unmodified builds, cutscenes ran at about 42 or about 20 fps, the boat collapsed below 13 fps in about one session of three, and the device was removed (TDR) in 3 of 12. One TDR ended in a Windows bugcheck 0x119 `VIDEO_SCHEDULER_INTERNAL_ERROR` that rebooted the PC. These outcomes vary from session to session on the same build. That fits structures being written over at random. It is also worth a warning that long unattended RT sessions can take the machine down. Measurements and this report were prepared with an AI assistant (Claude Code); the runs were played on my machine.
github-actions[bot] commented 2026-11-28 19:21:45 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-28T19:21:45Z.


Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7244487285 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1412#issuecomment-7244487285). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T19:21:45Z. --- Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
eleboucher commented 2026-11-29 14:29:12 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by eleboucher on 2026-11-29T14:29:12Z.


Same pattern here, with #718 in the build (VICTORY_BVH_SIZE_ANSWER on by default), so the answers at the call do not cover every copy yet.

Setup: RTX 4070 Ti SUPER 16 GB, Ryzen 7 9800X3D, 16 GB RAM, Windows 11. Native 1440p, no upscaling, VICTORY_BVH_BUILDER=1, VICTORY_ACTIVATE_RAYS=1. The base is upstream 568c5e5d plus our stack, diag build, shaders warm. Each run is an unattended 5.5-minute intro with VICTORY_GPU_TIMES=1, VICTORY_BVH_TRACE=1, and the same settings in every run.

Copies at load, from the #1413 summary for the first 600 frames of the world:

Session Stale reads Same-frame overlaps Overlaps on a copy of the 10 frames before Written over
1 538 107 506 120 MB
2 465 45 331 61 MB
3 533 125 386 83 MB

After that, 0–2 overlaps per 600 frames.

Card time of the GI walker f22a76fcb967ee59 varies by session. I put the title's dispatch arguments beside it, using a diagnostics readback of the indirect arguments:

Session f22a76fc ms per frame Thread groups per frame (the title's own)
A 32.6 14,400–15,600
B 142.7 13,900–15,900
C 33.8 15,450–16,900
  • Across nine sessions with identical settings, f22a76fc took 7–143 ms per frame. It stays steady within a session and holds at the same title frame range, so it is not the scene.
  • The work asked is the same in every session, so the cost per group varies 4–10×.
  • The total bytes written over at load do not predict which session is slow. The cheapest session had the most bytes written over. That fits which structures get written over mattering more than how much.
  • 1 of 4 sessions lost the device at world load (DEVICE_HUNG, single f22a dispatches up to 2.2 s). That matches your 3 of 12.

If you have the patches for your attempts, or a branch where the size program runs on its own queue, I can run the same nine-session comparison here.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7257339867 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1412#issuecomment-7257339867). Originally posted by [eleboucher](https://github.com/eleboucher) on 2026-11-29T14:29:12Z. --- Same pattern here, with #718 in the build (`VICTORY_BVH_SIZE_ANSWER` on by default), so the answers at the call do not cover every copy yet. **Setup:** RTX 4070 Ti SUPER 16 GB, Ryzen 7 9800X3D, 16 GB RAM, Windows 11. Native 1440p, no upscaling, `VICTORY_BVH_BUILDER=1`, `VICTORY_ACTIVATE_RAYS=1`. The base is upstream 568c5e5d plus our stack, diag build, shaders warm. Each run is an unattended 5.5-minute intro with `VICTORY_GPU_TIMES=1`, `VICTORY_BVH_TRACE=1`, and the same settings in every run. **Copies at load, from the #1413 summary for the first 600 frames of the world:** | Session | Stale reads | Same-frame overlaps | Overlaps on a copy of the 10 frames before | Written over | |---|---|---|---|---| | 1 | 538 | 107 | 506 | 120 MB | | 2 | 465 | 45 | 331 | 61 MB | | 3 | 533 | 125 | 386 | 83 MB | After that, 0–2 overlaps per 600 frames. **Card time of the GI walker `f22a76fcb967ee59` varies by session.** I put the title's dispatch arguments beside it, using a diagnostics readback of the indirect arguments: | Session | f22a76fc ms per frame | Thread groups per frame (the title's own) | |---|---|---| | A | 32.6 | 14,400–15,600 | | B | **142.7** | 13,900–15,900 | | C | 33.8 | 15,450–16,900 | - Across nine sessions with identical settings, f22a76fc took 7–143 ms per frame. It stays steady within a session and holds at the same title frame range, so it is not the scene. - The work asked is the same in every session, so the cost per group varies 4–10×. - The total bytes written over at load do not predict which session is slow. The cheapest session had the most bytes written over. That fits *which* structures get written over mattering more than how much. - 1 of 4 sessions lost the device at world load (`DEVICE_HUNG`, single f22a dispatches up to 2.2 s). That matches your 3 of 12. If you have the patches for your attempts, or a branch where the size program runs on its own queue, I can run the same nine-session comparison here.
nick0451 commented 2026-11-30 08:03:42 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nick0451 on 2026-11-30T08:03:42Z.


A run on v2026.11.29.05 (41adb551, VICTORY_BVH_SIZE_ANSWER on by default). I counted the copies landing on others per start and set them against what the picture shows. The landings happen in every start, and the starts with the most are damaged, but the amount alone doesn't predict damage.

Setup

  • RTX 3090 24 GB (driver 610.88), i9-14900K, 32 GB (corrected; I first wrote 64 GB), Windows 11. Series S, DLSS performance, frame generation off.
  • Diagnostics build, VICTORY_BVH_BUILDER=1, VICTORY_BVH_TRACE=1 (the #1413 summary).
  • A frozen balcony save at noon. Each start is fresh, a tap every 25 s keeps the idle camera off, so every shot is the same view. Window off screen.
  • Screenshot 180 s into the world.

Every start (14 of 14) has copies landing on others in the first 600 world frames: 21–287 on a copy of the same frame, writing over 1.4–11.9 MB. Copies made from a stale size go on in steady windows (30–90 per 600 frames), but almost none of those land on others.

start budget worst window: landings on a same-frame copy KB written over picture at 180 s
A6 default 287 11,938 damaged: railing top black, character dark
A8 default 218 8,983 damaged: ladder and wall dark
A5 default 116 5,708 clean
A4 default 93 4,358 damaged: railing top black, character and wall dark
A7 default 46 3,626 clean
A3 default 42 2,023 clean
A2 default 23 1,436 clean
A1 default 21 1,919 clean
B2 4096 144 5,915 clean (door glass tinted orange)
B1 4096 140 7,105 clean
B5 4096 131 4,753 clean
B6 4096 110 5,159 clean
B3 4096 92 4,861 damaged: character, ladder and wall dark
B4 4096 76 8,011 clean

"4096" means VICTORY_RT_FAULT_MB=4096.

What this says

  • The two starts with the most landings were both damaged.
  • Two damaged starts (A4, B3) sat in the middle, and several starts with more landings were clean. So the count or the bytes don't decide it on their own. Which structures are written over probably does: the railing, the ladder and the character are what goes dark.
  • Damaged starts: 3 of 8 with the default page budget, 1 of 6 with 4096 MB. That is too few to say the budget matters.
  • The budget does change lost accesses in steady frames, from the "title memory by address" line: pages that had no copy fell from 93.0 to 42.8 a frame, and pages turned down from 59.5 to 36.7. The landings at load didn't change.
  • A next step that would settle it: log which structure (its BLAS, if it can be named) each landing writes over, and check whether the damaged starts are the ones where a near-camera static structure was hit.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7272436499 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1412#issuecomment-7272436499). Originally posted by [nick0451](https://github.com/nick0451) on 2026-11-30T08:03:42Z. --- A run on v2026.11.29.05 (`41adb551`, `VICTORY_BVH_SIZE_ANSWER` on by default). I counted the copies landing on others per start and set them against what the picture shows. **The landings happen in every start, and the starts with the most are damaged, but the amount alone doesn't predict damage.** **Setup** - RTX 3090 24 GB (driver 610.88), i9-14900K, 32 GB (corrected; I first wrote 64 GB), Windows 11. Series S, DLSS performance, frame generation off. - Diagnostics build, `VICTORY_BVH_BUILDER=1`, `VICTORY_BVH_TRACE=1` (the #1413 summary). - A frozen balcony save at noon. Each start is fresh, a tap every 25 s keeps the idle camera off, so every shot is the same view. Window off screen. - Screenshot 180 s into the world. **Every start (14 of 14) has copies landing on others in the first 600 world frames:** 21–287 on a copy of the same frame, writing over 1.4–11.9 MB. Copies made from a stale size go on in steady windows (30–90 per 600 frames), but almost none of those land on others. | start | budget | worst window: landings on a same-frame copy | KB written over | picture at 180 s | |---|---|---|---|---| | A6 | default | 287 | 11,938 | **damaged:** railing top black, character dark | | A8 | default | 218 | 8,983 | **damaged:** ladder and wall dark | | A5 | default | 116 | 5,708 | clean | | A4 | default | 93 | 4,358 | **damaged:** railing top black, character and wall dark | | A7 | default | 46 | 3,626 | clean | | A3 | default | 42 | 2,023 | clean | | A2 | default | 23 | 1,436 | clean | | A1 | default | 21 | 1,919 | clean | | B2 | 4096 | 144 | 5,915 | clean (door glass tinted orange) | | B1 | 4096 | 140 | 7,105 | clean | | B5 | 4096 | 131 | 4,753 | clean | | B6 | 4096 | 110 | 5,159 | clean | | B3 | 4096 | 92 | 4,861 | **damaged:** character, ladder and wall dark | | B4 | 4096 | 76 | 8,011 | clean | "4096" means `VICTORY_RT_FAULT_MB=4096`. **What this says** - The two starts with the most landings were both damaged. - Two damaged starts (A4, B3) sat in the middle, and several starts with more landings were clean. So the count or the bytes don't decide it on their own. **Which** structures are written over probably does: the railing, the ladder and the character are what goes dark. - Damaged starts: 3 of 8 with the default page budget, 1 of 6 with 4096 MB. That is too few to say the budget matters. - The budget does change lost accesses in steady frames, from the "title memory by address" line: pages that had no copy fell from 93.0 to 42.8 a frame, and pages turned down from 59.5 to 36.7. The landings at load didn't change. - A next step that would settle it: log which structure (its BLAS, if it can be named) each landing writes over, and check whether the damaged starts are the ones where a near-camera static structure was hit. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
trustno1-coder commented 2026-11-30 15:43:41 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-30T15:43:41Z.


Closing this because it was opened before v2026.11.29.01, and a great deal has changed since then. The latest release is v2026.11.30.01.

If this still happens, or still applies, on the latest release, please open a new issue. For a bug, attach both logs from that run:

  1. The play log: the newest victory-nvidia-play-<date>-<time>-<number>.log in %LOCALAPPDATA%\victory\logs\.
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, plus the newest .crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\ if there is one from that run.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7283478412 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1412#issuecomment-7283478412). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-11-30T15:43:41Z. --- Closing this because it was opened before v2026.11.29.01, and a great deal has changed since then. The latest release is [v2026.11.30.01](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.30.01). If this still happens, or still applies, on the latest release, please open a new issue. For a bug, attach both logs from that run: 1. The play log: the newest `victory-nvidia-play-<date>-<time>-<number>.log` in `%LOCALAPPDATA%\victory\logs\`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, plus the newest `.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\` if there is one from that run.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA#1412
No description provided.