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

Manually merged
github merged 1 commit from github-bot/gh-1571 into gh-pr/1571/base 2026-11-29 00:27:57 +00:00 AGit
Owner

@⁠Amar-D3V on GitHub · 2026-11-28 21:51 UTC · original
Amar-D3V:fix/tree-culling-wave-wide → main · +12 −0 · 1 files · 1 commits · merged 2026-11-29 00:24 UTC

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).
**@⁠Amar-D3V** on GitHub · 2026-11-28 21:51 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1571) `Amar-D3V:fix/tree-culling-wave-wide` → `main` · +12 −0 · 1 files · 1 commits · merged 2026-11-29 00:24 UTC 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).
On 32-lane hosts the four programs of the trees' instance culling
(`InstanceCulling:CS_Tree_BatchCull`, `_ImposterOnly`, `_ValidateInst`,
`_ValidateInstInv`) were refused ("no wave32 lowering for this wave64
program"), so their dispatches were dropped: trees and bushes showed only up
close, stayed while one drove off a little, and went again farther off
(#1516). They are of the shape the wave-wide form is kept for (groups of 64,
an LDS read and write in one lane-branch region); with it they translate,
validate and make RTX pipelines, and they are named with the other programs
that get it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 21:54:14 +00:00
github-bot referenced this pull request from a commit 2026-11-29 00:27:22 +00:00
github-bot changed target branch from main to gh-pr/1571/base 2026-11-29 00:27:30 +00:00
github manually merged commit 24556e2b57 into gh-pr/1571/base 2026-11-29 00:27:31 +00:00
Author
Owner

@⁠nikitronick-crypto on GitHub · 2026-11-29 00:45 UTC · original

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).

**@⁠nikitronick-crypto** on GitHub · 2026-11-29 00:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1571#issuecomment-7248328458) 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).
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!1571
No description provided.