Preserve wave64 lane IDs in full-LDS local allocations on wave32 hosts #4778
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4778
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4777"
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?
@LogicGrove on GitHub · 2026-12-01 07:39 UTC · original
LogicGrove:fix/local-wave-lds-bounds-20261201→main· +424 −25 · 4 files · 1 commits · openWhat it changes
A compute shader can use the entire 32 KiB of group-shared memory and reserve output slots by having its first active lane add the wave total to an LDS counter. Splitting the guest wave64 into two host waves of 32 can preserve every output slot, but reserving additional LDS for wave exchange or a ticket puts this shader over the host limit.
This ports the local allocation analysis to current main. The scratch-free path requires the exact allocation classifier, a one-dimensional group of complete host waves and no paired meetings. It uses the existing LDS ordering analysis and preserves the high half of the guest lane number using the linear thread mapping. Guarded overwrites are fresh only for reads in the same block under the same predicate. An LDS atomic must address a wave-independent location and its active mask must imply a first-lane predicate.
How it was tested
mainat5fabb46and a separate build directory, three regressions failed. The classifier rejected the full-LDS allocation and guarded reuse, and lane-ID lowering hit the 32 KiB host limit. Two rejection tests passed and the GPU test was ignored by default.fd81b67, the fullvictory-shaderlibrary suite passed in debug (541 passed, 11 ignored). All sixlocal_ldstests passed in release with--include-ignoredon the RTX 2060, including the numeric GPU test.cargo test --locked -p victory-shader full_lds_local_allocations_and_lane_numbers_are_correct_on_nvidia -- --ignored --nocapture.Checked for overlap
5fabb46, #388, #822 and the entry-block lane fix in #865. Credits to fromrivertothesea (#388) and henriazz10 (#822) for the allocation analysis and original synthetic fixture. The overlap is substantial. This version adds geometry and exact-mode restrictions, verifies the LDS address and predicate, and exercises the upper half and guarded register reuse on current main.The change is confined to the shader translator and its tests. Reverting this commit restores the previous lowering. Native wave64 hardware and game performance were not measured.
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.