Shaders: VICTORY_WAVE_WIDE_ONLY turns the wave-wide form on for named programs (the two water volumetrics computes on NVIDIA) #695
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!695
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-695"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@FrancescoGelosoEterea on GitHub · 2026-11-25 04:37 UTC · original
FrancescoGelosoEterea:wave-wide-only→main· +46 −3 · 3 files · 1 commits · openWhy
On current
main(310c6eb), twowater_shadingcompute programs translate but stay atWaveSize(64), so a 32-lane host refuses them:They are
CS_TransmissionVolumetrics_TiledandCS_TransmissionVolumetrics_Tiled_LocalLights. Their thread groups are one console wave (64 threads).VICTORY_WAVE_WHYgivesLDS in a group over 32, an LDS read and write in one lane-branch region, v_readlane. The forms tried after that stop at "a first-lane read where not every lane runs" and "a wave reduction where not every lane runs".The wave-wide form (
widen) handles exactly this case: it takes the lane branches around that code with the whole wave. With it, the two programs lower toWaveSize(32), with 4 and 7 branches taken wave-wide. Sincee9765a7, that form is off unlessVICTORY_WAVE_WIDE=1, because it left the particle light-atlas programs standing on the card. So it can only be turned on for every program at once.What
VICTORY_WAVE_WIDE_ONLY=<hash prefix>,...turns the wave-wide form on only for the containers it names. A container is named by the hash the log uses: the first 16 hex digits of the container's BLAKE3.emit::wave_wide_only(hash)reads the list.emit::with_wave_wide(on, f)sets a thread-local flag around one translation, which the retry ladder reads next toVICTORY_WAVE_WIDE.shader_cache::host_shader) andvictory translateuse it.VICTORY_WAVE_WIDE_ONLYis part of the shader cache key, asVICTORY_WAVE_WIDEis.Without the variable nothing changes.
Tested
RTX 5070 Ti, driver 621.24, Ryzen 7 9800X3D, Windows 11. Own 1.0.2.1 copy.
translate --pipelines --validate --listonshaders.rpf,VICTORY_HOST_MAX_WAVE=32, this branch):pipeline: E_INVALIDARG;VICTORY_WAVE_WIDE_ONLY=5dc3b259,6f225b64: bothpipeline created, and both validate.310c6ebplus this change and other open PRs (#51, #158, #368, #522, #592 among them), withVICTORY_WAVE_WIDE_ONLY=5dc3b259,6f225b64.first bindat frame 1702). No dispatch of theirs is dropped.02384a60…and6b82bc7d…. Their thread groups are 128 and 1024 threads (several console waves), where the wave-wide form does not apply.cargo test -p victory-shader --lib: 214 passed.cargo test -p victory-gpu --lib: 118 passed.cargo clippy -p victory-shader --all-targets -- -D warnings: clean.Not tested
🤖 Generated with Claude Code
@VibeClauding on GitHub · 2026-11-25 12:10 UTC · original
Note for the two water volumetrics this PR puts in
VICTORY_WAVE_WIDE_ONLY: on an RTX 3070, Series S, running them in the wide form washed the view out of the cell window to near white in every frame from 2400 on. The same build without them in the list stayed clear (A/B, runs 82 and 84, numbers on #823). The other two programs (2cc4c197ee29e291,369cbe906ea72764) showed no such effect.AI-assisted (Claude Code).
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.