Tests: RDNA2 decoder lengths, literals, encoder and tables #858

Open
github-bot wants to merge 1 commit from github-bot/gh-858 into main AGit
Owner

@⁠mastrr9 on GitHub · 2026-11-24 06:59 UTC · original
mastrr9:tests/rdna2-decode → main · +460 −0 · 1 files · 1 commits · open

Adds a test-only suite (crates/xcl/tests/rdna2_decode.rs) exercising xcl::gpu::rdna2 instruction decoding, operand tables, literals, and encode/decode round-trips without needing game shader blobs:

  • Table invariants, encoding lengths, literal dword handling, and register/operand decoding across RDNA2 encodings
  • encode / decode round-trip verification and disassemble / find_programs coverage

Tested

  • Hardware/OS: NVIDIA RTX 5080 (driver 617.42 / 32.0.16.1742), Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC debug, DXC Windows SDK 10.0.26100.0, d3d12SDKLayers.dll installed
  • Commit tested: 0e0aba99a460dc0d1bf410b3b8b47d1e4e26a87b
  • cargo build --workspace: clean (no new warnings; only pre-existing fetch_update deprecation warning)
  • cargo test --workspace -- --test-threads=4: 722 passed, 0 failed, 41 ignored (rdna2_decode: 9 passed, 0 failed, 0 ignored)
  • SKIPPED GPU tests: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64

Not tested

  • Test-only diff (crates/xcl/tests/rdna2_decode.rs); no runtime code changed and no retail title run performed.

AI use

  • Authored with Claude Code (Claude Opus 5.5); reviewed, audited (removed an #[ignore] test to comply with CONTRIBUTING.md), and verified on native Windows/RTX 5080 hardware with Antigravity (Gemini 4 Neon + Claude Sonnet 5.5).
**@⁠mastrr9** on GitHub · 2026-11-24 06:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/858) `mastrr9:tests/rdna2-decode` → `main` · +460 −0 · 1 files · 1 commits · open Adds a test-only suite (`crates/xcl/tests/rdna2_decode.rs`) exercising `xcl::gpu::rdna2` instruction decoding, operand tables, literals, and `encode`/`decode` round-trips without needing game shader blobs: - Table invariants, encoding lengths, literal dword handling, and register/operand decoding across RDNA2 encodings - `encode` / `decode` round-trip verification and `disassemble` / `find_programs` coverage **Tested** - Hardware/OS: NVIDIA RTX 5080 (driver `617.42` / `32.0.16.1742`), Windows 11 Pro 25H2 (`26200.9974`), `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC debug, DXC Windows SDK `10.0.26100.0`, `d3d12SDKLayers.dll` installed - Commit tested: `0e0aba99a460dc0d1bf410b3b8b47d1e4e26a87b` - `cargo build --workspace`: clean (no new warnings; only pre-existing `fetch_update` deprecation warning) - `cargo test --workspace -- --test-threads=4`: **722 passed, 0 failed, 41 ignored** (`rdna2_decode`: 9 passed, 0 failed, 0 ignored) - `SKIPPED` GPU tests: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64` **Not tested** - Test-only diff (`crates/xcl/tests/rdna2_decode.rs`); no runtime code changed and no retail title run performed. **AI use** - Authored with Claude Code (Claude Opus 5.5); reviewed, audited (removed an `#[ignore]` test to comply with `CONTRIBUTING.md`), and verified on native Windows/RTX 5080 hardware with Antigravity (Gemini 4 Neon + Claude Sonnet 5.5).
Hand-assemble at least one instruction per RDNA2 encoding class from
the ISA guide's microcode formats and check decode's name, encoding,
length and literal for each, the literal rules, encode producing the
same bytes, unassigned opcodes decoding as Unknown, the instruction
table round-tripping through encode and decode, and that truncated or
random input never panics. No assertions on disassembly text.

s_endpgm splits one program in two.

Assisted-by: Claude Code (Claude Opus 5.5)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:34:44 +00:00
Author
Owner

@⁠SlopTart on GitHub · 2026-11-24 08:09 UTC · original

Linux / AMD RDNA3 datapoint.

Merged state: head 0e0aba9 onto main 1ec4c98, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 714 passed, 10 failed, 41 ignored. Failures = the known Wine-lane set from my #42 rows plus #718 trio members and a hit of gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes (new flake, see #718 addendum). RDNA2 decoder length/literal/encoder/table tests green on this AMD host (714 passed).

Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross x86_64-pc-windows-gnu, XCL_NETWORK=0, release profile, --test-threads=4. My Linux rows: #42 / #718.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

**@⁠SlopTart** on GitHub · 2026-11-24 08:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/858#issuecomment-7125792762) Linux / AMD RDNA3 datapoint. **Merged state:** head `0e0aba9` onto main `1ec4c98`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **714 passed, 10 failed, 41 ignored**. Failures = the known Wine-lane set from my #42 rows plus #718 trio members and a hit of `gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes` (new flake, see #718 addendum). RDNA2 decoder length/literal/encoder/table tests green on this AMD host (714 passed). **Not tested:** retail titles (none here), Windows, RDNA4. Counts only, no game data. **Machine:** RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross `x86_64-pc-windows-gnu`, `XCL_NETWORK=0`, release profile, `--test-threads=4`. My Linux rows: #42 / #718. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 05:57 UTC · original

Empirical test report (e788bd36)

Hardware / environment

  • Clean detached checkout at e788bd364a435b447c97c5563aa98d12d27ae7a9 (PR #858).
  • Windows x64, build 26200, on AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD.
  • rustc 1.100.0 (0ef1bc386 2026-11-09), host x86_64-pc-windows-msvc.
  • DXC reported dxcompiler.dll: 1.9(5512-01b62ad4)(1.9.2609.5) - 1.9.2609.5 (01b62ad47).
  • Unoptimized Rust test profile with incremental compilation and debug info disabled. The focused run used XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1. Both commands ran directly, outside Invoke-ArcTest.ps1, with no Arc GPU mutex held.

Commands and results

  • cargo test --workspace --no-run exited 0 and built the workspace test executables, including rdna2_decode.
  • cargo test -p xcl --test rdna2_decode -- --nocapture exited 0. The harness reported 9 passed, 0 failed, 0 ignored, and 0 filtered out in 0.20 s. The captured log contained 0 lines starting with SKIPPED .
  • Cargo emitted a deprecated AtomicU32::fetch_update warning in hle/xgameruntime/mod.rs.

Observed behavior

  • The PR adds one integration target. All nine tests ran against the CPU-side RDNA2 decoder, encoder, disassembler, or instruction tables using in-memory data.
  • The assertions passed for 70 hand-assembled decoder cases, including instruction lengths, literal dwords, SDWA/DPP extensions, and MIMG NSA lengths. Selected encoder outputs matched the expected bytes, and the instruction table round-trip and uniqueness checks passed.
  • The suite also passed its checks for unknown opcodes, truncated prefixes, deterministic random input, signed branch targets, instruction boundaries, and program splitting at S_ENDPGM.

Not tested

The full GPU workspace suite 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 pr858-focused.log and published.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 05:57 UTC · [original](https://github.com/xcl-dev/xcl/pull/858#issuecomment-7154296029) ### Empirical test report (e788bd36) **Hardware / environment** - Clean detached checkout at `e788bd364a435b447c97c5563aa98d12d27ae7a9` (PR #858). - Windows x64, build 26200, on `AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD`. - `rustc 1.100.0 (0ef1bc386 2026-11-09)`, host `x86_64-pc-windows-msvc`. - DXC reported `dxcompiler.dll: 1.9(5512-01b62ad4)(1.9.2609.5) - 1.9.2609.5 (01b62ad47)`. - Unoptimized Rust test profile with incremental compilation and debug info disabled. The focused run used `XCL_ADAPTER=NONE_CPU_ONLY` and `RUST_TEST_NOCAPTURE=1`. Both commands ran directly, outside `Invoke-ArcTest.ps1`, with no Arc GPU mutex held. **Commands and results** - `cargo test --workspace --no-run` exited 0 and built the workspace test executables, including `rdna2_decode`. - `cargo test -p xcl --test rdna2_decode -- --nocapture` exited 0. The harness reported 9 passed, 0 failed, 0 ignored, and 0 filtered out in 0.20 s. The captured log contained 0 lines starting with `SKIPPED `. - Cargo emitted a deprecated `AtomicU32::fetch_update` warning in `hle/xgameruntime/mod.rs`. **Observed behavior** - The PR adds one integration target. All nine tests ran against the CPU-side RDNA2 decoder, encoder, disassembler, or instruction tables using in-memory data. - The assertions passed for 70 hand-assembled decoder cases, including instruction lengths, literal dwords, SDWA/DPP extensions, and MIMG NSA lengths. Selected encoder outputs matched the expected bytes, and the instruction table round-trip and uniqueness checks passed. - The suite also passed its checks for unknown opcodes, truncated prefixes, deterministic random input, signed branch targets, instruction boundaries, and program splitting at `S_ENDPGM`. **Not tested** The full GPU workspace suite 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 `pr858-focused.log` and published.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 10:15 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 10:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/858#issuecomment-7159451622) 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/858/head:github-bot/gh-858'
git switch 'github-bot/gh-858'

Merge

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