RT-on stability: background shader work off and 12 ripe blocks by default #4728

Open
github-bot wants to merge 1 commit from github-bot/gh-4727 into main AGit
Owner

@⁠Gamination on GitHub · 2026-12-01 03:53 UTC · original
Gamination:rt-stability-defaults → main · +21 −14 · 4 files · 1 commits · open

What it changes

Two defaults, for RT-on stability:

  1. VICTORY_D3D12_BACKGROUND: background shader work is now off by default. SetBackgroundProcessingMode(DISABLE_BACKGROUND_WORK) is called unless VICTORY_D3D12_BACKGROUND=1. This switch already existed; before this change it was opt-in with =0.
  2. VICTORY_RIPE_BLOCKS: play no longer forces it to 0. The texture pool's own default of 12 blocks made ahead now applies. scripts/play-nvidia.ps1 sets 12 to match.

The README rows for both settings are updated.

Why

On an RTX 4060 Laptop GPU (8 GB, 32 GB RAM), software RT on, walking a scripted loop, there were two different failures. Neither was memory running out: card memory (6.4-6.6 GB) and process memory were the same in runs that failed and runs that survived.

1. Silent device removal (background work on).

  • Every RT-on walking run lost the device 50-115 s into walking.
  • GetDeviceRemovedReason returned DXGI_ERROR_DEVICE_REMOVED itself. There was no TDR or nvlddmkm event, and the DRED breadcrumbs were empty.
  • The first call to fail was always a resource creation on some thread other than the submitting one.
  • A dump written by a thread polling GetDeviceRemovedReason caught the driver's "D3D Background Thread"s deep in nvwgf2umx. The kernel had refused our creation calls about 500 ms before GetDeviceRemovedReason reported the removal.
  • With background work disabled, this removal did not happen in any of 11 runs of 20 minutes.

2. Hang (DXGI_ERROR_DEVICE_HUNG, nvlddmkm event 153), with VICTORY_RIPE_BLOCKS=0.

  • With new texture blocks used at once, 2 of 4 runs hung.
  • 3 of 4 also stood for 20-24 s at a time with the card idle. In the stall dump, the submitting thread was waiting for earlier submissions, the per-process engine counters read 0 %, and the trail just before showed a burst of concurrent MakeResident calls on a new arena and new blocks.
  • With 12 blocks made ahead: no hang in 7 runs, and at most 5 s idle in total. Card memory was the same under the 6 GB budget.

Testing

Each run below was 20 minutes, RT on, walking:

Arm Runs Result
Background on (old default) 17 device removed within 2 min of walking in every one
Background off, RIPE_BLOCKS=0 4 2 hung; 3 had 20 s+ idle stalls
Background off, RIPE_BLOCKS=12 5 (as switches) + 2 (this change as defaults, no switches set) all 7 survived

Caveat: these runs used a tree based on e1251c31 (v2026.11.30.03) plus other open PRs and diagnostics, not this branch. The change applies to current main unchanged.

Performance: with RT on, frames were 360-680 ms (GPU-bound) on this laptop whether background work was on or off. A frame-time effect with RT off has not been measured beyond the existing note (run 54).

Checks on this branch:

  • cargo clippy -p victory -p victory-gpu --all-targets --locked: no warnings in the changed files. The 5 warnings it prints are already on main, in host/font.rs, host/menu.rs and host/panel.rs.
  • cargo test -p victory --locked play: 32 passed.
  • #4714 (open): pool REST reuses texture ranges after 2.5 s of wall-clock time without waiting for the submission. That may be another cause of the hang, since RT-on frames here take 1-2 s; not yet tested.
  • #4595 (open): the "nothing of ours was running on the card" phase label.

🤖 Generated with Claude Code

**@⁠Gamination** on GitHub · 2026-12-01 03:53 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4727) `Gamination:rt-stability-defaults` → `main` · +21 −14 · 4 files · 1 commits · open ## What it changes Two defaults, for RT-on stability: 1. **`VICTORY_D3D12_BACKGROUND`: background shader work is now off by default.** `SetBackgroundProcessingMode(DISABLE_BACKGROUND_WORK)` is called unless `VICTORY_D3D12_BACKGROUND=1`. This switch already existed; before this change it was opt-in with `=0`. 2. **`VICTORY_RIPE_BLOCKS`: play no longer forces it to 0.** The texture pool's own default of 12 blocks made ahead now applies. `scripts/play-nvidia.ps1` sets 12 to match. The README rows for both settings are updated. ## Why On an RTX 4060 Laptop GPU (8 GB, 32 GB RAM), software RT on, walking a scripted loop, there were two different failures. Neither was memory running out: card memory (6.4-6.6 GB) and process memory were the same in runs that failed and runs that survived. **1. Silent device removal (background work on).** - Every RT-on walking run lost the device 50-115 s into walking. - `GetDeviceRemovedReason` returned `DXGI_ERROR_DEVICE_REMOVED` itself. There was no TDR or nvlddmkm event, and the DRED breadcrumbs were empty. - The first call to fail was always a resource creation on some thread other than the submitting one. - A dump written by a thread polling `GetDeviceRemovedReason` caught the driver's "D3D Background Thread"s deep in `nvwgf2umx`. The kernel had refused our creation calls about 500 ms before `GetDeviceRemovedReason` reported the removal. - With background work disabled, this removal did not happen in any of 11 runs of 20 minutes. **2. Hang (`DXGI_ERROR_DEVICE_HUNG`, nvlddmkm event 153), with `VICTORY_RIPE_BLOCKS=0`.** - With new texture blocks used at once, 2 of 4 runs hung. - 3 of 4 also stood for 20-24 s at a time with the card idle. In the stall dump, the submitting thread was waiting for earlier submissions, the per-process engine counters read 0 %, and the trail just before showed a burst of concurrent `MakeResident` calls on a new arena and new blocks. - With 12 blocks made ahead: no hang in 7 runs, and at most 5 s idle in total. Card memory was the same under the 6 GB budget. ## Testing Each run below was 20 minutes, RT on, walking: | Arm | Runs | Result | |---|---|---| | Background on (old default) | 17 | device removed within 2 min of walking in every one | | Background off, `RIPE_BLOCKS=0` | 4 | 2 hung; 3 had 20 s+ idle stalls | | Background off, `RIPE_BLOCKS=12` | 5 (as switches) + 2 (this change as defaults, no switches set) | all 7 survived | Caveat: these runs used a tree based on e1251c31 (v2026.11.30.03) plus other open PRs and diagnostics, not this branch. The change applies to current main unchanged. Performance: with RT on, frames were 360-680 ms (GPU-bound) on this laptop whether background work was on or off. A frame-time effect with RT off has not been measured beyond the existing note (run 54). Checks on this branch: - `cargo clippy -p victory -p victory-gpu --all-targets --locked`: no warnings in the changed files. The 5 warnings it prints are already on main, in `host/font.rs`, `host/menu.rs` and `host/panel.rs`. - `cargo test -p victory --locked play`: 32 passed. ## Related - #4714 (open): pool `REST` reuses texture ranges after 2.5 s of wall-clock time without waiting for the submission. That may be another cause of the hang, since RT-on frames here take 1-2 s; not yet tested. - #4595 (open): the "nothing of ours was running on the card" phase label. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- VICTORY_D3D12_BACKGROUND: SetBackgroundProcessingMode(DISABLE_BACKGROUND_WORK)
  is now the default; =1 leaves the driver's background work on. With it on,
  every 20 min RT-on walking run on an RTX 4060 Laptop lost the device
  (DXGI_ERROR_DEVICE_REMOVED, no TDR, empty DRED) 50-115 s into walking; off,
  none in 11 runs.
- VICTORY_RIPE_BLOCKS: play no longer forces 0, so the pool's 12 blocks made
  ahead apply (play-nvidia.ps1 sets 12). With 0, 2 of 4 RT-on runs hung
  (nvlddmkm 153) and 3 of 4 stalled 20-24 s behind residency waits; with 12,
  no hang in 7.
- README rows for both updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 03:57:50 +00:00
Author
Owner

@⁠KruIN689 on GitHub · 2026-12-01 05:50 UTC · original

Independent test, desktop card, hardware RT, while moving: the frame-time effect this PR's description leaves open.

Setup

  • Hardware: RTX 5080 16 GB, Ryzen 9 9950X3D, Windows 11.
  • Build: one release build of Lyrnc/palmlight main 12a25580, which carries upstream main 84bd61e2's hardware RT. Our play defaults match the old ones here: background work on, VICTORY_RIPE_BLOCKS=0.
  • Settings: VICTORY_HW_RT=1, Series X native 1440p.
  • Arms: "PR" is the same exe with VICTORY_D3D12_BACKGROUND=0;VICTORY_RIPE_BLOCKS=12, which is what this PR makes the default. The log confirmed both took effect. "main" is that exe as is.
  • Runs: the same save, then 6 minutes of scripted walking and driving per run, four runs in one session in turns (PR, main, PR, main). Gameplay seconds only.
run fps ms/frame frames over 50 ms per 1000 over 100 ms longest p99 submitting thread BLAS built
PR 1 27.3 36.6 75.3 1 111 ms 59.0 ms 33.5 ms 22.2 k
main 1 23.1 43.4 201.5 6 161 ms 67.3 ms 39.9 ms 26.3 k
PR 2 22.8 44.0 139.6 3 127 ms 60.7 ms 40.4 ms 19.9 k
main 2 23.0 43.4 219.8 10 183 ms 65.8 ms 40.5 ms 21.9 k

What I read from it

  • Average fps: a tie in the closer pair, 22.8 vs 23.0, with a similar route (19.9 k vs 21.9 k BLASes built). PR 1 came out 4 fps ahead, but main 1 met more new geometry, so part of that gap is the route.
  • Hitches are consistently fewer with the PR's defaults, in both pairs:
    • frames over 50 ms: 75 and 140 per 1000, against 202 and 220;
    • frames over 100 ms: 1 and 3, against 6 and 10;
    • the longest frame: 111 and 127 ms, against 161 and 183 ms.
  • No device removal or hang in any of the four runs, and the same log error/warning line count on both sides (86–87). On this desktop card the removal the PR describes did not occur with background work on either. So this run neither confirms nor contradicts the laptop finding; it shows the change costs nothing here and smooths frames.
  • Time waiting for new card memory to be mapped was a little higher with 12 blocks made ahead: 4.9 / 4.8 s against 4.2 / 4.5 s since start. The longest wait was the same, about 10 ms.

Limits

  • One session, two pairs, and HW RT routes vary.
  • I did not split the two switches, so I can't say which one gives the smoother frames.
  • Software RT was not run.

Tested with the help of Claude Code (Claude Opus 5.5).

**@⁠KruIN689** on GitHub · 2026-12-01 05:50 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4727#issuecomment-7302198255) **Independent test, desktop card, hardware RT, while moving:** the frame-time effect this PR's description leaves open. **Setup** - Hardware: RTX 5080 16 GB, Ryzen 9 9950X3D, Windows 11. - Build: one release build of Lyrnc/palmlight main 12a25580, which carries upstream main 84bd61e2's hardware RT. Our play defaults match the old ones here: background work on, `VICTORY_RIPE_BLOCKS=0`. - Settings: `VICTORY_HW_RT=1`, Series X native 1440p. - Arms: "PR" is the same exe with `VICTORY_D3D12_BACKGROUND=0;VICTORY_RIPE_BLOCKS=12`, which is what this PR makes the default. The log confirmed both took effect. "main" is that exe as is. - Runs: the same save, then 6 minutes of scripted walking and driving per run, four runs in one session in turns (PR, main, PR, main). Gameplay seconds only. | run | fps | ms/frame | frames over 50 ms per 1000 | over 100 ms | longest | p99 | submitting thread | BLAS built | |---|---|---|---|---|---|---|---|---| | PR 1 | 27.3 | 36.6 | 75.3 | 1 | 111 ms | 59.0 ms | 33.5 ms | 22.2 k | | main 1 | 23.1 | 43.4 | 201.5 | 6 | 161 ms | 67.3 ms | 39.9 ms | 26.3 k | | PR 2 | 22.8 | 44.0 | 139.6 | 3 | 127 ms | 60.7 ms | 40.4 ms | 19.9 k | | main 2 | 23.0 | 43.4 | 219.8 | 10 | 183 ms | 65.8 ms | 40.5 ms | 21.9 k | **What I read from it** - **Average fps:** a tie in the closer pair, 22.8 vs 23.0, with a similar route (19.9 k vs 21.9 k BLASes built). PR 1 came out 4 fps ahead, but main 1 met more new geometry, so part of that gap is the route. - **Hitches are consistently fewer with the PR's defaults**, in both pairs: - frames over 50 ms: 75 and 140 per 1000, against 202 and 220; - frames over 100 ms: 1 and 3, against 6 and 10; - the longest frame: 111 and 127 ms, against 161 and 183 ms. - **No device removal or hang in any of the four runs,** and the same log error/warning line count on both sides (86–87). On this desktop card the removal the PR describes did not occur with background work on either. So this run neither confirms nor contradicts the laptop finding; it shows the change costs nothing here and smooths frames. - **Time waiting for new card memory to be mapped was a little higher with 12 blocks made ahead:** 4.9 / 4.8 s against 4.2 / 4.5 s since start. The longest wait was the same, about 10 ms. **Limits** - One session, two pairs, and HW RT routes vary. - I did not split the two switches, so I can't say which one gives the smoother frames. - Software RT was not run. *Tested with the help of Claude Code (Claude Opus 5.5).*
Author
Owner

@⁠KruIN689 on GitHub · 2026-12-01 06:38 UTC · original

Follow-up: the two switches apart. Same PC, build and setup as above, in the same session right after it. Arms:

  • bg0: only VICTORY_D3D12_BACKGROUND=0;
  • ripe12: only VICTORY_RIPE_BLOCKS=12;
  • main: defaults.

Run in turns: bg0, ripe12, main, ripe12, bg0, main. The last main run never got past a loading spot (17 draws a frame), so it's left out.

run fps frames over 50 ms per 1000 over 100 ms longest
bg0 1 23.8 97.6 4 121 ms
ripe12 1 27.8 44.4 0 85 ms
main 1 24.6 99.2 12 303 ms
ripe12 2 20.2 562.9 90 3,514 ms
bg0 2 21.7 321.9 6 160 ms

What I read from it

  • Runs 4 and 5 were heavier for every arm, so the drift within the session is larger than any one switch. I can't attribute the smoother frames above to either switch on its own from this.
  • ripe12 run 2 had a 3.5 s frame in its sixth minute, with 82 frames over 100 ms in that minute. It was not a device removal: no removal or hang in any run, and the same error/warning line count everywhere. Its other minutes were also the slowest of the set (19.6–21 fps). ripe12 run 1, by contrast, was the smoothest run of all. One 3.5 s stall in one run is a single sample, but it is the kind of stall the description reports for RIPE_BLOCKS=0. It showed here with 12.

So the result is: together, fewer hitches in two of two pairs earlier. Apart, the noise wins. I'm running 3 more pairs of both together against defaults before we change palmlight's play defaults, and I'll add them here.

Tested with the help of Claude Code (Claude Opus 5.5).

**@⁠KruIN689** on GitHub · 2026-12-01 06:38 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4727#issuecomment-7303099608) **Follow-up: the two switches apart.** Same PC, build and setup as above, in the same session right after it. Arms: - `bg0`: only `VICTORY_D3D12_BACKGROUND=0`; - `ripe12`: only `VICTORY_RIPE_BLOCKS=12`; - `main`: defaults. Run in turns: bg0, ripe12, main, ripe12, bg0, main. The last main run never got past a loading spot (17 draws a frame), so it's left out. | run | fps | frames over 50 ms per 1000 | over 100 ms | longest | |---|---|---|---|---| | bg0 1 | 23.8 | 97.6 | 4 | 121 ms | | ripe12 1 | 27.8 | 44.4 | 0 | 85 ms | | main 1 | 24.6 | 99.2 | 12 | 303 ms | | ripe12 2 | 20.2 | 562.9 | 90 | **3,514 ms** | | bg0 2 | 21.7 | 321.9 | 6 | 160 ms | **What I read from it** - **Runs 4 and 5 were heavier for every arm**, so the drift within the session is larger than any one switch. I can't attribute the smoother frames above to either switch on its own from this. - **ripe12 run 2 had a 3.5 s frame in its sixth minute**, with 82 frames over 100 ms in that minute. It was not a device removal: no removal or hang in any run, and the same error/warning line count everywhere. Its other minutes were also the slowest of the set (19.6–21 fps). ripe12 run 1, by contrast, was the smoothest run of all. One 3.5 s stall in one run is a single sample, but it is the kind of stall the description reports for `RIPE_BLOCKS=0`. It showed here with 12. So the result is: together, fewer hitches in two of two pairs earlier. Apart, the noise wins. I'm running 3 more pairs of both together against defaults before we change palmlight's play defaults, and I'll add them here. *Tested with the help of Claude Code (Claude Opus 5.5).*
Author
Owner

@⁠KruIN689 on GitHub · 2026-12-01 07:24 UTC · original

Three more pairs, both switches together against defaults. Same setup, run in turns (main, PR, main, PR, main, PR):

run fps frames over 50 ms per 1000 over 100 ms longest BLAS built
main 3 20.7 395.0 26 184 ms 21.0 k
PR 3 16.8 577.0 85 131 ms 25.9 k
main 4 17.3 606.6 83 218 ms 25.8 k
PR 4 22.5 307.2 14 284 ms 19.0 k
main 5 21.9 239.0 2 110 ms 20.4 k
PR 5 21.7 247.6 4 121 ms 11.5 k

What I read from it

  • These pairs show no difference either way. The busier route loses, whichever arm it falls on: PR 3 and main 4 both built ~26 k BLASes and both had ~600 long frames per 1000.
  • There is no removal or hang in any of the 15 runs today (5 pairs plus the split), and the error/warning count is the same.
  • Across 5 pairs on this desktop card with hardware RT, the smoother frames in the first two pairs did not hold up. My read is neutral on frame time, and harmless.
  • The case for this PR rests on the laptop's device-removal finding, which I couldn't reproduce here because the removal never happened on this desktop card. I'd keep it on that basis. Others with 8 GB cards seeing the silent removal would be the right testers.
  • Every arm slowed over the session, from 23–28 fps in the first runs to 17–22 in the last. It may be thermal, or something growing across runs, such as the saved pipeline library at 536 MB. It is not tied to either switch.

For palmlight I'm leaving our play defaults as they are for now.

Tested with the help of Claude Code (Claude Opus 5.5).

**@⁠KruIN689** on GitHub · 2026-12-01 07:24 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4727#issuecomment-7304027997) **Three more pairs, both switches together against defaults.** Same setup, run in turns (main, PR, main, PR, main, PR): | run | fps | frames over 50 ms per 1000 | over 100 ms | longest | BLAS built | |---|---|---|---|---|---| | main 3 | 20.7 | 395.0 | 26 | 184 ms | 21.0 k | | PR 3 | 16.8 | 577.0 | 85 | 131 ms | 25.9 k | | main 4 | 17.3 | 606.6 | 83 | 218 ms | 25.8 k | | PR 4 | 22.5 | 307.2 | 14 | 284 ms | 19.0 k | | main 5 | 21.9 | 239.0 | 2 | 110 ms | 20.4 k | | PR 5 | 21.7 | 247.6 | 4 | 121 ms | 11.5 k | **What I read from it** - **These pairs show no difference either way.** The busier route loses, whichever arm it falls on: PR 3 and main 4 both built ~26 k BLASes and both had ~600 long frames per 1000. - **There is no removal or hang in any of the 15 runs today** (5 pairs plus the split), and the error/warning count is the same. - **Across 5 pairs on this desktop card with hardware RT,** the smoother frames in the first two pairs did not hold up. My read is neutral on frame time, and harmless. - **The case for this PR rests on the laptop's device-removal finding,** which I couldn't reproduce here because the removal never happened on this desktop card. I'd keep it on that basis. Others with 8 GB cards seeing the silent removal would be the right testers. - **Every arm slowed over the session**, from 23–28 fps in the first runs to 17–22 in the last. It may be thermal, or something growing across runs, such as the saved pipeline library at 536 MB. It is not tied to either switch. For palmlight I'm leaving our play defaults as they are for now. *Tested with the help of Claude Code (Claude Opus 5.5).*
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/4728/head:github-bot/gh-4727'
git switch 'github-bot/gh-4727'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4727'
git switch 'github-bot/gh-4727'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4727'
git switch 'github-bot/gh-4727'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4727'
git switch 'main'
git merge --squash 'github-bot/gh-4727'
git switch 'main'
git merge --ff-only 'github-bot/gh-4727'
git switch 'main'
git merge 'github-bot/gh-4727'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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!4728
No description provided.