fix: 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 #281
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!281
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/281/head"
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?
@Andretuta on GitHub · 2026-11-24 02:58 UTC · original
ubiquitarianism:old-pr/10010→main· +248 −6 · 4 files · 1 commits · merged 2026-11-25 02:33 UTCOriginal description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):What
tools/shader_disasm.pyprints thev_dot4_i32_i8 ... op_sel:[0,1,0] op_sel_hi:[1,0,1]word (opcode 0x16, op_sel 2, op_sel_hi 5, no clamp, no neg) that llvm-mc rejects. A dword pair llvm-mc refuses with exactly those fields is decoded with the fields at their defaults, then given the fields and its real encoding back. Any other op_sel/op_sel_hi value, clamp or neg stays undecodable. A pair llvm-mc accepted is never touched. docs/fspx.md and a comment in test_alu_dot4_i8.py updated.Why
The FidelityFX upscaler (FSR4) FSPX programs hold 89 such words in 8 programs (docs/fspx.md). The translator already models the form, but the listing could not carry it, so those programs were refused as a fall-through into undecodable words. This lets those shader programs translate.
Tested (read this part)
pytest tests/semantic/test_alu_dot4_i8.py tests/semantic/test_fspx_dot4_op_sel_disasm.py: 12 passed, 4 skipped, 23 subtests passed. The 4 skipped are the newtest_fspx_dot4_op_sel_disasm.pytests: they need an llvm-mc with the AMDGPU target that decodesv_dot4_i32_i8, and llvm-mc 19 does not.tools/shader_disasm.pyat origin/main the new test file cannot even be collected (norun_mchelper); the behaviour tests are the skipped ones, so the control for the decode itself was only seen on the pod.Rebased cleanly on current main (cherry-pick, no conflicts). Coordination: https://github.com/ProjectLeonida/Leonida/issues/9677
@SweatierKey on GitHub · 2026-11-24 15:58 UTC · original · approved these changes
Independent verification on
origin/main@1504c1af6(LLVMllvm-mc 23.1.6,LEONIDA_REQUIRE_SPIRV_TOOLS=1):tests/semantic/test_fspx_dot4_op_sel_disasm.py:4/4PASS (assembled, patched, disassembled withllvm-mc, translated, and validated; confirms unsupportedop_sel,clamp/neg, and non-instruction data stay untouched).tests/semantic/test_alu_dot4_i8.py:12/12PASS.scripts/check_no_game_data.py: clean.AI-assisted: yes