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

Closed
harrisotiropoulos-jpg wants to merge 14 commits from upstream-pr/4338 into main
harrisotiropoulos-jpg commented 2026-11-30 19:03:01 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by harrisotiropoulos-jpg on 2026-11-30T19:03:01Z.


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: #4255 (another approach to compute compile stalls), #1122 (the same idea for the ambient stand-in's passes)

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5571839630 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4338). Originally posted by [harrisotiropoulos-jpg](https://github.com/harrisotiropoulos-jpg) on 2026-11-30T19:03:01Z. --- ## 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: #4255 (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)
KruIN689 commented 2026-12-01 00:26:44 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by KruIN689 on 2026-12-01T00:26:44Z.


Tested with #4337 on an RTX 5080, HW RT roaming, 2+2 runs; table in https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4337 (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.)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7296341887 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4338#issuecomment-7296341887). Originally posted by [KruIN689](https://github.com/KruIN689) on 2026-12-01T00:26:44Z. --- Tested with #4337 on an RTX 5080, HW RT roaming, 2+2 runs; table in https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4337 (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.)
trustno1-coder commented 2026-12-01 18:42:27 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:42:27Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7321386158 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4338#issuecomment-7321386158). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-12-01T18:42:27Z. --- 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

Sign in to join this conversation.
No reviewers
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!4338
No description provided.