Ray tracing: copies of title memory by address are brought up to date by every list, many times a frame (CPU preparing time) #3284

Closed
opened 2026-11-29 21:22:06 +00:00 by github-bot · 3 comments
Owner

@⁠dyshay on GitHub · 2026-11-29 21:18 UTC · original

What happens

With ray tracing on, memory.rs bring_up brings every numbered by-address copy of title memory up to date for every list that comes to title memory by address. It does so again for each builder address a list names. In a frame with many such lists, the same copies are refreshed many times, and that time lands in the CPU's "preparing" part of the frame.

Evidence

  • Kyle Pelham (El1xr) measured it: with the copies brought up to date once a frame, CPU preparing time with ray tracing on went from 40.7 to 30.4 ms (their issue 396, round 5). Their RT preset turns it on.
  • On our RTX 4090: an A/B run within one session (VICTORY_AB, Series X 1440p, ray tracing, house scene) is queued; numbers to follow.

The fix (switch, off)

VICTORY_BVH_REFRESH_ONCE=1: a copy is brought up to date by the first list of the frame only. The directory, and the copies numbered this frame, are still brought up to date by every list. A line every 10 s counts the copies brought up to date and those passed over. It can be named in VICTORY_AB. PR: #(to follow)

Risk: a title write that lands between two submissions of the same frame reaches a later list one frame late. If something by address (ray-traced lighting, reflections) flickers or lags with the switch on, that is the place to look.

What to check on other cards

  • With ray tracing on: CPU preparing ms with and without VICTORY_BVH_REFRESH_ONCE=1 (or VICTORY_AB=30,VICTORY_BVH_REFRESH_ONCE in an ab/diagnostics build), and the "copies brought up to date / passed over" line.
  • Any picture difference by address: lighting that lags one frame behind the camera, flicker in reflections.
**@⁠dyshay** on GitHub · 2026-11-29 21:18 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3284) ## What happens With ray tracing on, `memory.rs` `bring_up` brings every numbered by-address copy of title memory up to date for **every** list that comes to title memory by address. It does so again for each builder address a list names. In a frame with many such lists, the same copies are refreshed many times, and that time lands in the CPU's "preparing" part of the frame. ## Evidence - Kyle Pelham (El1xr) measured it: with the copies brought up to date once a frame, CPU preparing time with ray tracing on went from **40.7 to 30.4 ms** (their issue 396, round 5). Their RT preset turns it on. - On our RTX 4090: an A/B run within one session (`VICTORY_AB`, Series X 1440p, ray tracing, house scene) is queued; numbers to follow. ## The fix (switch, off) `VICTORY_BVH_REFRESH_ONCE=1`: a copy is brought up to date by the first list of the frame only. The directory, and the copies numbered this frame, are still brought up to date by every list. A line every 10 s counts the copies brought up to date and those passed over. It can be named in `VICTORY_AB`. PR: #(to follow) **Risk:** a title write that lands between two submissions of the same frame reaches a later list one frame late. If something by address (ray-traced lighting, reflections) flickers or lags with the switch on, that is the place to look. ## What to check on other cards - With ray tracing on: CPU preparing ms with and without `VICTORY_BVH_REFRESH_ONCE=1` (or `VICTORY_AB=30,VICTORY_BVH_REFRESH_ONCE` in an ab/diagnostics build), and the "copies brought up to date / passed over" line. - Any picture difference by address: lighting that lags one frame behind the camera, flicker in reflections.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 21:22:06 +00:00
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-29 21:18 UTC · original

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)

**@⁠github-actions[bot]** on GitHub · 2026-11-29 21:18 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3284#issuecomment-7262770218) 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)
Author
Owner

@⁠dyshay on GitHub · 2026-11-29 21:39 UTC · original

Not a crash report: this is a development issue (a code change and how to test it). The relevant log lines and the numbers from our runs are quoted in the issue body, and the pull request linked here has the tests.

**@⁠dyshay** on GitHub · 2026-11-29 21:39 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3284#issuecomment-7263045894) Not a crash report: this is a development issue (a code change and how to test it). The relevant log lines and the numbers from our runs are quoted in the issue body, and the pull request linked here has the tests.
Author
Owner

@⁠dyshay on GitHub · 2026-11-30 04:23 UTC · original

Closing this one. Our runs of the port on an RTX 4090 didn't show a gain on the software walk (one run slower, one confounded by an old build), and the hardware DXR path proposed in #3704 replaces the title's software builder and traversal that this tuned. The idea stays with its original author if they want to propose it.

**@⁠dyshay** on GitHub · 2026-11-30 04:23 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3284#issuecomment-7268729274) Closing this one. Our runs of the port on an RTX 4090 didn't show a gain on the software walk (one run slower, one confounded by an old build), and the hardware DXR path proposed in #3704 replaces the title's software builder and traversal that this tuned. The idea stays with its original author if they want to propose it.
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/trustno1-coder--VIctory-NVIDIA#3284
No description provided.