Trees: the instance culling given the wave-wide form (trees and bushes missing at a distance) #1571

Merged
Amar-D3V merged 1 commit from upstream-pr/1571 into main 2026-11-29 00:24:47 +00:00
Amar-D3V commented 2026-11-28 21:51:24 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Amar-D3V on 2026-11-28T21:51:24Z.


Fixes #1516

Related: #1504 and #1450 fix the same programs in broader ways. This is the smallest of the three, 12 lines in one place. If one of the others lands, this one can be closed.

What it changes

On 32-lane hosts the four programs of the trees' instance culling are refused with "no wave32 lowering for this wave64 program", so their dispatches are dropped:

Program Pipeline hash Dispatches dropped
InstanceCulling:CS_Tree_BatchCull 55679a0547649d0b 9 a frame, in 107 of 109 ten-second log lines in the world
…_ImposterOnly 89d08e561897d4e5 about 1 a frame, in nearly every line
…_ValidateInst 7c9a6a83826cdfac under 1 a frame
…_ValidateInstInv 21f7ad7863620328 under 1 a frame

What it looks like is #1516: trees and bushes along the road show only when you come near, stay while you drive off a little, and go again farther off.

All four are of the shape the wave-wide form is already kept for in emit/mod.rs: groups of 64, with an LDS read and write in one lane-branch region (VICTORY_WAVE_WHY: "LDS in a group over 32, an LDS read and write in one lane-branch region, lane-constant mask, mask as data, v_mbcnt, v_readlane"). This adds their container digests to that list, next to CS_CollisionRaytraced and the volumetric programs. Nothing else changes, and VICTORY_WAVE_WIDE=0 still turns it off.

How it was tested

  • GPU and profile: RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, Windows 11 26300, driver 621.40. Series X, 2560x1440, with and without DLSS Quality, frame generation off; Series S with DLSS frame generation 3x. No ray tracing.
  • Offline: victory translate --list --validate --pipelines with VICTORY_HOST_WAVE=32 over the title's folder, limited to the four hashes (VICTORY_TRANSLATE_ONLY). Before: all four "no wave32 lowering". After, with no switch set: all four emitted, validated by dxil.dll and made RTX compute pipelines (7 and 8 loop branches taken by each host wave together).
  • Before, in the game: the four hashes are in the log's "shader does not translate" lines, and the dispatches above are dropped. Trees and bushes are missing at a distance, as in #1516.
  • After, in the game: none of the four is refused any more. Trees and bushes are there at a distance and stay while you drive away. About 30 minutes of play over seven starts, with no device removal and no TDR. Those starts had two freezes and one stall while loading, none of them here: the two freezes were slot eviction's deadlock (#1557), and the stall was #846's held wait on a first start.
  • For shader changes, the wave sizes tested: 32 lanes only (the RTX). I have no 64-lane card to try it on.
  • cargo test -p victory-shader passed (348 passed, 8 ignored). Clippy reports nothing in the changed lines.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #1504 (all 34 refused wave64 programs made exact, the six tree culling programs among them), #1450 (a scoped LDS retry for kernels that #43's stricter analysis refused), #348 and #1006 (other wave64 forms).
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5544917304 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1571). Originally posted by [Amar-D3V](https://github.com/Amar-D3V) on 2026-11-28T21:51:24Z. --- Fixes #1516 Related: #1504 and #1450 fix the same programs in broader ways. This is the smallest of the three, 12 lines in one place. If one of the others lands, this one can be closed. ## What it changes On 32-lane hosts the four programs of the trees' instance culling are refused with "no wave32 lowering for this wave64 program", so their dispatches are dropped: | Program | Pipeline hash | Dispatches dropped | |---|---|---| | `InstanceCulling:CS_Tree_BatchCull` | `55679a0547649d0b` | 9 a frame, in 107 of 109 ten-second log lines in the world | | `…_ImposterOnly` | `89d08e561897d4e5` | about 1 a frame, in nearly every line | | `…_ValidateInst` | `7c9a6a83826cdfac` | under 1 a frame | | `…_ValidateInstInv` | `21f7ad7863620328` | under 1 a frame | What it looks like is #1516: trees and bushes along the road show only when you come near, stay while you drive off a little, and go again farther off. All four are of the shape the wave-wide form is already kept for in `emit/mod.rs`: groups of 64, with an LDS read and write in one lane-branch region (`VICTORY_WAVE_WHY`: "LDS in a group over 32, an LDS read and write in one lane-branch region, lane-constant mask, mask as data, v_mbcnt, v_readlane"). This adds their container digests to that list, next to `CS_CollisionRaytraced` and the volumetric programs. Nothing else changes, and `VICTORY_WAVE_WIDE=0` still turns it off. ## How it was tested - GPU and profile: RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, Windows 11 26300, driver 621.40. Series X, 2560x1440, with and without DLSS Quality, frame generation off; Series S with DLSS frame generation 3x. No ray tracing. - Offline: `victory translate --list --validate --pipelines` with `VICTORY_HOST_WAVE=32` over the title's folder, limited to the four hashes (`VICTORY_TRANSLATE_ONLY`). Before: all four "no wave32 lowering". After, with no switch set: all four emitted, validated by dxil.dll and made RTX compute pipelines (7 and 8 loop branches taken by each host wave together). - Before, in the game: the four hashes are in the log's "shader does not translate" lines, and the dispatches above are dropped. Trees and bushes are missing at a distance, as in #1516. - After, in the game: none of the four is refused any more. Trees and bushes are there at a distance and stay while you drive away. About 30 minutes of play over seven starts, with no device removal and no TDR. Those starts had two freezes and one stall while loading, none of them here: the two freezes were slot eviction's deadlock (#1557), and the stall was #846's held wait on a first start. - For shader changes, the wave sizes tested: 32 lanes only (the RTX). I have no 64-lane card to try it on. - `cargo test -p victory-shader` passed (348 passed, 8 ignored). Clippy reports nothing in the changed lines. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #1504 (all 34 refused wave64 programs made exact, the six tree culling programs among them), #1450 (a scoped LDS retry for kernels that #43's stricter analysis refused), #348 and #1006 (other wave64 forms).
nikitronick-crypto commented 2026-11-29 00:45:18 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nikitronick-crypto on 2026-11-29T00:45:18Z.


Confirmed on an RTX 3080 Ti 12 GB (driver 621.40, Windows 11 26300, Ryzen 5 7500F, 32 GB), 923e38c plus this change. Series X 2560x1440, DLSS Balanced, FSR 3 frame generation 2x.

  • Before: the four hashes were in the log's "shader does not translate" lines, and trees and bushes were missing at a distance (mangroves along the shore).
  • After: victory shaders went from 240 to 236 programs that do not translate (the "no wave32 lowering" group from 37 to 33), and none of the four is refused in the play log. Trees and bushes are back at a distance.
  • One session of 48 minutes, no crash and no device removal.
  • Draws went from about 4,100 to 6,100 a frame (medians, different areas, so not a matched comparison).

Tested by a user; analysis AI-assisted (Claude).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7248328458 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1571#issuecomment-7248328458). Originally posted by [nikitronick-crypto](https://github.com/nikitronick-crypto) on 2026-11-29T00:45:18Z. --- Confirmed on an RTX 3080 Ti 12 GB (driver 621.40, Windows 11 26300, Ryzen 5 7500F, 32 GB), 923e38c plus this change. Series X 2560x1440, DLSS Balanced, FSR 3 frame generation 2x. - Before: the four hashes were in the log's "shader does not translate" lines, and trees and bushes were missing at a distance (mangroves along the shore). - After: `victory shaders` went from 240 to 236 programs that do not translate (the "no wave32 lowering" group from 37 to 33), and none of the four is refused in the play log. Trees and bushes are back at a distance. - One session of 48 minutes, no crash and no device removal. - Draws went from about 4,100 to 6,100 a frame (medians, different areas, so not a matched comparison). Tested by a user; analysis AI-assisted (Claude).
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!1571
No description provided.