Shaders: hoist constant LDS accumulator initialisations behind an entry barrier #35
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/35"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by wike1701 on 2026-11-27T11:58:38Z.
Port of \xceless/victory-fork\ commit \918163\ (GPL-3.0).
Problem
Tile compute shaders (including the water tile min/max shaders) initialize LDS accumulator dwords from thread 0 after per-pixel early returns, followed by group-wide \ds_min_u32\ / \ds_max_u32\ atomics. When thread 0 takes an early return, the remaining threads accumulate against uninitialized LDS memory, producing flickering dark patches in water tiles.
Fix
Verification
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by jptorres96 on 2026-11-27T16:15:31Z.
Independent run on RTX 4080 SUPER 16 GB (Ada, 32-lane waves), driver 621.01, Ryzen 5 5600X, Windows build 26300, toolchain 1.98.1, DXIL validator from DXC 1.9.2609.5,
VICTORY_REQUIRE_HW_GPU=1. Head759f05c(on its own base959dcaf; GitHub reports a conflict with currentmain).accumulator_inits_are_hoisted_to_the_start: passedcargo clippy -p victory-shader --all-targets -- -D warnings: cleancargo test -p victory-shader --lib -- --test-threads=1: 288 passed, 0 failed, 4 ignoredNo game dump here, so I could not look at the water tiles themselves.