Shaders: lower scc_some directly and per host wave under with_local_waves_any #190
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/fxceless--victory-fork!190
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-190"
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?
@gdawid9407 on GitHub · 2026-11-24 22:22 UTC · original
gdawid9407:fix/wave64-local-any-scc-some→main· +70 −5 · 2 files · 1 commits · openProblem
scc_someinside a divergent branch (!all_lanes(b)), the initial pass stops with"a lane mask exchanged where not every lane runs"(e.g.compute f133e35efed2a48ain #75 and #89).emitthen retries withwith_local_waves_any(local && local_any), which takes every other mask-as-data and lane read per host wave, butLower::scc_someunconditionally rejectedself.localinstead ofself.local && !self.local_any.SOPreads ofReg::Sccinst.scc_some(without an interveningSccphi) hitVal::Missing(LANE_MASK)inLower::getinstead of lowering throughscc_some, and were not counted byreads_mask_as_data.Changes
Lower::scc_someunderself.local && self.local_any, returning the host wave'swaveAnyTruewithout cross-half LDS exchange (while still rejecting plainwith_local_wavesidiom checks).st.scc_somereads inLower::getand recognize direct and phi-joinedscc_someuses inreads_mask_as_data/console_lanes/crosses.scc_someinside a divergent branch on 64-lane and 32-lane hosts.@ryotdev on GitHub · 2026-11-25 05:42 UTC · original
I checked
be692ecagainst its parent4e17478on a 32-lane target. The tiled cascaded-shadow compute program mentioned in the PR still refuses in both builds. On the PR head, the final approximate retry now stops on a constant lane mask in a half-wave. Applying the literal-select lowering from #277 as well leaves that refusal in place. The exact wave-wide retry reports a thread group containing multiple console waves.Separately, I ran a handwritten 64-thread version of the direct SCC/select case through the normal emitter and read back every lane on an RTX 5070. I placed the one matching lane at 1 and then at 40 and varied the active prefix through 0, 1, 16, 32, 48, and 64 lanes. All 768 output dwords matched the console-wide expectation. WARP on this machine refused the test PSO. This check covers the direct read, and I have no gameplay or joined-SCC output result to report. AI-assisted.
@JRamos1993 on GitHub · 2026-11-25 06:46 UTC · original
Offline check: with this PR,
f133e35efed2a48astill stops with "a lane mask exchanged where not every lane runs". That holds at this headbe692ec(on its base4e17478) and merged onto currentmain310c6eb.Setup: RTX 5090 (32-lane waves), Windows 11.
VICTORY_TRANSLATE_ONLY=f133e35efed2a48a victory translate --validate --liston the retail shader pack, withVICTORY_HOST_WAVE=32, and also withVICTORY_HOST_MAX_WAVE=32, alone and together.f133e35efed2a48a4e17478(this PR's base)emit: a lane mask exchanged where not every lane runsbe692ecmain310c6ebmain+ this PRmainwithVICTORY_HOST_MAX_WAVE=32: 25,383 validated in both, nothing gained or lost.main310c6ebrun logs this shader with the same message.So the stop this PR removes may no longer be the first one this program hits. Or the batch path does not take the
with_local_waves_anyretry the way a run does. I have not traced which.AI use: Claude Code with Claude Opus 5.5 built the trees, ran them and wrote this. Nothing from the title is in it beyond the shader hash already named in this PR.
@JRamos1993 on GitHub · 2026-11-25 06:58 UTC · original
Follow-up: why
f133e35efed2a48adoesn't reach this PR's change.VICTORY_WAVE_WHY=1 VICTORY_HOST_WAVE=32onmain310c6eblists every formemittries for it, with a local tag on the two "exchanged" refusals to show which site fires. Its thread groups are 8×16, two console waves.mask_dword: "a lane mask exchanged where not every lane runs" (notscc_some)VICTORY_WAVE_WIDE=1)What this means for this PR:
mask_dword, notscc_some.local && local_anypath this PR opens stops first on a constant lane mask, before anyscc_some.What would get further: for this program, the any-mask half-wave form would need constant 64-bit masks taken per half (the host wave's 32 bits of the constant). After that there may be more stops; I didn't try it.
AI use: Claude Code with Claude Opus 5.5 ran the retries with a local diagnostic tag and wrote this. Nothing from the title is in it beyond the hash this PR names.
@JRamos1993 on GitHub · 2026-11-25 07:00 UTC · original
Also checked #277 (literal masks in half-waves), alone and merged with this PR on
310c6eb:f133e35efed2a48astill stops on "a constant lane mask in a half-wave" in both any-mask forms. #277's exception needs bothself.exchangeand literal low and high dwords. At least one of those doesn't hold for this program in that mode; I didn't check which. (AI use: Claude Code with Claude Opus 5.5 ran the builds and wrote this.)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.