[PR #1400] [MERGED] rdna2spirv: guard native DPP FI=0 shuffle source (SHADER-DPP-ABSENT-SOURCE) #1432

Closed
opened 2026-11-26 20:21:14 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1400
Author: @Okachamie
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142

Base: main ← Head: fix/dpp-absent-source


📝 Commits (1)

  • 26fabdb rdna2spirv: guard native DPP FI=0 shuffle source

📊 Changes

3 files changed (+21 additions, -2 deletions)

View changed files

📝 docs/design.md (+1 -1)
📝 tests/semantic/test_dpp_eager_subgroup.py (+14 -0)
📝 tools/rdna2spirv.py (+6 -1)

📄 Description

Claimed in the coordination issue as: SHADER-DPP-ABSENT-SOURCE (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7147210154)

What and why

Native DPP FI=0 used the source-lane ballot only to mask the shuffled value, while OpGroupNonUniformShuffle still 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-emulate are unchanged.

Tested

  • The new synthetic regression failed before the fix with %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.py on all changed files: clean.

No game files or GPU were used. Shader-corpus translated/spirv-val counts were not run because no game corpus is available.

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on main at 3a0af1f15 and rebased cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • The translator rule is in the docs/design.md DPP contract row with its CPU-only confirmation and GPU limit.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1400 **Author:** [@Okachamie](https://github.com/Okachamie) **Created:** 11/25/2026 **Status:** ✅ Merged **Merged:** 11/25/2026 **Merged by:** [@aslan2142](https://github.com/aslan2142) **Base:** `main` ← **Head:** `fix/dpp-absent-source` --- ### 📝 Commits (1) - [`26fabdb`](https://github.com/ubiquitarianism/leonida/commit/26fabdbba8d271831596fd97915e3c1efce87c72) rdna2spirv: guard native DPP FI=0 shuffle source ### 📊 Changes **3 files changed** (+21 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/design.md` (+1 -1) 📝 `tests/semantic/test_dpp_eager_subgroup.py` (+14 -0) 📝 `tools/rdna2spirv.py` (+6 -1) </details> ### 📄 Description Claimed in the coordination issue as: SHADER-DPP-ABSENT-SOURCE (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7147210154) ### What and why Native DPP FI=0 used the source-lane ballot only to mask the shuffled value, while `OpGroupNonUniformShuffle` still 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-emulate` are unchanged. ### Tested - The new synthetic regression failed before the fix with `%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.py` on all changed files: clean. No game files or GPU were used. Shader-corpus translated/`spirv-val` counts were not run because no game corpus is available. GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on `main` at `3a0af1f15` and rebased cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] The translator rule is in the `docs/design.md` DPP contract row with its CPU-only confirmation and GPU limit. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:21:14 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1432
No description provided.