[PR #739] [CLOSED] rdna2spirv: write out a carry-out subtract of a register from itself (AMD Windows driver crash) #776

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/739
Author: @abnalstlll-byte
Created: 11/24/2026
Status: ❌ Closed

Base: main ← Head: restore/old-10058-sub-co-same-operand


📝 Commits (1)

  • b7de4d8 rdna2spirv: write out a carry-out subtract of a register from itself (AMD Windows driver crash)

📊 Changes

3 files changed (+216 additions, -11 deletions)

View changed files

📝 docs/design.md (+1 -0)
➕ tests/semantic/test_sub_co_same_operand.py (+194 -0)
📝 tools/rdna2spirv.py (+21 -11)

📄 Description

### Summary
Restores and updates work from draft PR #324 (old-pr/10058 / item OLD-10058).
Original commit by @wail-arch (183d63f55).

v_sub_co_u32 / v_subrev_co_u32 and their _ci_ forms with the same operand twice were translated to OpISubBorrow %x %x. AMD's Windows driver dies with an access violation (0xC0000005 in amdvlk64.dll, 32.0.21037.1004 and 32.0.21045.29003, gfx1036) creating a native wave64 compute pipeline in which that borrow predicates the value operand of an OpGroupNonUniformShuffle.

x - x is 0 with no borrow, so these forms now emit D = 0 - carry in and borrow out = carry in, with no OpISubBorrow. Values are unchanged; other operand pairs are translated as before.

Verification

  • python -I scripts/check_no_game_data.py tools/rdna2spirv.py tests/semantic/test_sub_co_same_operand.py docs/design.md -> Clean (no game data)
  • python -m unittest discover -s tests/semantic -p test_sub_co_same_operand.py -> 6/6 PASS in 2.07s
  • Clean rebase onto latest ubi/main (21625bca8).

AI-assisted verification and rebase by Antigravity (Autonomous Direct Mode).


🔄 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/739 **Author:** [@abnalstlll-byte](https://github.com/abnalstlll-byte) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `restore/old-10058-sub-co-same-operand` --- ### 📝 Commits (1) - [`b7de4d8`](https://github.com/ubiquitarianism/leonida/commit/b7de4d80207b13f3c6589b996608a9d608ecd221) rdna2spirv: write out a carry-out subtract of a register from itself (AMD Windows driver crash) ### 📊 Changes **3 files changed** (+216 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `docs/design.md` (+1 -0) ➕ `tests/semantic/test_sub_co_same_operand.py` (+194 -0) 📝 `tools/rdna2spirv.py` (+21 -11) </details> ### 📄 Description ### Summary Restores and updates work from draft PR #324 (`old-pr/10058` / item `OLD-10058`). Original commit by @wail-arch (`183d63f55`). `v_sub_co_u32` / `v_subrev_co_u32` and their `_ci_` forms with the same operand twice were translated to `OpISubBorrow %x %x`. AMD's Windows driver dies with an access violation (`0xC0000005` in `amdvlk64.dll`, 32.0.21037.1004 and 32.0.21045.29003, gfx1036) creating a native wave64 compute pipeline in which that borrow predicates the value operand of an `OpGroupNonUniformShuffle`. `x - x` is 0 with no borrow, so these forms now emit `D = 0 - carry in` and `borrow out = carry in`, with no `OpISubBorrow`. Values are unchanged; other operand pairs are translated as before. ### Verification - `python -I scripts/check_no_game_data.py tools/rdna2spirv.py tests/semantic/test_sub_co_same_operand.py docs/design.md` -> Clean (no game data) - `python -m unittest discover -s tests/semantic -p test_sub_co_same_operand.py` -> 6/6 PASS in 2.07s - Clean rebase onto latest `ubi/main` (`21625bca8`). AI-assisted verification and rebase by Antigravity (Autonomous Direct Mode). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:19:00 +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#776
No description provided.