Shaders: xcl disasm prints DPP controls, masks and source modifiers #791
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!791
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/791/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?
@upipibi on GitHub · 2026-11-24 05:31 UTC · original
upipibi:disasm-dpp-controls→main· +218 −8 · 1 files · 2 commits · merged 2026-11-25 18:11 UTCStacked on the SDWA PR #790; only the top commit (
ec0aa67) belongs here.xcl disasmprints a DPP instruction as its registers only:v_mov_b32_dpp v5, v1stands for every lane permutation there is. Left out: the control that says which lane each lane's first source comes from (quad_perm:[…],row_shl/row_shr/row_ror,row_mirror,row_half_mirror,row_share,row_xmask),row_mask/bank_mask,bound_ctrl,fi, the sources' neg / abs, and the eight lane selects of DPP8. The recompiler reads all of these (emit.rs,upper_lanes.rs); only the printed line drops them. Same kind of gap as #664, in an encoding that issue and its PRs (#687, #706, #716) do not cover; I found no issue or PR for it.What is in it
crates/xcl/src/gpu/rdna2.rs:dpp_source(-v1,|v1|),dpp_modifiers(DPP16: control,row_mask,bank_mask,bound_ctrl:1,fi:1; DPP8:dpp8:[…],fi:1), in LLVM's words and order, called fromoperand_text/format.llvm_gfx10_dpp_textcompares the whole line with LLVM's for all 2229 DPP lines oftests/data/llvm-amdgpu(2117 DPP16 ingfx10_vop1_dpp16.txt/gfx10_vop2_dpp16.txt, 112 DPP8 ingfx10_vop1_dpp8.txt);sdwa_and_dpp_src0gets the new tail and a control without a name.vcc/vcc_looperands stay out, as in the plain forms; DPP8 keeps this disassembler's_dpp8suffix (LLVM:_dpp); a control RDNA2 has no name for (wave_*,row_bcastof older GPUs, the unassigned ones) is printed asdpp_ctrl:<number>, where LLVM prints a comment.The text also goes into the
// pc: …comment lines of the translated HLSL, so the HLSL of a program with DPP instructions changes in its comments (no code line changes).Tested
cargo test -p xcl --lib gpu::rdna2: 12 passed, 0 failed. With the tests on the parent commit'sformat: 2 failed –llvm_gfx10_dpp_text"2229 of [2117, 112] DPP lines differ from LLVM's",sdwa_and_dpp_src0.cargo test --workspace --no-fail-fast -- --test-threads=4onec0aa67: 704 passed, 0 failed, 41 ignored (xcl lib: 663 passed, 0 failed, 21 ignored), from a clean build of the workspace crates.no wave64:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.Regression run
Run by @eizispark on an AMD Radeon RX 9070 XT (posted in this PR's comments; we have no retail title here).
main:
PR:
Not tested
XCL_SAMPLE_*data: the game-data tests passed without running.test_title_draws_with_a_root_signature_under_the_debug_layeranduploads_start_from_each_subresources_statereturn early.dpp_ctrl:<number>form has no LLVM line to compare with.AI use
xcl disasmwith the LLVM test lines in the repository, wrote the code, the tests and this description, and ran the tests.🤖 Generated with Claude Code
@MesshM on GitHub · 2026-11-24 05:46 UTC · original
Test run of
ec0aa67f44ffb13fcf73db4e9f9d8548a972d2e2on AMD RDNA4. I merged it onto currentmaine50836blocally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 707 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 666 passed, 0 failed, 21 ignoredSKIPPED;llvm_gfx10_dpp_textandsdwa_and_dpp_src0pass.Review: Disassembler text only. I found nothing to change.
Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@Anon64 on GitHub · 2026-11-24 06:55 UTC · original
Regression runs for this PR's head
ec0aa67and for its basemainf4ce27c, on a retail title (same title, 60 s each), made withscripts/smoke.ps1(release, clean tree at each commit) and pasted unedited, for Regression run.main:
this PR:
Tested
Not tested
xcl disasmoutput itself: a title run does not use it, so this is a regression check onlyReport written with Claude Code (Claude Opus 5.5) from runs on this machine.
@eizispark on GitHub · 2026-11-24 07:03 UTC · original
Hardware check of
ec0aa67f44ffb13fcf73db4e9f9d8548a972d2e2(verified clean merge withmainbeaa245): pass.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09), release + test profilecargo test --workspace -- --test-threads=4:704 passed, 0 failed, 41 ignored(GPU tests skipped on this adapter:none)cargo test -p xcl --lib gpu::rdna2:12 passed, 0 failed(includingllvm_gfx10_dpp_textandsdwa_and_dpp_src0)Regression run
main(beaa245):PR (
ec0aa67):Not tested
AI use
scripts/smoke.ps1harness on this machine and formatted this report.@upipibi on GitHub · 2026-11-24 10:07 UTC · original
Thanks @eizispark: both blocks are now in Regression run, credited.
@DavidM1911 on GitHub · 2026-11-25 10:58 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!