Hardware ray tracing: large compute programs are made aside (VICTORY_RT_BIG_ASIDE=<bytes>, off) #4339

Closed
github-bot wants to merge 14 commits from github-bot/gh-4338 into main AGit
Owner

@⁠harrisotiropoulos-jpg on GitHub · 2026-11-30 19:03 UTC · original
harrisotiropoulos-jpg:perf/rt-big-aside → main · +977 −848 · 32 files · 14 commits · closed without merging

What it changes

Opt-in, off unless VICTORY_RT_BIG_ASIDE=<bytes> is given, and only with VICTORY_HW_RT=1.

A dispatch waits in its frame for its compute pipeline. The title's programs that shade what rays hit (CS_RaytracingResolve, 58-79 KB each) take the driver 2-5 s apiece, so a frame that met a new one stood as long. With this, dispatches of compute programs at least that big are dropped until a worker has made the pipeline, and the frames go on.

Cost: a dispatch made only once is lost if its program is that big, and what it shades is missing for a few seconds. Programs of the first scene and passes over the screen are still waited for. That is why it is off by default.

It is read as a number, so not through toggled!/asked_for!.

How it was tested

  • GPU and profile: RTX 4080 16 GB, Ryzen 7 9800X3D, 32 GB, Windows 11; Series X, 1440p, DLSS performance, frame generation 2x, hardware ray tracing on.
  • Before: 8, 11 and 8 frame waits of 2 s or more for compute pipelines in runs of about 124, 138 and 79 s (loading included).
  • After, with 40000: none in three runs of about 173, 216 and 125 s, and long freezes were no longer seen in play.
  • Not an isolated A/B: the later runs had warmer pipeline caches and other changes of ours. A higher threshold tried first left such waits. A first start with changed shaders still had 19, all within 45 s of loading (programs below the size are waited for as before). This branch was built and unit tested but not played by itself.
  • Wave sizes: no shader change.
  • cargo test --release -p victory-gpu --lib: no. 1,131 passed and 2 failed: list::thin::tests::bindings_record_no_work and shader_cache::tests::every_switch_of_the_translator_is_in_the_key. Both fail on main (e1251c319) too.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #4256 (another approach to compute compile stalls), #1122 (the same idea for the ambient stand-in's passes)

🤖 Generated with Claude Code

**@⁠harrisotiropoulos-jpg** on GitHub · 2026-11-30 19:03 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4338) `harrisotiropoulos-jpg:perf/rt-big-aside` → `main` · +977 −848 · 32 files · 14 commits · closed without merging ## What it changes Opt-in, off unless `VICTORY_RT_BIG_ASIDE=<bytes>` is given, and only with `VICTORY_HW_RT=1`. A dispatch waits in its frame for its compute pipeline. The title's programs that shade what rays hit (`CS_RaytracingResolve`, 58-79 KB each) take the driver 2-5 s apiece, so a frame that met a new one stood as long. With this, dispatches of compute programs at least that big are dropped until a worker has made the pipeline, and the frames go on. **Cost:** a dispatch made only once is lost if its program is that big, and what it shades is missing for a few seconds. Programs of the first scene and passes over the screen are still waited for. That is why it is off by default. It is read as a number, so not through `toggled!`/`asked_for!`. ## How it was tested - GPU and profile: RTX 4080 16 GB, Ryzen 7 9800X3D, 32 GB, Windows 11; Series X, 1440p, DLSS performance, frame generation 2x, hardware ray tracing on. - Before: 8, 11 and 8 frame waits of 2 s or more for compute pipelines in runs of about 124, 138 and 79 s (loading included). - After, with 40000: none in three runs of about 173, 216 and 125 s, and long freezes were no longer seen in play. - Not an isolated A/B: the later runs had warmer pipeline caches and other changes of ours. A higher threshold tried first left such waits. A first start with changed shaders still had 19, all within 45 s of loading (programs below the size are waited for as before). This branch was built and unit tested but not played by itself. - Wave sizes: no shader change. - `cargo test --release -p victory-gpu --lib`: no. 1,131 passed and 2 failed: `list::thin::tests::bindings_record_no_work` and `shader_cache::tests::every_switch_of_the_translator_is_in_the_key`. Both fail on main (e1251c319) too. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #4256 (another approach to compute compile stalls), #1122 (the same idea for the ambient stand-in's passes) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 19:03:42 +00:00
Author
Owner

@⁠KruIN689 on GitHub · 2026-12-01 00:26 UTC · original

Tested with #4338 on an RTX 5080, HW RT roaming, 2+2 runs; table in #4338 (latest comment). With a warm shader cache no frame waited over 1 s for a pipeline either way, so this path had nothing to do there; no errors or regressions with VICTORY_RT_BIG_ASIDE=40000. A cold first start is where it should show. (Claude Code, for KruIN689.)

**@⁠KruIN689** on GitHub · 2026-12-01 00:26 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4338#issuecomment-7296341887) Tested with #4338 on an RTX 5080, HW RT roaming, 2+2 runs; table in https://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/pulls/4338 (latest comment). With a warm shader cache no frame waited over 1 s for a pipeline either way, so this path had nothing to do there; no errors or regressions with VICTORY_RT_BIG_ASIDE=40000. A cold first start is where it should show. (Claude Code, for KruIN689.)
github-bot closed this pull request 2026-12-01 18:43:50 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:42 UTC · original

Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:42 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4338#issuecomment-7321386158) Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

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!4339
No description provided.