mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:40:52 +01:00
[PR #462] [MERGED] SDWA-LLVM19-ENC: recover native SDWA inline float listings #513
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#513
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/462
Author: @bobcatchris
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD
Base:
main← Head:sdwa-llvm19📝 Commits (1)
c932457rdna2spirv: recover native SDWA inline float from LLVM 19 listings📊 Changes
3 files changed (+59 additions, -3 deletions)
View changed files
📝
tests/semantic/test_printed_encoding.py(+22 -1)📝
tests/test_rdna2_decode.py(+8 -1)📝
tools/rdna2spirv.py(+29 -1)📄 Description
Claimed in the coordination issue as: SDWA-LLVM19-ENC
What and why
LLVM 19 prints an eight-byte integer-to-half SDWA conversion as a twelve-byte instruction with an extra literal dword.
check_printed_encodingsthen rejectsps_sdwa_f16_constat offset0x190, and the same pattern affects the signed conversion. This recovers the native source operand and instruction width when the native opcode, selector, other bytes and printed literal agree, so the translator accepts the LLVM 19 listing while still rejecting a changed literal or selection field.Carried from the source-only patch reported by @Sigtryggur-Mani-Gudmundsson:
github.com/Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches@b17a81c3d9/tests/sdwa-inlineOnly the SDWA commit from that mailbox is included; the unrelated permlane/null-export commit was dropped. No game data is included.
Tested
python -I tests/semantic/test_printed_encoding.py— 8 tests OK (7 on unpatchedmain; new case exercises the LLVM 19 listing)python -I tests/test_rdna2_decode.py— 16 pass, 1 pre-existingcs_w32_permlane_fiop_selfailure that also fails on unpatchedmainpython -I scripts/run_semantic_tests.py tests/semantic— 465 files, 6105 tests; onlytest_image_cube_store_glcfailed in this environment, also fails on unpatchedmainpython -m compileall -q tools tests— OKgit diff --check— cleanThe source report measured 4096/4096 pixels on an RTX 4070 Ti with LLVM 19.1.7, LLVM 23.1.5 and the Python decoder. I did not repeat that GPU measurement locally.
GPUs tested: n/a locally; source report used NVIDIA GeForce RTX 4070 Ti
AI-assisted: yes
Checklist
mainand merges cleanly.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.