[PR #1729] [CLOSED] rdna2spirv: a v_interp_p2_f16 destination op_sel bit is ignored #1742

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1729
Author: @Undefined3301
Created: 11/25/2026
Status: ❌ Closed

Base: main ← Head: vinterp-p2-f16-op-sel


📝 Commits (1)

  • 4be07cb rdna2spirv: a v_interp_p2_f16 destination op_sel bit is ignored

📊 Changes

3 files changed (+25 additions, -1 deletions)

View changed files

📝 docs/design.md (+1 -0)
📝 tests/semantic/test_printed_encoding.py (+17 -0)
📝 tools/rdna2spirv.py (+7 -1)

📄 Description

What and why

same_encoding refused a v_interp_p2_f16 whose destination op_sel bit (word 0 bit 14) is set in the blob, with "the blob holds ..., LLVM printed ...". The game's compiler stores the bit; llvm-mc re-encodes its 0 default. The op keeps the high half of vdst (measured on gfx1036 with tools/hw_oracle: a preset 0xdead high half survived every case), so the bit changes nothing; the high bit in byte 5 selects the attribute half and the translator reads it. The rule accepts that one bit and nothing else.

On a 1.0.2.1 copy this translated 194 of the 1,923 pipeline-library graphics programs missing at c7e82e26e (spirv/fspx_gfx 16,914 -> 17,108). The rest still stop at a fall-through into undecodable words or have no container.

Tests

  • python -m unittest discover -s tests/semantic -p test_printed_encoding.py -> 9 tests, OK.
  • python -I scripts/run_semantic_tests.py tests/semantic -> 487 files, 6,280 tests, 0 files failed (on c7e82e26e + this change).
  • The new case translates a hand-written listing with the bit and checks that v_interp_p1_f16 still refuses it. The contract row is in docs/design.md ("v_interp_p2_f16 destination op_sel").

Claimed in the coordination issue as SHADER-VINTERP-P2-F16-OP-SEL: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7158945516

AI-assisted (Claude Code).


🔄 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/1729 **Author:** [@Undefined3301](https://github.com/Undefined3301) **Created:** 11/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `vinterp-p2-f16-op-sel` --- ### 📝 Commits (1) - [`4be07cb`](https://github.com/ubiquitarianism/leonida/commit/4be07cb1cdf3127b76fea5761dada62cb79ec59b) rdna2spirv: a v_interp_p2_f16 destination op_sel bit is ignored ### 📊 Changes **3 files changed** (+25 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/design.md` (+1 -0) 📝 `tests/semantic/test_printed_encoding.py` (+17 -0) 📝 `tools/rdna2spirv.py` (+7 -1) </details> ### 📄 Description ### What and why `same_encoding` refused a `v_interp_p2_f16` whose destination `op_sel` bit (word 0 bit 14) is set in the blob, with "the blob holds ..., LLVM printed ...". The game's compiler stores the bit; llvm-mc re-encodes its 0 default. The op keeps the high half of `vdst` (measured on gfx1036 with `tools/hw_oracle`: a preset `0xdead` high half survived every case), so the bit changes nothing; the `high` bit in byte 5 selects the attribute half and the translator reads it. The rule accepts that one bit and nothing else. On a 1.0.2.1 copy this translated 194 of the 1,923 pipeline-library graphics programs missing at `c7e82e26e` (`spirv/fspx_gfx` 16,914 -> 17,108). The rest still stop at a fall-through into undecodable words or have no container. ### Tests - `python -m unittest discover -s tests/semantic -p test_printed_encoding.py` -> 9 tests, OK. - `python -I scripts/run_semantic_tests.py tests/semantic` -> 487 files, 6,280 tests, 0 files failed (on `c7e82e26e` + this change). - The new case translates a hand-written listing with the bit and checks that `v_interp_p1_f16` still refuses it. The contract row is in `docs/design.md` ("`v_interp_p2_f16` destination op_sel"). Claimed in the coordination issue as `SHADER-VINTERP-P2-F16-OP-SEL`: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7158945516 AI-assisted (Claude Code). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 21:18:48 +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#1742
No description provided.