mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:40:52 +01:00
[PR #281] [MERGED] 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 #333
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#333
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/281
Author: @Andretuta
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:old-pr/10010📝 Commits (1)
4e49709fix: 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 (+248 additions, -6 deletions)
View changed files
📝
docs/fspx.md(+9 -0)📝
tests/semantic/test_alu_dot4_i8.py(+2 -2)➕
tests/semantic/test_fspx_dot4_op_sel_disasm.py(+157 -0)📝
tools/shader_disasm.py(+80 -4)📄 Description
Original 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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.