Shaders: choose the wave64 deep-skips form per program #779

Open
Xeltax wants to merge 1 commit from upstream-pr/779 into main
Xeltax commented 2026-11-25 07:25:56 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Xeltax on 2026-11-25T07:25:56Z.


On a 32-lane host, the exact wave64 form "without skips, scalars followed" could only be switched on or off for every program at once (VICTORY_WAVE_DEEP_SKIPS). This switch sets it per program, using the hash the log names a shader by (prefixes are allowed, separated by commas or spaces, with or without #):

  • VICTORY_WAVE_DEEP_SKIPS_NOT=<hash>,... turns the form off for the listed programs;
  • VICTORY_WAVE_DEEP_SKIPS_ONLY=<hash>,... turns it off for every other program;
  • VICTORY_WAVE_DEEP_SKIPS=0 still turns it off for all of them.

VICTORY_WAVE_WHY lines now name the program: WAVE64-RETRY #<hash> ..., so you can find which programs end in which form with VICTORY_HOST_WAVE=32 VICTORY_WAVE_WHY=1 victory translate --list. On 4e17478, 22 programs ended in this form.

Defaults and cache key. With the switches unset, translations are the same as on main, and each key is build() alone, as on main. The lists are not part of translation_fingerprint. When a list changes a program's decision, that program's key is the build key mixed with the decision (program_key), so editing a list re-translates only those programs. The warm-up uses the same key.

Why. On an RTX 4080, keeping only the 14 CS_ShadowRenderTiled* programs out of this form gave the best cell picture; keeping all 22 out made the room darker (#62). #219 works on the cause; until it lands, the _NOT list is a per-program workaround and a bisecting tool. #695 adds the same kind of per-program list for the wave-wide form.

Tests

  • cargo test -p victory-shader --lib: 221 passed (new tests for the list parsing and the per-program decision).
  • cargo test -p victory-gpu --features diagnostics --lib: 145 passed (new tests for the key, and for the lists staying out of the fingerprint).
  • cargo xtask policy: ok.
  • cargo clippy -p victory-shader -p victory-gpu --all-targets -- -D warnings: the only failures are three items in files this PR doesn't touch (resource.rs placed_filler_twins, draw.rs:2387, indirect.rs depth_written).

AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:fxceless/victory-fork:issue:6599439937 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/779). Originally posted by [Xeltax](https://github.com/Xeltax) on 2026-11-25T07:25:56Z. --- On a 32-lane host, the exact wave64 form "without skips, scalars followed" could only be switched on or off for every program at once (`VICTORY_WAVE_DEEP_SKIPS`). This switch sets it per program, using the hash the log names a shader by (prefixes are allowed, separated by commas or spaces, with or without `#`): - `VICTORY_WAVE_DEEP_SKIPS_NOT=<hash>,...` turns the form off for the listed programs; - `VICTORY_WAVE_DEEP_SKIPS_ONLY=<hash>,...` turns it off for every other program; - `VICTORY_WAVE_DEEP_SKIPS=0` still turns it off for all of them. `VICTORY_WAVE_WHY` lines now name the program: `WAVE64-RETRY #<hash> ...`, so you can find which programs end in which form with `VICTORY_HOST_WAVE=32 VICTORY_WAVE_WHY=1 victory translate --list`. On `4e17478`, 22 programs ended in this form. **Defaults and cache key.** With the switches unset, translations are the same as on `main`, and each key is `build()` alone, as on `main`. The lists are not part of `translation_fingerprint`. When a list changes a program's decision, that program's key is the build key mixed with the decision (`program_key`), so editing a list re-translates only those programs. The warm-up uses the same key. **Why.** On an RTX 4080, keeping only the 14 `CS_ShadowRenderTiled*` programs out of this form gave the best cell picture; keeping all 22 out made the room darker (#62). #219 works on the cause; until it lands, the `_NOT` list is a per-program workaround and a bisecting tool. #695 adds the same kind of per-program list for the wave-wide form. **Tests** - `cargo test -p victory-shader --lib`: 221 passed (new tests for the list parsing and the per-program decision). - `cargo test -p victory-gpu --features diagnostics --lib`: 145 passed (new tests for the key, and for the lists staying out of the fingerprint). - `cargo xtask policy`: ok. - `cargo clippy -p victory-shader -p victory-gpu --all-targets -- -D warnings`: the only failures are three items in files this PR doesn't touch (`resource.rs` `placed_filler_twins`, `draw.rs:2387`, `indirect.rs` `depth_written`). AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/779:upstream-pr/779'
git switch 'upstream-pr/779'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/779'
git switch 'upstream-pr/779'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/779'
git switch 'upstream-pr/779'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/779'
git switch 'main'
git merge --squash 'upstream-pr/779'
git switch 'main'
git merge --ff-only 'upstream-pr/779'
git switch 'main'
git merge 'upstream-pr/779'
git push origin 'main'
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
fxceless/victory-fork!779
No description provided.