Shaders: xcl disasm prints EXP targets and VINTRP attributes (#664) #706

Open
github-bot wants to merge 2 commits from github-bot/gh-706 into main AGit
Owner

@⁠milas6669 on GitHub · 2026-11-24 03:56 UTC · original
milas6669:disasm-exp-vintrp → main · +270 −1 · 1 files · 2 commits · open

Stacked on #687; only the top commit (a8561bdaf770) belongs here.

xcl disasm now prints EXP targets/enabled sources and VINTRP attributes as LLVM does: exp param7, off, v121, off, v178 done compr vm and attr5.w. Part of #664. Rebased onto main cbc296ab65a2, retaining main's image dispatch and merged SMEM formatting.

What is in it

  • crates/xcl/src/gpu/rdna2.rs: EXP target names, off for disabled sources, compressed register slots, and done/compr/vm; VINTRP attribute/channel and p10/p20/p0 parameter names.
  • exp_text_matches_llvm checks all 16 LLVM gfx10 EXP lines and the issue's word; vintrp_attribute_and_channel checks the issue's example and MOV/P2 forms.
  • Disassembly also appears in translated HLSL comments, causing one DXIL cache miss.

Tested

  • Clean head a8561bdaf770bb03bf8c88ec866a948b6fe259d6; NVIDIA RTX 3070, driver 621.40, Intel i9-10900KF, Windows 11 Pro 10.0.26200, stable Rust 1.100.0/MSVC, debug build.
  • cargo build --workspace --locked: passed. cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --nocapture: 1159 passed, 0 failed, 46 ignored (Cargo counts include tests that report skips).
  • 27 SKIPPED messages, excluded from GPU coverage: 20 wave64 subcases; three per-lane DXIL forms refused (V_MUL_F16, V_PK_MUL_F16, V_CVT_F16_F32); uploads_start_from_each_subresources_state and test_title_draws_with_a_root_signature_under_the_debug_layer lack the debug layer; pso_measurement_compiles_an_exact_synthetic_record needs Developer Mode to disable the driver cache; heap_window_out_of_memory_falls_back_to_the_switch_form lacks heap windows.

Regression run

Clean main (cbc296ab65a2), 60 seconds:

xcl-smoke v1
commit: cbc296ab65a2661a61e3e2da109134bcd5319f60
gpu: NVIDIA GeForce RTX 3070
title: 31c4c1c4
seconds: 60
exit: 0x0
frames shown: 552 (PresentX 553)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 10774 MB

Clean PR head (a8561bdaf770), same title and time:

xcl-smoke v1
commit: a8561bdaf770bb03bf8c88ec866a948b6fe259d6
gpu: NVIDIA GeForce RTX 3070
title: 31c4c1c4
seconds: 60
exit: 0x0
frames shown: 1070 (PresentX 1070)
presents per 2 s (last 3): 59 60 60
device removals: 0
crashes: 0
peak commit: 10319 MB

Not tested

  • AMD and wave64 hardware; the skipped cases above.
  • The title run checks regression only: it does not print disassembly. The cold DXIL cache was not measured separately.
  • Invalid EXP targets, and VOP3-encoded interpolation. LLVM gfx10 has no VINTRP corpus; those cases use the issue and operand forms.

AI use

  • Original code/tests/description: Claude Code / Claude Sonnet 5.5; prerequisite #687 retains its Claude Opus 5.5 credit.
  • Rebase/conflict resolution, validation and this update: Codex (GPT-6 family; exact model identifier was not supplied).
**@⁠milas6669** on GitHub · 2026-11-24 03:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/706) `milas6669:disasm-exp-vintrp` → `main` · +270 −1 · 1 files · 2 commits · open Stacked on #687; only the top commit (`a8561bdaf770`) belongs here. `xcl disasm` now prints EXP targets/enabled sources and VINTRP attributes as LLVM does: `exp param7, off, v121, off, v178 done compr vm` and `attr5.w`. Part of #664. Rebased onto main `cbc296ab65a2`, retaining main's image dispatch and merged SMEM formatting. **What is in it** - `crates/xcl/src/gpu/rdna2.rs`: EXP target names, `off` for disabled sources, compressed register slots, and done/compr/vm; VINTRP attribute/channel and p10/p20/p0 parameter names. - `exp_text_matches_llvm` checks all 16 LLVM gfx10 EXP lines and the issue's word; `vintrp_attribute_and_channel` checks the issue's example and MOV/P2 forms. - Disassembly also appears in translated HLSL comments, causing one DXIL cache miss. **Tested** - Clean head `a8561bdaf770bb03bf8c88ec866a948b6fe259d6`; NVIDIA RTX 3070, driver 621.40, Intel i9-10900KF, Windows 11 Pro 10.0.26200, stable Rust 1.100.0/MSVC, debug build. - `cargo build --workspace --locked`: passed. `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --nocapture`: 1159 passed, 0 failed, 46 ignored (Cargo counts include tests that report skips). - 27 SKIPPED messages, excluded from GPU coverage: 20 wave64 subcases; three per-lane DXIL forms refused (`V_MUL_F16`, `V_PK_MUL_F16`, `V_CVT_F16_F32`); `uploads_start_from_each_subresources_state` and `test_title_draws_with_a_root_signature_under_the_debug_layer` lack the debug layer; `pso_measurement_compiles_an_exact_synthetic_record` needs Developer Mode to disable the driver cache; `heap_window_out_of_memory_falls_back_to_the_switch_form` lacks heap windows. **Regression run** Clean main (`cbc296ab65a2`), 60 seconds: ``` xcl-smoke v1 commit: cbc296ab65a2661a61e3e2da109134bcd5319f60 gpu: NVIDIA GeForce RTX 3070 title: 31c4c1c4 seconds: 60 exit: 0x0 frames shown: 552 (PresentX 553) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 10774 MB ``` Clean PR head (`a8561bdaf770`), same title and time: ``` xcl-smoke v1 commit: a8561bdaf770bb03bf8c88ec866a948b6fe259d6 gpu: NVIDIA GeForce RTX 3070 title: 31c4c1c4 seconds: 60 exit: 0x0 frames shown: 1070 (PresentX 1070) presents per 2 s (last 3): 59 60 60 device removals: 0 crashes: 0 peak commit: 10319 MB ``` **Not tested** - AMD and wave64 hardware; the skipped cases above. - The title run checks regression only: it does not print disassembly. The cold DXIL cache was not measured separately. - Invalid EXP targets, and VOP3-encoded interpolation. LLVM gfx10 has no VINTRP corpus; those cases use the issue and operand forms. **AI use** - Original code/tests/description: Claude Code / Claude Sonnet 5.5; prerequisite #687 retains its Claude Opus 5.5 credit. - Rebase/conflict resolution, validation and this update: Codex (GPT-6 family; exact model identifier was not supplied).
The decoder has the neg / abs, op_sel, op_sel_hi, neg_lo / neg_hi, clamp
and omod fields, but format() left them out, so a listing showed a
different instruction from the one that runs (#664).

Print them as LLVM does: neg / abs on the sources (also FMA_MIX's
NEG / NEG_HI), then op_sel, op_sel_hi (when not the default), neg_lo,
neg_hi, clamp, mul:2 / mul:4 / div:2. VOP3 op_sel only where LLVM's
gfx10 has it (16-bit operands, alignbit / alignbyte, permlane16's
fetch-inactive / bound_ctrl); nothing on v_nop, whose unused bits carry
the shader hash.

The new test compares the modifier words of all 6487 VOP3-encoded lines
of tests/data/llvm-amdgpu with LLVM's: 907 have modifiers, all 907
differed before, none now. The text is also in the translated HLSL's
comments, so the DXIL cache misses once.

Part of #664.

Assisted-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
format() printed an `exp` as bare VGPR numbers and a VINTRP attribute as an SGPR
(`v_interp_p1_f32 v54, v84, s5`). Print them as LLVM does: `exp param7, off, v121, off,
v178 done compr vm` (target name, `off` for a source whose EN bit is clear, COMPR slots 0 / 1
from VSRC0 and 2 / 3 from VSRC1, then done / compr / vm), and `attr5.w` for the attribute and
channel, `p10` / `p20` / `p0` for v_interp_mov_f32's parameter.

The new test compares all 16 `exp` lines of tests/data/llvm-amdgpu/gfx10_exp.txt with LLVM's
text, plus the two words from the issue. The text also appears in the translated HLSL's
comments, so the DXIL cache misses once.

Part of #664 (part 3; SMEM glc / dlc is separate).

Assisted-by: Claude Code (Claude Sonnet 5.5)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:30:03 +00:00
Author
Owner

@⁠milas6669 on GitHub · 2026-11-24 03:56 UTC · original

Stacked on #687: the diff on GitHub shows both commits until #687 merges; only the top one (5525cf2) is part 3.

**@⁠milas6669** on GitHub · 2026-11-24 03:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/706#issuecomment-7121563148) Stacked on #687: the diff on GitHub shows both commits until #687 merges; only the top one (5525cf2) is part 3.
Author
Owner

@⁠lordon1a on GitHub · 2026-11-24 04:07 UTC · original

Independent test report on 5525cf2:

Tested

  • Hardware: NVIDIA GeForce RTX 3070 Ti Laptop GPU (driver 616.64, SM 6.6), Intel i7-12700H, Windows 11 Home 26H2 (build 26200), rustc 1.100.0 (x86_64-pc-windows-gnullvm), debug build
  • Command: cargo test -p xcl --lib gpu::rdna2::tests -- --nocapture
  • Result: 14 passed, 0 failed, 0 ignored in 0.27s (vintrp_attribute_and_channel and export_target tests ok)

Not tested

  • AMD / Intel GPU, retail title

AI use

  • Antigravity (Google DeepMind agent) — fetched 5525cf2 in a detached worktree, audited the diff, ran the test suite, and posted this report.
**@⁠lordon1a** on GitHub · 2026-11-24 04:07 UTC · [original](https://github.com/xcl-dev/xcl/pull/706#issuecomment-7121732894) Independent test report on `5525cf2`: **Tested** - Hardware: NVIDIA GeForce RTX 3070 Ti Laptop GPU (driver `616.64`, SM 6.6), Intel i7-12700H, Windows 11 Home 26H2 (build 26200), `rustc 1.100.0` (`x86_64-pc-windows-gnullvm`), debug build - Command: `cargo test -p xcl --lib gpu::rdna2::tests -- --nocapture` - Result: **14 passed, 0 failed, 0 ignored** in `0.27s` (`vintrp_attribute_and_channel` and `export_target` tests ok) **Not tested** - AMD / Intel GPU, retail title **AI use** - Antigravity (Google DeepMind agent) — fetched `5525cf2` in a detached worktree, audited the diff, ran the test suite, and posted this report.
Author
Owner

@⁠MesshM on GitHub · 2026-11-24 04:07 UTC · original

Test run of 5525cf242e0437a9f2ab75fe18afd2e7fb0c6bb4 on AMD RDNA4. I merged it onto current main f4ce27c locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 706 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 665 passed, 0 failed, 21 ignored
  • 0 SKIPPED; vintrp_attribute_and_channel and the other rdna2 tests pass.

Review: Disassembler text only; no translation path changes. I did not compare every EXP target name against LLVM's list.

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 onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

**@⁠MesshM** on GitHub · 2026-11-24 04:07 UTC · [original](https://github.com/xcl-dev/xcl/pull/706#issuecomment-7121735975) Test run of `5525cf242e0437a9f2ab75fe18afd2e7fb0c6bb4` on AMD RDNA4. I merged it onto current `main` `f4ce27c` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **706 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 665 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; `vintrp_attribute_and_channel` and the other `rdna2` tests pass. **Review:** Disassembler text only; no translation path changes. I did not compare every EXP target name against LLVM's list. **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 onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 01:12 UTC · original

Both AMD (RX 9060 XT) and NVIDIA (RTX 3070 Ti) verification look solid on 5525cf2. Please rebase onto main (and after #687 if still stacked) to clear the rdna2.rs conflict and run Build and test (Windows, no GPU).

**@⁠raylitebull** on GitHub · 2026-11-25 01:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/706#issuecomment-7149308397) Both AMD (RX 9060 XT) and NVIDIA (RTX 3070 Ti) verification look solid on `5525cf2`. Please rebase onto `main` (and after `#687` if still stacked) to clear the `rdna2.rs` conflict and run `Build and test (Windows, no GPU)`.
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 06:10 UTC · original

Empirical test report (a8561bda)

Verified PR #706 at detached head a8561bdaf770bb03bf8c88ec866a948b6fe259d6.

Hardware / environment

  • Windows x64 build 26200, AMD CPU (family 23, model 113, stepping 0), unoptimized Cargo test profile with debug info and incremental compilation disabled.
  • rustc --version returned rustc 1.100.0 (0ef1bc386 2026-11-09). dxc.exe --version reported dxcompiler.dll version 1.9.2609.5 (01b62ad47).
  • The two focused unit tests exercise the CPU decoder and formatter with XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1. Both Cargo steps ran outside Invoke-ArcTest.ps1, with zero Arc GPU mutex hold.

Commands and results

  • cargo test --workspace --no-run compiled the workspace test targets and exited 0.
  • cargo test -p xcl --lib gpu::rdna2::tests::exp_text_matches_llvm -- --exact --nocapture exited 0 with 1 passed, 0 failed, and 0 ignored.
  • cargo test -p xcl --lib gpu::rdna2::tests::vintrp_attribute_and_channel -- --exact --nocapture exited 0 with 1 passed, 0 failed, and 0 ignored.
  • Focused total from the log was 2 passed, 0 failed, 0 ignored, and 0 skipped. The workspace compile ran no tests.

Observed behavior

  • EXP output matched all 16 LLVM gfx10 fixture lines. The compressed issue #664 sample produced exp param7, off, v121, off, v178 done compr vm.
  • VINTRP rendered attr5.w for the issue sample, p20, attr2.y for the encoded MOV case, and attr32.x for the encoded P2 case.

Not tested

The full GPU workspace suite, CLI end-to-end tests, and game smoke runs were omitted.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr706-focused.log and published.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 06:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/706#issuecomment-7154520009) ### Empirical test report (a8561bda) Verified PR #706 at detached head `a8561bdaf770bb03bf8c88ec866a948b6fe259d6`. **Hardware / environment** - Windows x64 build 26200, AMD CPU (family 23, model 113, stepping 0), unoptimized Cargo test profile with debug info and incremental compilation disabled. - `rustc --version` returned `rustc 1.100.0 (0ef1bc386 2026-11-09)`. `dxc.exe --version` reported `dxcompiler.dll` version `1.9.2609.5 (01b62ad47)`. - The two focused unit tests exercise the CPU decoder and formatter with `XCL_ADAPTER=NONE_CPU_ONLY` and `RUST_TEST_NOCAPTURE=1`. Both Cargo steps ran outside `Invoke-ArcTest.ps1`, with zero Arc GPU mutex hold. **Commands and results** - `cargo test --workspace --no-run` compiled the workspace test targets and exited 0. - `cargo test -p xcl --lib gpu::rdna2::tests::exp_text_matches_llvm -- --exact --nocapture` exited 0 with 1 passed, 0 failed, and 0 ignored. - `cargo test -p xcl --lib gpu::rdna2::tests::vintrp_attribute_and_channel -- --exact --nocapture` exited 0 with 1 passed, 0 failed, and 0 ignored. - Focused total from the log was 2 passed, 0 failed, 0 ignored, and 0 skipped. The workspace compile ran no tests. **Observed behavior** - EXP output matched all 16 LLVM gfx10 fixture lines. The compressed issue #664 sample produced `exp param7, off, v121, off, v178 done compr vm`. - VINTRP rendered `attr5.w` for the issue sample, `p20, attr2.y` for the encoded MOV case, and `attr32.x` for the encoded P2 case. **Not tested** The full GPU workspace suite, CLI end-to-end tests, and game smoke runs were omitted. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr706-focused.log and published.
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-25 06:50 UTC · original

Independent Windows check of exact stacked PR head a8561bdaf770bb03bf8c88ec866a948b6fe259d6, prompted by the current-head report request in #1607.

Tested

  • Windows 11 build 26200; Ryzen 9 5980HX; RX 6800M driver 30.0.13002.13003; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5. These decoder/formatter tests run on the CPU; they do not exercise the GPU.
  • XCL_REQUIRE_GPU=0, XCL_DIRECT_DXIL=0; cargo test --locked -p xcl --lib -j 2 gpu::rdna2::tests -- --test-threads=1 --show-output: 22 passed, 0 failed, 0 ignored; 0 SKIPPED. Both added tests, exp_text_matches_llvm and vintrp_attribute_and_channel, passed. The VOP3/VOP3P tests inherited from #687 also passed, with the LLVM gfx10 VOP3 fixture reporting 6,487 instructions, 907 with modifiers, 0 differences.

This is an exact-head focused test of the stacked tree. I did not run the full GPU workspace suite, the CLI disassembler end to end, or a title smoke comparison for this PR.

AI-assisted checkout, testing, log verification, and report drafting with OpenAI Codex (GPT-6). No game data was used.

**@⁠luckyteagirl** on GitHub · 2026-11-25 06:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/706#issuecomment-7155216097) Independent Windows check of exact stacked PR head `a8561bdaf770bb03bf8c88ec866a948b6fe259d6`, prompted by the current-head report request in #1607. **Tested** - Windows 11 build 26200; Ryzen 9 5980HX; RX 6800M driver `30.0.13002.13003`; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5. These decoder/formatter tests run on the CPU; they do not exercise the GPU. - `XCL_REQUIRE_GPU=0`, `XCL_DIRECT_DXIL=0`; `cargo test --locked -p xcl --lib -j 2 gpu::rdna2::tests -- --test-threads=1 --show-output`: **22 passed, 0 failed, 0 ignored; 0 SKIPPED**. Both added tests, `exp_text_matches_llvm` and `vintrp_attribute_and_channel`, passed. The VOP3/VOP3P tests inherited from #687 also passed, with the LLVM gfx10 VOP3 fixture reporting **6,487 instructions, 907 with modifiers, 0 differences**. This is an exact-head focused test of the stacked tree. I did not run the full GPU workspace suite, the CLI disassembler end to end, or a title smoke comparison for this PR. AI-assisted checkout, testing, log verification, and report drafting with OpenAI Codex (GPT-6). No game data was used.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 11:54 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!

**@⁠DavidM1911** on GitHub · 2026-11-25 11:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/706#issuecomment-7161661924) 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!
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/706/head:github-bot/gh-706'
git switch 'github-bot/gh-706'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-706'
git switch 'github-bot/gh-706'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-706'
git switch 'github-bot/gh-706'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-706'
git switch 'main'
git merge --squash 'github-bot/gh-706'
git switch 'main'
git merge --ff-only 'github-bot/gh-706'
git switch 'main'
git merge 'github-bot/gh-706'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.