rdna2spirv: guard native DPP FI=0 shuffle source (SHADER-DPP-ABSENT-SOURCE) #1400
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!1400
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1400/head"
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?
@Okachamie on GitHub · 2026-11-24 23:28 UTC · original
Okachamie:fix/dpp-absent-source→main· +21 −2 · 3 files · 1 commits · merged 2026-11-25 02:37 UTCClaimed in the coordination issue as: SHADER-DPP-ABSENT-SOURCE (#14)
What and why
Native DPP FI=0 used the source-lane ballot only to mask the shuffled value, while
OpGroupNonUniformShufflestill received the raw source index. In a partial subgroup, an active lane can select an absent lane; that shuffle is undefined even when its result is masked afterwards.The FI=0 path now redirects an absent or EXEC-off source to the current subgroup lane before the shuffle. FI=1 and
--wave64-emulateare unchanged.Tested
%t31 not found in set()and passes afterward.python -I tests/semantic/test_dpp_eager_subgroup.py -v: 8 tests, OK.python -I scripts/run_semantic_tests.py tests/semantic -j 12 --timeout 300: 475 files, 6221 tests, 0 files failed in 43 s.python -I tests/test_docs_design_rows.py: 5 tests, OK.python -I tests/test_design_contract_rows.py: 5 tests, OK.python -m compileall -q make_game.py tools tests: exit 0.git diff --check: clean.python -I scripts/check_no_game_data.pyon all changed files: clean.No game files or GPU were used. Shader-corpus translated/
spirv-valcounts were not run because no game corpus is available.GPUs tested: n/a
AI-assisted: yes
Checklist
mainat3a0af1f15and rebased cleanly.docs/design.mdDPP contract row with its CPU-only confirmation and GPU limit.@GeorgiyDemo on GitHub · 2026-11-24 23:48 UTC · original
Tested
26fabdbbaon Apple M5 Pro (16-core GPU), macOS 26.7.3 (25G342), againstmain364ab4eab(translator-only PR; binaries from the build at66d4f5aa3, GPU test C++ unchanged in between):python3 -I tests/semantic/test_dpp_eager_subgroup.py: 8/8 OK at this head. The same file copied ontomain's tree fails 1 of 8 withAssertionError: '%t31' not found in set()— matches the regression described in the PR.--filter cs_dpp: 9/10 passed, 1 skipped on both MoltenVK 1.4.2 and KosmicKrisp (Mesa 26.3.1). The skip iscs_dpp_w64("no 64-wide compute subgroup on this device").cs_dppset withmain's translator gives an identical 9/10 plus the same skip — the existing fixtures do not distinguish the two revisions, and the partial-subgroup absent-lane case is covered only by the new semantic test on this device.AI-assisted; synthetic fixtures only, no game data.
@Okachamie on GitHub · 2026-11-25 02:27 UTC · original
Linux verification at
26fabdbbaon CachyOS 7.3.5-2-cachyos, RTX 5090 Laptop GPU, NVIDIA 620.73.04. The focusedscripts/run_gpu_tests.py --filter cs_dpp --require-passrun passed 9/10 natively (native wave64 skipped) and 10/10 withLEONIDA_W64_EMULATE=1. All 10 shaders passedspirv-valin both modes.A synthetic seven-invocation workgroup returned the expected GPU readback on both the PR and parent on this driver. The CPU wave-interpreter trace distinguished them: over eight partial-wave cases, the parent attempted an absent-lane shuffle in all eight and the PR head attempted none, with expected outputs preserved. Game-free and AI-assisted.
@aslan2142 on GitHub · 2026-11-25 02:37 UTC · original
Merged. Thanks, and thanks to GeorgiyDemo for confirming it fails on
main.SHADER-DPP-ABSENT-SOURCE, valid.ds_swizzle/ds_bpermuterule already inmain. As the row says, it is confirmed on the CPU, not yet on a GPU.main; all 8 pass with the change.--wave64-emulate.mainf6f56dfde+26fabdbba: the semantic suite passes (485 files, 6,270 tests, 0 files failed); the 14 docs and writer tests pass;check_no_game_data.pyis clean on the 3 changed files.AI-assisted (Claude Code, Claude Opus 5.5).