feat(shader): wave32 water tile slot allocation and scalar loop skips #326

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

@⁠wike1701 on GitHub · 2026-11-27 21:02 UTC · original
wike1701:feat/wave32-water-light → main · +255 −14 · 4 files · 1 commits · open

Summary

Ports Wave32 (NVIDIA) water lighting fixes from xceless/victory-fork (GPL-3.0, commits cd93552 and 299fba, building on xss3009's transmission tile allocation idea):

  1. Per-lane water tile slot allocation (emit/water_tile_slots.rs): rewrites water_shading:CS_TransmissionVolumetrics_GenerateTiles on 32-lane hosts so each lane takes its own slot via uffer_atomic_add 1 instead of letting host wave 1 overwrite host wave 0's tile slots (fixes the 16×16 dark patches on open water; disable with VICTORY_WATER_TILE_SLOTS=0). Also wired into pps/victory/src/translate.rs via emit::host_form.
  2. Scalar-test loop skips kept for wave-wide lowering (ir::without_skips(..., loops_kept)): keeps skips around loops controlled by scalar comparisons (s_cmp_* / s_bitcmp) when lowering wave-wide compute shaders (VICTORY_WAVE_LOOP_SKIPS=0 to disable), preventing empty-EXEC slice loops from spinning to the iteration limit.
  3. CS_TransmissionVolumetrics_VolumePortalsOnly wave-wide: enables wave-wide lowering for the volume-portals-only water transmission shader (10179ab7eda0dc3).

(Note: LDS init hoisting from 299fba is already submitted separately in #35, and thread-ticket group counters from 854f57f are already in main.)

Verification

  • cargo test -p victory-shader --lib -- water_tile_slots:: ir::tests:: — 12 passed, 0 failed
  • cargo check -p victory — ok (0 new warnings)
  • cargo xtask policy — 288 files ok
**@⁠wike1701** on GitHub · 2026-11-27 21:02 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/326) `wike1701:feat/wave32-water-light` → `main` · +255 −14 · 4 files · 1 commits · open ## Summary Ports Wave32 (NVIDIA) water lighting fixes from xceless/victory-fork (GPL-3.0, commits cd93552 and 299fba, building on xss3009's transmission tile allocation idea): 1. **Per-lane water tile slot allocation (emit/water_tile_slots.rs)**: rewrites water_shading:CS_TransmissionVolumetrics_GenerateTiles on 32-lane hosts so each lane takes its own slot via uffer_atomic_add 1 instead of letting host wave 1 overwrite host wave 0's tile slots (fixes the 16×16 dark patches on open water; disable with VICTORY_WATER_TILE_SLOTS=0). Also wired into pps/victory/src/translate.rs via emit::host_form. 2. **Scalar-test loop skips kept for wave-wide lowering (ir::without_skips(..., loops_kept))**: keeps skips around loops controlled by scalar comparisons (s_cmp_* / s_bitcmp) when lowering wave-wide compute shaders (VICTORY_WAVE_LOOP_SKIPS=0 to disable), preventing empty-EXEC slice loops from spinning to the iteration limit. 3. **CS_TransmissionVolumetrics_VolumePortalsOnly wave-wide**: enables wave-wide lowering for the volume-portals-only water transmission shader (10179ab7eda0dc3). *(Note: LDS init hoisting from 299fba is already submitted separately in #35, and thread-ticket group counters from 854f57f are already in main.)* ## Verification - cargo test -p victory-shader --lib -- water_tile_slots:: ir::tests:: — **12 passed, 0 failed** - cargo check -p victory — **ok** (0 new warnings) - cargo xtask policy — **288 files ok**
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 21:06:55 +00:00
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/326/head:github-bot/gh-326'
git switch 'github-bot/gh-326'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-326'
git switch 'github-bot/gh-326'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-326'
git switch 'github-bot/gh-326'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-326'
git switch 'main'
git merge --squash 'github-bot/gh-326'
git switch 'main'
git merge --ff-only 'github-bot/gh-326'
git switch 'main'
git merge 'github-bot/gh-326'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.