[PR #744] [CLOSED] rdna2spirv: decode scalar, image and buffer tuples that run into vcc from blob (OLD-10062) #782

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

📋 Pull Request Information

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

Base: main ← Head: restore/old-10062-vcc-tuples


📝 Commits (1)

  • a0c9e95 fix: rdna2spirv decodes scalar, image and buffer tuples that run into vcc from the blob when llvm-mc rejects them

📊 Changes

3 files changed (+190 additions, -3 deletions)

View changed files

📝 docs/shader_library.md (+5 -3)
➕ tests/semantic/test_vcc_tuple_fallback.py (+149 -0)
📝 tools/rdna2spirv.py (+36 -0)

📄 Description

### Summary
Restores and updates work from draft PR #327 (old-pr/10062 / item OLD-10062).
Original commit by @tedin7 (063f14dcd9).

llvm-mc skips the first word of s_buffer_load_dwordx8 into s[100:107], an image resource in s[100:107] or a buffer resource in s[104:107] and leaves the second word as junk, so translate() refused those shaders ("reachable instruction with normalized encoding" or "fall-through into undecodable words") or translated them without the load.

restore_vcc_tuples reads the uncovered words of the code range with rdna2_decode and keeps only instructions whose operands hold a VCCTuple list, the form the translator already takes. Other undecodable words remain unchanged and properly rejected.

Verification

  • python -I scripts/check_no_game_data.py tools/rdna2spirv.py tests/semantic/test_vcc_tuple_fallback.py docs/shader_library.md -> Clean (no game data)
  • python -m unittest discover -s tests/semantic -p test_vcc_tuple_fallback.py -> 4/4 PASS in 0.22s
  • 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/744 **Author:** [@abnalstlll-byte](https://github.com/abnalstlll-byte) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `restore/old-10062-vcc-tuples` --- ### 📝 Commits (1) - [`a0c9e95`](https://github.com/ubiquitarianism/leonida/commit/a0c9e956db58e6b02547e339351563c495d2ac50) fix: rdna2spirv decodes scalar, image and buffer tuples that run into vcc from the blob when llvm-mc rejects them ### 📊 Changes **3 files changed** (+190 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/shader_library.md` (+5 -3) ➕ `tests/semantic/test_vcc_tuple_fallback.py` (+149 -0) 📝 `tools/rdna2spirv.py` (+36 -0) </details> ### 📄 Description ### Summary Restores and updates work from draft PR #327 (`old-pr/10062` / item `OLD-10062`). Original commit by @tedin7 (`063f14dcd9`). `llvm-mc` skips the first word of `s_buffer_load_dwordx8` into `s[100:107]`, an image resource in `s[100:107]` or a buffer resource in `s[104:107]` and leaves the second word as junk, so `translate()` refused those shaders ("reachable instruction with normalized encoding" or "fall-through into undecodable words") or translated them without the load. `restore_vcc_tuples` reads the uncovered words of the code range with `rdna2_decode` and keeps only instructions whose operands hold a `VCCTuple` list, the form the translator already takes. Other undecodable words remain unchanged and properly rejected. ### Verification - `python -I scripts/check_no_game_data.py tools/rdna2spirv.py tests/semantic/test_vcc_tuple_fallback.py docs/shader_library.md` -> Clean (no game data) - `python -m unittest discover -s tests/semantic -p test_vcc_tuple_fallback.py` -> 4/4 PASS in 0.22s - 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:01 +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#782
No description provided.