mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:00:52 +01:00
[PR #2366] rdna2spirv: route remaining 16-bit high-half readers through u16_half/i16_half (SHADER-HIGH-HALF-SHARED-READERS) #2370
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#2370
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/2366
Author: @ShotTechOp
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:fix/high-half-shared-readers📝 Commits (1)
b176c9frdna2spirv: route remaining 16-bit high-half readers through u16_half/i16_half (SHADER-HIGH-HALF-SHARED-READERS)📊 Changes
3 files changed (+246 additions, -27 deletions)
View changed files
📝
docs/design.md(+1 -1)➕
tests/semantic/test_high_half_shared_readers.py(+223 -0)📝
tools/rdna2spirv.py(+22 -26)📄 Description
Item ID:
SHADER-HIGH-HALF-SHARED-READERSSummary
Routes all seven remaining 16-bit high-half readers in
tools/rdna2spirv.pythrough the sharedGen.u16_half/Gen.i16_halfhelpers, eliminating every remainingOpBitField{S,U}Extract ... 16 16across the translator (AMD Windows driver 25.10.36 on gfx1036 miscompiles offset-16 width-16 bitfield extracts by taking the offset mod 16 and reading the low half instead of the high half; seedocs/design.md"16-bit high-half reads", #1506 / SHADER-777):Gen.compare(v_cmp(x)_*_{u16,i16}withop_selhigh half)Gen.sdwa_src(src*_sel:WORD_1, both unsigned andsext())v_pk_{add,sub,mul_lo,mad,max,min}_{u16,i16}v_qsad_pk_u16_u8/v_mqsad_pk_u16_u8v_sad_u16v_mad_u32_u16/v_mad_i32_i16image_storewithd16Also adds
Gen.as_uint()alongsideGen.as_int()for clean%int->%uintbitcasts afteri16_half(), updates the "16-bit high-half reads" contract row indocs/design.md, and addstests/semantic/test_high_half_shared_readers.py. Does not touchv_pk_lshlrev/lshrrev/ashrrev_b16(covered separately by #1111).Verification
spirv_mini_interp; no local GPU/Vulkan/spirv-valinstalled)python -I tests/semantic/test_high_half_shared_readers.py -v-> 6/6 OK (structural + bit-exact semantic parity across all 7 families)test_image_cube_store_glc.py,test_image_store_d16.py,test_alu_mad_u16.py,test_alu_sad.py,test_alu_qsad.py,test_valu_int16.py,test_vcmp16_opsel.py,test_mutations.py,test_negative_controls.py-> all OKpython -I tests/test_text_write_line_endings.py-> 3/3 OKpython -m compileall -q tools/rdna2spirv.py tests/semantic/test_high_half_shared_readers.py-> exit 0python -I scripts/check_no_game_data.py tools/rdna2spirv.py tests/semantic/test_high_half_shared_readers.py docs/design.md-> exit 0git diff --check-> cleanorigin/main(tools/extracted fromorigin/main):tests/semantic/test_high_half_shared_readers.pyfails 6/6 tests (11 failures across every op family:OpBitField{U,S}Extract %uint ... %c10 %c10emitted at all 7 sites).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.