shader: decode v_fma_mix* neg/abs modifiers in disasm_rdna2 #756
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/762"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by Ammmae0x on 2026-11-23T01:25:16Z.
Fixes #745
Change
tools/disasm_rdna2.pypreviously formatted all VOP3P encodings withneg_lo:[...](w1[31:29]) andneg_hi:[...](w0[10:8]) suffix modifiers. On RDNA 2 mixed-precision FMA instructions (v_fma_mix_f32,v_fma_mixlo_f16,v_fma_mixhi_f16), those bits instead encode per-sourceabs(|src|) andneg(-src, or-|src|when combined), causingpixel_aot.parse_fma_mixto reject disassembledv_fma_mix*instructions._format_operand_modifiers(val, is_abs, is_neg)helper intools/disasm_rdna2.pyfor both VOP3P and VOP3 operand formatting.v_fma_mix*opcodes applyw0[10:8]as inlineabsandw1[31:29]as inlinenegon the 3 source operands and omitneg_lo:/neg_hi:suffixes, while leavingneg_lo/neg_hiunchanged forv_pk_*andv_dot*.test_vop3p_fma_mix_inline_abs_neg_modifiersintests/rdna2_tools_check.pycovering the issue encoding (0c1920cc2c26524c), all threev_fma_mix*opcodes withabs,neg,-|...|,op_sel,op_sel_hi,clamp, 32-bit literal operands,pixel_aot.parse_fma_mix+fma_mix_operandround-trips,v_dot2_f32_f16retainingneg_lo/neg_hi, and negative controls (parse_fma_mixrejectingneg_lo/neg_hiand f32 high-half selection; truncatedv_fma_mix*literal decoding asvop3p_truncated).Verification
Tested on commit
a455ccf(baseaeb45da), Windows x64 (MSVC 19.50.35727,CMake 4.2.3-msvc3,Ninja 1.12.1,Python 3.12.8):ctest --preset dev -N:328tests registered (matches baseline).cmake --build --preset dev --target offscreen_check root_probe root_device_probe&release: 0 errors, 0 warnings..\out\pe-env\Scripts\python.exe -B tests/rdna2_tools_check.py:Ran 58 tests in 1.824s,OK (skipped=1)(existingllvm-mcskip when unavailable on Windows).ctest --preset dev --no-tests=error -R "rdna2_tools_check|shader_|pso_readiness|pixel_aot_" -V:35/35 passed,0 failed(264.24s).ctest --preset release --no-tests=error -R "rdna2_tools_check|shader_|pso_readiness|pixel_aot_" -V:35/35 passed,0 failed(239.50s)..\out\pe-env\Scripts\python.exe -B tests/form_coverage_check.py: exit0(form coverage checks passed)..\out\pe-env\Scripts\python.exe -B tests/docs_links_check.py: exit0(Checked 11 Markdown files and 137 links.)..\out\pe-env\Scripts\python.exe -B tests/bidi_controls_check.py: exit0(Checked 618 tracked source, script and build/CI files: no bidirectional controls.).Evidence and follow-up
All new checks use synthetic RDNA 2 VOP3P machine-code words and the existing pure-Python
pixel_aot.parse_fma_mix/fma_mix_operandhelpers intests/rdna2_tools_check.py.Checklist
AI-assisted.