[PR #1743] [CLOSED] rdna2spirv: support op_sel destination high half on v_interp_p2_f16 (SHADER-INTERP-P2-F16-OPSEL) #1758

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

📋 Pull Request Information

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

Base: main ← Head: feat/shader-interp-p2-f16-opsel


📝 Commits (1)

  • 6e55c40 rdna2spirv: support op_sel destination high half on v_interp_p2_f16 (SHADER-INTERP-P2-F16-OPSEL)

📊 Changes

2 files changed (+14 additions, -4 deletions)

View changed files

📝 tests/semantic/test_interp_f16_high.py (+10 -0)
📝 tools/rdna2spirv.py (+4 -4)

📄 Description

Claimed in Issue #14: claiming: SHADER-INTERP-P2-F16-OPSEL (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7142482665).

Summary

v_interp_p2_f16 in VOP3 form supports the op_sel destination bit (bit 14 of dword0 / op_sel:[..., 1]), which selects whether the 16-bit interpolated float is written to the low half (dhi=0, keeping high half) or high half (dhi=1, keeping low half) of the destination VGPR.

Previously tools/rdna2spirv.py:11479 hardcoded self.write_lo16, discarding the high half destination selection.

  • Route destination half selection via _, dhi = self.opsel_bits(mods, 3) and self.write_half16(a[0], ..., dhi).
  • When dhi=0 (default or no modifier), behavior is identical (write_lo16, keeping preset high half).
  • When dhi=1, write_half16 writes the 16-bit float into bits 31..16 while keeping bits 15..0 of vdst.

Verification

  • python -m unittest discover -s tests/semantic -p test_interp_f16_high.py: 6/6 tests PASS in 0.095s (including new test_p2_f16_destination_high_half_opsel).
  • python -m unittest discover -s tests/semantic -p test_interp_f16.py: 1/1 test PASS.
  • Clean-room check: python -I scripts/check_no_game_data.py tools/rdna2spirv.py tests/semantic/test_interp_f16_high.py -> 0 violations.
  • Merges cleanly onto latest main (bcaa13dad).

AI-assisted (Gemini 3.8 Flash High).


🔄 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/1743 **Author:** [@abnalstlll-byte](https://github.com/abnalstlll-byte) **Created:** 11/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/shader-interp-p2-f16-opsel` --- ### 📝 Commits (1) - [`6e55c40`](https://github.com/ubiquitarianism/leonida/commit/6e55c402a579d49479c54e73fa7040f851bb3f7d) rdna2spirv: support op_sel destination high half on v_interp_p2_f16 (SHADER-INTERP-P2-F16-OPSEL) ### 📊 Changes **2 files changed** (+14 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `tests/semantic/test_interp_f16_high.py` (+10 -0) 📝 `tools/rdna2spirv.py` (+4 -4) </details> ### 📄 Description Claimed in Issue #14: `claiming: SHADER-INTERP-P2-F16-OPSEL` (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7142482665). ### Summary `v_interp_p2_f16` in VOP3 form supports the `op_sel` destination bit (bit 14 of dword0 / `op_sel:[..., 1]`), which selects whether the 16-bit interpolated float is written to the low half (`dhi=0`, keeping high half) or high half (`dhi=1`, keeping low half) of the destination VGPR. Previously `tools/rdna2spirv.py:11479` hardcoded `self.write_lo16`, discarding the high half destination selection. - Route destination half selection via `_, dhi = self.opsel_bits(mods, 3)` and `self.write_half16(a[0], ..., dhi)`. - When `dhi=0` (default or no modifier), behavior is identical (`write_lo16`, keeping preset high half). - When `dhi=1`, `write_half16` writes the 16-bit float into bits 31..16 while keeping bits 15..0 of `vdst`. ### Verification - `python -m unittest discover -s tests/semantic -p test_interp_f16_high.py`: 6/6 tests PASS in 0.095s (including new `test_p2_f16_destination_high_half_opsel`). - `python -m unittest discover -s tests/semantic -p test_interp_f16.py`: 1/1 test PASS. - Clean-room check: `python -I scripts/check_no_game_data.py tools/rdna2spirv.py tests/semantic/test_interp_f16_high.py` -> 0 violations. - Merges cleanly onto latest `main` (`bcaa13dad`). AI-assisted (Gemini 3.8 Flash High). --- <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:51 +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#1758
No description provided.