mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:40:52 +01:00
[PR #637] [MERGED] rdna2_decode: decode VOP2 0x06 and VOP3 0x106 as v_mac_legacy_f32 on gfx101* (DECODE-MAC-LEGACY-TARGET) #676
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#676
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/637
Author: @jarvixaiassistant-glitch
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:fix/decode-mac-legacy-target📝 Commits (1)
2da938ardna2_decode: decode VOP2 0x06 and VOP3 0x106 as v_mac_legacy_f32 on gfx101*📊 Changes
2 files changed (+58 additions, -0 deletions)
View changed files
📝
tests/test_rdna2_decode.py(+54 -0)📝
tools/rdna2_decode.py(+4 -0)📄 Description
Claimed in the coordination issue as: DECODE-MAC-LEGACY-TARGET
What and why
tools/rdna2_decode.pyalready maps VOP30x140tov_mad_legacy_f32ongfx101*andv_fma_legacy_f32ongfx103*, but left VOP20x06and VOP30x106unconditionally mapped tov_fmac_legacy_f32even for the defaultmcpu="gfx1013"console target.Per
docs/design.md(GFX10.1/GFX10.3 opcode differences) and LLVM 21VOP2Instructions.td:gfx101*(including consolegfx1013), VOP20x06and VOP30x106arev_mac_legacy_f32(_e32/_e64), whichtools/rdna2spirv.pytranslates.gfx103*(gfx1030/gfx1036), the same encodings are the fusedv_fmac_legacy_f32, whichtools/rdna2spirv.pyintentionally rejects withUnsupported("v_fmac_legacy_f32").Because
tools/rdna2_decode.pyemittedv_fmac_legacy_f32_e32/v_fmac_legacy_f32_e64ongfx1013, translating any console shader containing VOP20x06or VOP30x106throughshader_disasm.py --backend pythonfailed loudly withUnsupported: v_fmac_legacy_f32.This PR:
0x06and VOP30x106tov_mac_legacy_f32whenmcpu.startswith("gfx101"), keepingv_fmac_legacy_f32forgfx103*(mirroring VOP30x140).test_vop2_and_vop3_legacy_mac_fmac_target_and_roundtripintests/test_rdna2_decode.pyverifying both VOP20x06and VOP30x106acrossgfx1013andgfx1030, plus an end-to-end binary →shader_disasm.disasm(..., backend="python")→rdna2spirv.translate→spirv_mini_interptest (2.0 * 2.0 + 4.0 = 8.0).Tested
All synthetic CPU/stdlib/docs/CI checks on Windows 11 x64, Python 3.12.14, Node v24.19.0 (no game files, no
llvm-mcinstalled locally):gfx1013binary with VOP20x06decoded asv_fmac_legacy_f32_e32and raisedUnsupported: v_fmac_legacy_f32inrdna2spirv.translate().python -I tests/test_rdna2_decode.py -v— 20/20 passed (1 skipped:llvm-mcnot installed)gfx10_vop2.txt: 725/725 PASS (was 707/725, 18 mismatches)gfx10_vop3.txt: 6,209/6,209 PASS (was 6,171/6,209, 38 mismatches)python -I tests/test_ci_registration.py— 15/15 passedpython -I tests/test_runtime_paths.py— 5/5 passedpython -I scripts/check_no_game_data.py— passed (0 forbidden tracked extensions)python -m compileall -q make_game.py tools tests— passedpython -I tests/test_text_write_line_endings.py,tests/test_report_paths.py,tests/test_i18n_index.py, and alltests/test_docs_*.py— passednode --test tests/test_viewer_streaming.cjs— passedGPUs tested: n/a (pure-Python ISA binary decoder + CPU SPIR-V interpreter round-trip only)
AI-assisted: yes (JARVIX multi-model team: Antigravity + DeepSeek V4 Flash + NVIDIA NIM Nemotron-3.5-Lightning & Nemotron-3-Ultra-550B)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (N/A — binary ISA decoder target-mnemonic parity with existingdocs/design.mdcontract row; no translator rule changed.)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.