Repository navigation
Shaders: VICTORY_WAVE_WIDE_ONLY turns the wave-wide form on for named programs (the two water volumetrics computes on NVIDIA) - #695
Conversation
…amed containers alone Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Note for the two water volumetrics this PR puts in AI-assisted (Claude Code). |
|
I validated the hash-selected path on Windows with an RTX 4070 12 GB and a Cool Fox The selector was limited to the full 16-digit submerged shader hash. The two tiled transmission shaders discussed above were excluded from the selector. These results cover translation and creation. The mission run is a separate check. |
Adapt fxceless/victory-fork#695 and #702 and avatarmanz/VIctory-7900XTX#82 to Cool Fox. Preserve the existing defaults and include the shader selector in cache keys.
Adapt fxceless/victory-fork#695 and #702 and avatarmanz/VIctory-7900XTX#82 to Cool Fox. Preserve the existing defaults and include the shader selector in cache keys.
Adapt fxceless/victory-fork#695 and #702 and avatarmanz/VIctory-7900XTX#82 to Cool Fox. Preserve the existing defaults and include the shader selector in cache keys. (cherry picked from commit 41890e4)
Why
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 (GPU: no blending on integer render targets in host pipelines (port of upstream #806) #51, wave64: halve programs whose every LDS access names only its own lane's words #158, Certify Wave32 LDS synchronization for visibility dispatch #368, Fill table constant buffers that flights write on the card #522, Shaders: a lane-branch region that only raises an LDS flag runs as two host waves (one more wave64 compute on NVIDIA) #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