Shaders: LDS bounds and looped LDS atomics as the console does them (cloud tile sort, port of foxhound 9f8838b) #104
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!104
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-104"
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?
@ballsimulation on GitHub · 2026-11-27 18:09 UTC · original
ballsimulation:port/foxhound-lds-bounds→main· +130 −12 · 2 files · 1 commits · openPort of the shader half of foxhound 9f8838b ("cloud tile sort fix"). It was not in this tree or in any open PR. Both changes concern
CS_SortRayTiles, the cloud pass's sort of its ray tiles (256 threads a group), on 32-lane hosts:VICTORY_LDS_BOUNDS=0turns it off): outside a program's own shared memory, reads give 0 and writes are dropped, as on the console. Without this, the host's group-shared memory past the program's dwords is undefined. In the sort, 31 of the 32 groups dispatched clear and read up to 32 KiB past their 2.5 KiB.VICTORY_LDS_LOOP_ATOMICS=0turns it off): LDS atomics in a loop with nothing but atomics leading in get no meeting of the host waves. A host wave that takes fewer rounds otherwise waits at the barrier behind the loop while the others wait inside it. The first then reads counts the others have not written yet, and tiles drop out of the sorted list. foxhound saw 971 of 1,068 tiles kept, and a tile out of the list shows as an 8x4 square of clear sky in a cloud.The violet-probe filter from the same commit is already in this tree (
826ba15). The rest of that commit (launcher, samplers, bcpack) is left out; static sampler order is #69.Checked (RTX 4070, driver 610.74): applies on current
mainwith one hunk placed by hand (lds_bounds()besideneeds_every_lane);cargo test -p victory-shaderandcargo clippy -p victory-shader --all-targets -- -D warningspass; played in a build with it for about 30 minutes with no device loss.Not checked by me: the clouds themselves. foxhound's evidence is captures cloud3/cloud4 on an RTX 4070 SUPER. A daytime look at the sky after a camera cut, with and without it, would settle it.
🤖 Generated with Claude Code
@HugoW5 on GitHub · 2026-11-27 19:08 UTC · original · approved these changes
@wasonidas on GitHub · 2026-11-27 19:22 UTC · original
A measurement that may help, since the description says the clouds themselves were not checked. We ran our own port of the same foxhound commit (9f8838b) on an RTX 5080 (driver 621.24, 32-lane waves): Series X profile, 2560x1440, DLSS Quality, no frame generation, diagnostics build, a 300 s unattended run outdoors (the prologue, then the boat ride), its captures reviewed by eye against a run of the build before.
Two differences from this PR to keep in mind:
VICTORY_LDS_BOUNDSis off unless asked for (it changes 480 programs on this profile), so the figures above say nothing about the bounds half, which this PR turns on by default. With bounds off, the change reachedCS_SortRayTilesalone, as the description says.VICTORY_LDS_LOOP_ATOMICSandVICTORY_LDS_BOUNDSto the switches listed inbuild()incrates/victory-gpu/src/shader_cache.rs(whereVICTORY_THREAD_TICKETis). As far as I can see this PR does not touch that file, so=0on a filled shader cache would still be served the translations made with the switch on. Worth a look before anyone does the with/without comparison on one cache folder.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.