feat: implement v_sad_u16 in Python, Rust rdna2-ref, and HLSL #604
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/604"
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 LooperSalty/AnyXboxX. Originally posted by mahmudintaginting2024 on 2026-12-01T17:31:13Z.
Change
Implements
v_sad_u16(VOP3 opcode0x15C) across the Python reference interpreter, the Rust reference interpreter (anyxboxx-rdna2-ref), and the HLSL/DXIL recompiler.Per AMD's "RDNA 2" Instruction Set Architecture Reference Guide (30 Nov 2020, SHA-256
22aec03f..., section 12.12, printed p. 171):PrototypeScarlett/emu/rdna2_exec_vop3.py: add_sad_u16andVECTOR3["v_sad_u16"](VOP3 integerclampcontinues to raiseUntranslatedperINTEGER_CLAMP).crates/anyxboxx-rdna2-ref/src/vop3.rs: addv_sad_u16tointeger_names,sad_shorts,compute, and unit testsad_u16_sums_unsigned_halfword_differences_and_accumulates.PrototypeScarlett/emu/rdna2_hlsl_helpers.py&rdna2_hlsl_ops.py: addSadU16(uint a, uint b)helper and(SadU16({a}, {b}) + {c})translation.crates/anyxboxx-report/data/rdna2-coverage.txt: regenerated viapython tests/test_rust_traduction_parity.py(VOP3: 425 -> 426 / 438; total 1,365 / 1,490).tests/test_rdna2_exec_vop3_more.py&tests/test_rdna2_ref_parity.py: unit tests, HLSL/GPU/WARP byte-for-byte parity, and Python vs Rust wave32/wave64 parity includingclamprefusal.Verification
Oracle and test data
ANYXBOXX_GPU=warp).test_v_sad_u16_parity).test_sad_u16_sums_unsigned_halfword_differences,test_sad_u16_hlsl_and_gpu_parity, andtest_v_sad_u16_parityfail withUntranslatedonmainand pass with this change.Checklist
E_NOTIMPL), never a fake success.1900+band (1,986 tests;test_readme_sync.pypasses).Note: Co-authored with Gemini Neon (AI assistant).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.