shader: disasm_rdna2 decodes v_fma_mix* with neg_lo/neg_hi instead of neg/abs operand modifiers #745
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#745
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?
@Ammmae0x on GitHub · 2026-11-23 00:26 UTC · original
Commit or build
fd2486f(upstream/main)Reproduction
Decode the RDNA 2
v_fma_mix_f32instruction0c1920cc2c26524c(w0=0xcc20190c,w1=0x4c52262c, whereabsbitsw0[10:8]=[1,0,0]andnegbitsw1[31:29]=[0,1,0]) withtools/disasm_rdna2.pyand pass it totools/pixel_aot.py:parse_fma_mix:Expected behavior
Per the AMD RDNA 2 ISA and
tools/pixel_aot.py:1200-1267,v_fma_mix_f32,v_fma_mixlo_f16, andv_fma_mixhi_f16repurpose VOP3Pw1[31:29]as per-sourceneg(-src) andw0[10:8]as per-sourceabs(|src|) operand modifiers (op_selandop_sel_hiretain their bit-type / half-selection roles).disasm_rdna2should format0c1920cc2c26524cwith inline operand modifiers (v_fma_mix_f32 v12, |s44|, -v19, v20 op_sel:[1,1,0] op_sel_hi:[1,0,0]) rather thanneg_lo:/neg_hi:, sopixel_aot.parse_fma_mixaccepts disassembledv_fma_mix*instructions.Acceptance criteria:
tools/disasm_rdna2.py:1477-1509, renderw1[31:29](neg) andw0[10:8](abs) as inline-and|...|modifiers onv_fma_mix*source operands instead of emittingneg_lo:[...]/neg_hi:[...].v_fma_mix*neg/absdisassembly anddisasm_rdna2->pixel_aot.parse_fma_mixround-trip tests totests/rdna2_tools_check.py.Observed behavior
tools/disasm_rdna2.py:1481-1509treatsw1[31:29]asneg_loandw0[10:8]asneg_hifor all VOP3P instructions, includingv_fma_mix*. This misrepresentsabsasneg_hiand causespixel_aot.parse_fma_mix(tools/pixel_aot.py:1262) to reject the disassembled output:Environment
Windows 10 Pro 24H2 (build 26100.7623), Python 3.11.15.
Checklist
AI-assisted.
@R0Y00 on GitHub · 2026-11-23 01:09 UTC · original
Please use LLVM 15 gfx1013 assembly and disassembly to distinguish the source sign/absolute modifiers from the packed-lane fields. Add a fixture whose operand order and signed values expose a swapped modifier, and check that the disassembled spelling goes through the normal lowerer. Keep the existing packed forms covered.