feat: execute and recompile RDNA 2 SDWA, DPP16, and DPP8 forms (#21) #118
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!118
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/118/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?
@Lewandox on GitHub · 2026-11-24 00:09 UTC · original
Lewandox:feat/rdna2-sdwa-dpp-exec-hlsl→main· +657 −11 · 13 files · 3 commits · merged 2026-11-24 10:14 UTCImplements full execution and HLSL recompilation for RDNA 2 SDWA (
0xF9), DPP16 (0xFA), and DPP8 / DPP8_FI (0xE9/0xEA) forms acrossVOP1,VOP2, andVOPCinstructions (part of #21).Changes
PrototypeScarlett/emu/rdna2_exec_ext.py: reference interpreter semantics per AMD RDNA 2 ISA sections 6.5 (SDWA) and 6.6 (DPP):src0_sel/src1_sel(BYTE_0..3,WORD_0..1,DWORD), scalar-vs-VGPR source flags, integersext, floatabs/neg/omod/clamp,dst_sel+dst_unused(UNUSED_PAD,UNUSED_SEXT,UNUSED_PRESERVE), andVOPCcustomsdst.dpp_ctrlmodes (quad_perm,row_shl,row_shr,row_ror,row_mirror,row_half_mirror,row_share,row_xmask),row_mask,bank_mask,bound_ctrl,fi, and floatabs/negmodifiers.EXEC-respectingfi=0and force-inactivefi=1.PrototypeScarlett/emu/rdna2_hlsl_ext.py: matching HLSL emission for SDWA, DPP16, and DPP8 (usingReadLanefor cross-lane reads and bitwise field ops for SDWA).PrototypeScarlett/emu/rdna2_exec.py&PrototypeScarlett/emu/rdna2_hlsl.py: dispatch0xF9,0xFA,0xE9,0xEAextension forms tordna2_exec_extandrdna2_hlsl_ext.tests/test_rdna2_sdwa_dpp_exec.py: covers SDWA extraction/sext/placement/float mods/VOPC customsdst, DPP16 quad/row ops/masks/bound_ctrl, DPP8/fiunder divergentEXEC, HLSL translation, and GPU/WARP comparison against the interpreter.README.mdanddocs/i18n/README.*.md: updated test count (555 -> 562).Local verification
.venv\Scripts\python.exe -m pytest tests/test_rdna2_sdwa_dpp_exec.py tests/test_rdna2_sdwa_dpp.py tests/test_rdna2_exec.py tests/test_rdna2_hlsl.py tests/test_readme_sync.py -v: 52 passed, 6 skipped (dxc/anyxboxx_gpu_run.exenot installed locally; Windows CI runs the GPU/WARP tests)..venv\Scripts\python.exe -m ruff check --select W605,F,E9 PrototypeScarlett tests tools: All checks passed!No game, console, or SDK files used. AI-assisted contribution.
@Lewandox on GitHub · 2026-11-24 08:55 UTC · original
Addressed all review points in \
201678c:(Note: our fork branch didn't rebase the workflow commit in \main\ due to OAuth \workflow\ scope; happy to update README count to 562 once rebased or during merge.)
@LooperSalty on GitHub · 2026-11-24 08:31 UTC · original · requested changes
Tests pass here (7/7, GPU included), and VOPC in DPP raises
Untranslatedwith the instruction name, good. One correctness issue to fix:_is_float_opinrdna2_exec_ext.py/rdna2_hlsl_ext.pyuses"_f32" in name. That treats integer-source conversions (v_cvt_f32_u32,v_cvt_f32_i32,v_cvt_f32_ubyte*) and f16-result ones (v_cvt_f16_f32) as float ops: abs/neg get applied to integer sources, the SDWA sign extension is skipped forv_cvt_f32_i32, and omod/clamp are applied where they should not be. The source and destination types need to come from the operand types (asrdna2_shapesdoes), not from a substring of the name.clampon an integer op is silently ignored; per rule 3 it should either be implemented or raiseUntranslated.Please add a test for
v_cvt_f32_i32with SDWAsextand a negative byte, checked against the GPU. CI is blocked by the deleted Leonida submodule until #120 is merged; the README test count will need a rebase anyway.🤖 Generated with Claude Code