mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:50:52 +01:00
[PR #1524] rdna2_decode: align DS single-offset and ds_swizzle_b32 ROTATE/FFT formatting with LLVM (DECODE-DS-PARITY) #1554
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#1554
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/1524
Author: @jarvixaiassistant-glitch
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/decode-ds-llvm-parity📝 Commits (1)
ee6b6f9rdna2_decode: align DS single-offset and ds_swizzle_b32 ROTATE/FFT formatting with LLVM📊 Changes
2 files changed (+54 additions, -3 deletions)
View changed files
📝
tests/test_rdna2_decode.py(+41 -0)📝
tools/rdna2_decode.py(+13 -3)📄 Description
Claimed in the coordination issue as: DECODE-DS-PARITY
What and why
Closes all 19 remaining mismatches in
tools/rdna2_decode.pyagainst LLVM 21.1.8'sgfx10_ds.txtDS disassembler test vectors (bringing DS parity to 1,708/1,708 exact):ds_condxchg32_rtn_b64single-offset formatting (6 vectors):_decode_onechecked2_ in name or 2st64_ in nameto detect dual-offset DS instructions, which falsely matched32_inds_condxchg32_rtn_b64and emittedoffset0:/offset1:instead of a single 16-bitoffset:. Restricted dual-offset detection toname.startswith((ds_read2, ds_write2, ds_wrxchg2)).ds_swizzle_b32swizzle formatting (13 vectors): Updated_format_ds_swizzleto match LLVMAMDGPUInstPrinter::printSwizzle:offset16 == 0: omit theoffset:modifier entirely (instead of emittingoffset:swizzle(BITMASK_PERM,00000)).0xC000..0xDFFF: emitoffset:swizzle(ROTATE,dir,size)wheredir = (offset16 >> 10) & 1andsize = (offset16 >> 5) & 0x1F.0xE000..0xFFFF: emitoffset:swizzle(FFT,mask)wheremask = offset16 & 0x1F.tests/test_rdna2_decode.pycoveringds_condxchg32_rtn_b64single 16-bit offset,ds_swizzle_b32zero/ROTATE/FFT/existing bitmask modes, and preservation ofds_read2_b32/ds_write2st64_b64dual-offset printing.Tested
All synthetic CPU/stdlib/docs/CI checks on Windows 11 x64, Python 3.12.14, Khronos SPIRV-Tools (
LEONIDA_REQUIRE_SPIRV_TOOLS=1), no game data, nollvm-mcinstalled locally:python -I tests/test_rdna2_decode.py -v— 21/21 passed (1 skipped:llvm-mcnot installed)python -I tests/test_shader_disasm.py— 31/31 passedpython -I tests/test_ci_registration.py— 16/16 passedpython -I scripts/check_no_game_data.py— passedpython -m compileall -q tools/rdna2_decode.py tests/test_rdna2_decode.py— passedgfx10_ds.txtvectors: 1,708/1,708 exact (was 19 mismatches)GPUs tested: n/a (pure-Python ISA binary decoder only)
AI-assisted: yes (JARVIX multi-model team: Antigravity + DeepSeek V4 Flash + NVIDIA NIM Nemotron-3.5-Lightning & Nemotron-3-Ultra-550B)
Checklist
main(1cfc29af7) and merges cleanly.docs/design.md, with how it was confirmed. (N/A — pure-Python DS disassembler formatting parity with LLVM; no translator rule changed.)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.