mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #1111] rdna2spirv: the packed 16-bit shifts read their halves through the shared readers (SHADER-PK16-HALVES-CARRY) #1145
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1145
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1111
Author: @klikso
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:carry/shader-pk16-halves📝 Commits (1)
fb2cf46rdna2spirv: the packed 16-bit shifts read their halves with the shared half readers📊 Changes
3 files changed (+54 additions, -13 deletions)
View changed files
📝
docs/design.md(+1 -1)📝
tests/test_u16_high_half.py(+38 -0)📝
tools/rdna2spirv.py(+15 -12)📄 Description
Claimed in the coordination issue as: SHADER-PK16-HALVES-CARRY
What and why
This carries #423 by @fiestorra onto current
main: one commit,3a53caad8, cherry-picked with its author kept and no change of mine. #423 was reviewed ("Looks good ... Ship", @Oliwettoo) and then closed by its author on 24 November when he left the project;mainstill has the private copy of the half readers, and no open pull request carries the change.v_pk_lshlrev_b16,v_pk_lshrrev_b16andv_pk_ashrrev_i16read their value halves with code of their own, while every other 16-bit half reader intools/rdna2spirv.pygoes throughGen.u16_half/Gen.i16_half. Forv_pk_ashrrev_i16the half was weighted as%uintand then shifted withOpShiftRightArithmetic, so the sign extension depended on how a consumer reads an arithmetic shift of an unsigned operand. Both halves now come from the shared readers, and the signed op shifts a sign-extended%int.@fiestorra: this is your work. If you want it back, say so and I will close this.
Tested
Windows 11 26200.9974, Python 3.13.14 (pytest 9.2.0),
llvm-mc23.1.6 (conda-forge, AMDGPU target), SPIRV-Tools v2026.4. Runtime test programs built frommain3aa975421with MSVC 19.44; this change does not touchruntime/.mainpytest tests/test_u16_high_half.py(with the two new cases)python -I tests/semantic/test_valu_pk_shift_b16.pyrun_gpu_tests.py --filter pk(native)The first row's
maincolumn is the new test file run againstmain's translator: the two failures aretest_pk_shifts_read_the_half_they_shift_like_every_other_reader[v_pk_ashrrev_i16]andtest_pk_ashrrev_i16_shifts_the_value_as_signed.python -I scripts/check_no_game_data.pyon the three changed files: no hits.git diff --check: clean.GPUs tested: NVIDIA GeForce RTX 3060 Ti (Ampere), driver 621.14, Vulkan 1.4.357, Windows 11 26200
AI-assisted: yes (Claude Code; run and measured on the machine above)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed: the commit updates the existing row indocs/design.md; no new rule.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.