mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:50:51 +01:00
[PR #1317] [CLOSED] shader_disasm: print v_dot4_i32_i8 op_sel 2 / op_sel_hi 5 words llvm-mc rejects (OLD-10010) #1346
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#1346
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/1317
Author: @ambroseautomation
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:carry/old-10010-fspx-dot4-op-sel📝 Commits (1)
62237d0fix: shader_disasm prints the v_dot4_i32_i8 op_sel 2 / op_sel_hi 5 words llvm-mc rejects, so the FSR4 FSPX programs translate📊 Changes
4 files changed (+224 additions, -1 deletions)
View changed files
📝
docs/fspx.md(+9 -0)📝
tests/semantic/test_alu_dot4_i8.py(+2 -1)➕
tests/semantic/test_fspx_dot4_op_sel_disasm.py(+157 -0)📝
tools/shader_disasm.py(+56 -0)📄 Description
Summary
Coordination item:
OLD-10010(carry-forward ofold-pr/10010, preserving original authortedin7).Problem & Root Cause
llvm-mcrejectsv_dot4_i32_i8VOP3P words encoded withop_sel: 2([0,1,0]) andop_sel_hi: 5([1,0,1]), which appear in the FidelityFX upscaler's FSPX programs (docs/fspx.md), preventing those programs from disassembling and translating cleanly.Implementation
DOT4_I8_OPCODE,dot4_op_sel_words(), andwith_dot4_op_sel()intools/shader_disasm.pyto patch rejectedv_dot4_i32_i8op_sel=2 / op_sel_hi=5words to defaults (op_sel=0 / op_sel_hi=7) forllvm-mcdisassembly and restoreop_sel:[0,1,0] op_sel_hi:[1,0,1]and the original encoding bytes on the resulting instruction lines.main'swith_vopc_dpp()fallback pass cleanly alongsidewith_dot4_op_sel()indisasm().docs/fspx.mdand adds semantic/disassembly tests intests/semantic/test_fspx_dot4_op_sel_disasm.pyandtests/semantic/test_alu_dot4_i8.py.Tests Run
Environment: Windows 11 Pro 64-bit, Python 3.12.10, synthetic fixtures only (no game data).
python -I -m py_compile tools/shader_disasm.py tests/semantic/test_fspx_dot4_op_sel_disasm.py tests/semantic/test_alu_dot4_i8.py— PASSpython -I tests/semantic/test_alu_dot4_i8.py— 12/12 PASSpython -I tests/semantic/test_fspx_dot4_op_sel_disasm.py— 4 skipped (nollvm-mcinstalled on this host); additionally verifiedshader_disasm.dot4_op_sel_words()andshader_disasm.disasm()fallback path with a mockedrun_mc— PASSpytest tests/test_docs_links.py tests/test_text_write_line_endings.py -v— 19/19 PASSpython -I scripts/check_no_game_data.py docs/fspx.md tests/semantic/test_alu_dot4_i8.py tests/semantic/test_fspx_dot4_op_sel_disasm.py tools/shader_disasm.py— PASSDisclosure
AI-assisted: yes (carry-forward, rebase onto current
mainpreservingwith_vopc_dpp, and local verification; original implementation by tedin7).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.