[PR #426] rdna2spirv: accept VOP3 clamp no-op on scalar 16-bit mul_lo/max/min/shifts #476

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/426
Author: @tahffo68hk-hash
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: fix/shader-int16-clamp-noop


📝 Commits (1)

  • a203bc2 rdna2spirv: accept VOP3 clamp no-op on scalar 16-bit mul_lo/max/min/shifts

📊 Changes

3 files changed (+31 additions, -7 deletions)

View changed files

📝 docs/design.md (+1 -1)
📝 tests/semantic/test_alu_u16_clamp.py (+22 -0)
📝 tools/rdna2spirv.py (+8 -6)

📄 Description

Summary

(AI-assisted) Fixes SHADER-INT16-CLAMP-NOOP: ools/rdna2spirv.py previously rejected the VOP3 clamp modifier with Unsupported on the eight scalar 16-bit integer instructions _mul_lo_u16, _max_u16, _min_u16, _max_i16, _min_i16, _lshlrev_b16, _lshrrev_b16, and _ashrrev_i16.

Native RDNA2 hardware measurement (gfx1036) shows that all eight instructions accept the VOP3 clamp bit and treat it as a hardware no-op (for example, _mul_lo_u16 0xffff, 0xffff clamp wraps modulo 2^16 to


🔄 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/426 **Author:** [@tahffo68hk-hash](https://github.com/tahffo68hk-hash) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/shader-int16-clamp-noop` --- ### 📝 Commits (1) - [`a203bc2`](https://github.com/ubiquitarianism/leonida/commit/a203bc2680044705f8566b46a807d57effe4c50a) rdna2spirv: accept VOP3 clamp no-op on scalar 16-bit mul_lo/max/min/shifts ### 📊 Changes **3 files changed** (+31 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `docs/design.md` (+1 -1) 📝 `tests/semantic/test_alu_u16_clamp.py` (+22 -0) 📝 `tools/rdna2spirv.py` (+8 -6) </details> ### 📄 Description ### Summary (AI-assisted) Fixes SHADER-INT16-CLAMP-NOOP: ools/rdna2spirv.py previously rejected the VOP3 clamp modifier with Unsupported on the eight scalar 16-bit integer instructions _mul_lo_u16, _max_u16, _min_u16, _max_i16, _min_i16, _lshlrev_b16, _lshrrev_b16, and _ashrrev_i16. Native RDNA2 hardware measurement (gfx1036) shows that all eight instructions accept the VOP3 clamp bit and treat it as a hardware no-op (for example, _mul_lo_u16 0xffff, 0xffff clamp wraps modulo `2^16` to --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#476
No description provided.