Shaders: isolate cross-half LDS storage at each Wave32 exchange site #246
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/trustno1-coder--VIctory-NVIDIA!246
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-246"
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?
@Barbital11111 on GitHub · 2026-11-27 20:05 UTC · original
Barbital11111:fix/wave32-half-exchange-slots→main· +112 −13 · 4 files · 1 commits · openWhat
On an RTX 5090 D v2, an earlier build based on
d12eb1b2showed hard-edged 16×16 black tiles on outdoor surfaces.CS_DepthProcessingHBO(2f03a2df10503cef) wrote an invalid0xffclassification byte. The downstreamCS_ShadowTileClassify(9991e29feaa26e3e) tests bit 1 and can skip the tile when its exception condition is inactive, leaving the cleared shadow mask at zero. The full indirect dispatch path was not traced for every visible block.When a logical wave64 runs as two host wave32s, the group-barrier path gives successive exchanges the same LDS words. In the isolated HBO dispatch, the OR reduction read the wrong upper-half value. Changing the final image store from float to integer left all 14,400 classifications unchanged, including the 32 bad tiles.
Change
Allocate group-shared storage per static exchange site and per logical wave: one dword for a lane broadcast, two for a pair of partial results. This covers ballots, reductions and prefix sums through the common exchange path. Loop iterations still reuse their own site. Sites that would exceed the 32 KiB group budget use the existing scratch pair. The separate counter-based, double-buffered pair-meeting path keeps its existing ordering. After dead-code elimination, remove unreferenced group-shared globals and remap the surviving references, as the optimizer already does for constant tables.
Evidence on the earlier builds
d12eb1b2-based build, the outdoor blocks were substantially reduced. A few remained.Verification on
0cef07e90cef07e9d7.Related work
#43 analyzes aliasing between the guest's LDS accesses. #104 and #118 constrain out-of-bounds guest LDS accesses. This change isolates the translator's own scratch for valid exchanges. #42 changes shared-memory optimization and barrier deduplication; the emitted-address regression is worth rerunning if both changes land. #108 fixes the choice of mask dword for upper-half lanes, a separate source of incorrect values.
Prepared with Claude Code (coordination) and OpenAI Codex (implementation).
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.