Recompiler: decode RDNA2 instructions without hashing or scratch Vecs #1377

Merged
mastrr9 merged 1 commit from upstream-pr/1387 into main 2026-11-30 02:39:17 +00:00
mastrr9 commented 2026-11-24 15:31:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by mastrr9 on 2026-11-24T15:31:10Z.


Targets #1269 (shader translation / compilation speed).

What changed

rdna2::decode runs once or more for every console instruction during shader translation (and across every instruction of a pack in xcl shaders). Previously it spent ~1,850 CPU instructions per decoded instruction on a bit-by-bit field extraction loop, two scratch Vec heap allocations per call, and SipHash (encoding, opcode) table lookups.

  • bits() now reads fields up to 32 bits in a single shift across up to two dwords (keeping the loop for wider widths); field_value in the emitter benefits too.
  • Opcode lookup tables are now flat Vecs indexed by (encoding, opcode) filled in identical priority order.
  • Primary instruction dwords stay on the stack ([u32; 2]) instead of allocating scratch Vecs.
  • Unit tests keep the original decoder as a reference and compare every decoded field (or identical error) across the LLVM gfx10 corpus cut at every length, every encoding/instruction with random operand bits, SDWA/DPP/literal/short buffers, and 100,000 random instructions.

Benchmark (bench_decode, release, median of 7)

  • Windows 11 / RTX 5080 host (cargo test -p xcl --release --lib rdna2::tests::bench_decode -- --ignored --nocapture): 54 ns / instruction across 23,812 LLVM corpus instructions (~1.7–2× faster decode vs ~112 ns baseline).

Tested

  • Windows 11 x64, NVIDIA GeForce RTX 5080, DXC 1.9.2602.17, Rust MSVC, head 2159c3bb7750e25f57e17adb81584bf628d16c72 on main 930e8b4:
    • cargo build --workspace: 0 new compiler warnings
    • cargo test --workspace -- --test-threads=4: 753 passed / 0 failed / 42 ignored
    • cargo test -p xcl --release --lib rdna2::tests::bench_decode -- --ignored --nocapture: passed (23812 instructions, ns per instruction (median of 7): decode 54)

Regression run
Smoke run by @LocranKing in comment below: https://github.com/xcl-dev/xcl/pull/1387#issuecomment-7139613745
Contributed by a community tester; the PR author did not run it. Both blocks are pasted as posted.

main:

xcl-smoke v1
commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1508 (PresentX 1508)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14730 MB

PR:

xcl-smoke v1
commit: 2159c3bb7750e25f57e17adb81584bf628d16c72
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1571 (PresentX 1571)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14712 MB

Tester's setup: Windows 11 Home Build 26200, AMD Ryzen 5 5500, 31.8 GB RAM, NVIDIA GeForce RTX 3060 Ti (8024 MiB VRAM, driver 32.0.16.2101), rustc 1.100.0 (x86_64-pc-windows-msvc, MSVC 14.44.35207), DXC 1.9.2602.17 (SDK 10.0.26100.0), --release

Tester's AI use: Antigravity (Gemini 4 Neon) ran the build, tests, and smoke runs and drafted this report from the command outputs.

Not tested

  • Whether the community regression run reaches the changed code; play past its 60 s.
  • AMD / Linux (Wine) hosts.

AI use

  • Claude Code (Claude Opus 5.5) drafted the optimization and tests; T3 Code (Gemini 4 Neon + Claude Sonnet 5.5) verified the build, full workspace test suite, and release benchmark on our Windows 11 / RTX 5080 PC.
  • Claude Code (Claude Sonnet 5.5) added the community regression run to this description and updated the lines that it made out of date or that the PR check requires.
<!-- greyfinch-sync:ivall/xcl:issue:5475209716 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1387). Originally posted by [mastrr9](https://github.com/mastrr9) on 2026-11-24T15:31:10Z. --- Targets #1269 (shader translation / compilation speed). ### What changed `rdna2::decode` runs once or more for every console instruction during shader translation (and across every instruction of a pack in `xcl shaders`). Previously it spent ~1,850 CPU instructions per decoded instruction on a bit-by-bit field extraction loop, two scratch `Vec` heap allocations per call, and SipHash `(encoding, opcode)` table lookups. - `bits()` now reads fields up to 32 bits in a single shift across up to two dwords (keeping the loop for wider widths); `field_value` in the emitter benefits too. - Opcode lookup tables are now flat `Vec`s indexed by `(encoding, opcode)` filled in identical priority order. - Primary instruction dwords stay on the stack (`[u32; 2]`) instead of allocating scratch `Vec`s. - Unit tests keep the original decoder as a reference and compare every decoded field (or identical error) across the LLVM gfx10 corpus cut at every length, every encoding/instruction with random operand bits, SDWA/DPP/literal/short buffers, and 100,000 random instructions. ### Benchmark (`bench_decode`, release, median of 7) - Windows 11 / RTX 5080 host (`cargo test -p xcl --release --lib rdna2::tests::bench_decode -- --ignored --nocapture`): **54 ns / instruction** across 23,812 LLVM corpus instructions (~1.7–2× faster decode vs ~112 ns baseline). **Tested** - Windows 11 x64, NVIDIA GeForce RTX 5080, DXC 1.9.2602.17, Rust MSVC, head `2159c3bb7750e25f57e17adb81584bf628d16c72` on `main` `930e8b4`: - `cargo build --workspace`: 0 new compiler warnings - `cargo test --workspace -- --test-threads=4`: **753 passed / 0 failed / 42 ignored** - `cargo test -p xcl --release --lib rdna2::tests::bench_decode -- --ignored --nocapture`: passed (`23812 instructions, ns per instruction (median of 7): decode 54`) **Regression run** Smoke run by @LocranKing in comment below: https://github.com/xcl-dev/xcl/pull/1387#issuecomment-7139613745 Contributed by a community tester; the PR author did not run it. Both blocks are pasted as posted. main: ``` xcl-smoke v1 commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7 gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1508 (PresentX 1508) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14730 MB ``` PR: ``` xcl-smoke v1 commit: 2159c3bb7750e25f57e17adb81584bf628d16c72 gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1571 (PresentX 1571) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14712 MB ``` Tester's setup: Windows 11 Home Build 26200, AMD Ryzen 5 5500, 31.8 GB RAM, NVIDIA GeForce RTX 3060 Ti (`8024 MiB VRAM`, driver `32.0.16.2101`), `rustc 1.100.0` (`x86_64-pc-windows-msvc`, MSVC `14.44.35207`), DXC `1.9.2602.17` (SDK `10.0.26100.0`), `--release` Tester's AI use: Antigravity (`Gemini 4 Neon`) ran the build, tests, and smoke runs and drafted this report from the command outputs. **Not tested** - Whether the community regression run reaches the changed code; play past its 60 s. - AMD / Linux (Wine) hosts. **AI use** - Claude Code (Claude Opus 5.5) drafted the optimization and tests; T3 Code (Gemini 4 Neon + Claude Sonnet 5.5) verified the build, full workspace test suite, and release benchmark on our Windows 11 / RTX 5080 PC. - Claude Code (Claude Sonnet 5.5) added the community regression run to this description and updated the lines that it made out of date or that the PR check requires.
Frtuchinno commented 2026-11-24 16:07:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Frtuchinno on 2026-11-24T15:50:31Z.


Test report for #1387 on an AMD host (Ryzen 5 7600, Windows): decode 123–129 → 63–65 ns per instruction; 753 passed, 0 failed, 42 ignored

This covers the "Not tested: AMD hosts" line. The speedup reproduces on Zen 4: decode is about 1.9× faster, and the other decoder functions are unchanged.

Tested

  • Head 2159c3b, baseline main 930e8b4
  • AMD Ryzen 5 7600, 32 GB RAM, AMD Radeon RX 7800 XT (driver 32.0.32029.2010), Windows 11 Pro build 26300
  • rustc 1.100.0 stable-x86_64-pc-windows-msvc, DXC 1.9.2602.17 (Windows SDK 10.0.26100.0)
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4 (debug):
    • main 930e8b4: 751 passed, 0 failed, 41 ignored, 0 SKIPPED
    • 2159c3b: 753 passed, 0 failed, 42 ignored, 0 SKIPPED; decode_matches_the_hash_map_reference and llvm_gfx10_corpus pass
  • bench_decode (release, cargo test --release -p xcl --lib rdna2::tests::bench_decode -- --ignored --nocapture). For the baseline I copied the PR's llvm_encodings, per_instruction and bench_decode unchanged into the test module of a main 930e8b4 worktree. The two test binaries were run alternately, three times each (ns per instruction, median of 7, 23 812 instructions):
    run decode main → PR sgpr_uses vgpr_uses branch_target format
    1 123 → 65 138 → 141 90 → 86 2 → 1 374 → 374
    2 123 → 64 141 → 137 91 → 89 2 → 1 366 → 366
    3 129 → 63 145 → 140 93 → 86 2 → 1 365 → 369

Not tested

  • No retail title or shader pack on this machine: no xcl shaders translation timing, no smoke run
  • Linux / Wine, Intel CPUs

AI use

  • Claude Code (Claude Opus 5.5) installed the toolchain, set up the baseline worktree, ran the commands above and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7136703326 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1387#issuecomment-7136703326). Originally posted by [Frtuchinno](https://github.com/Frtuchinno) on 2026-11-24T15:50:31Z. --- **Test report for #1387 on an AMD host (Ryzen 5 7600, Windows): `decode` 123–129 → 63–65 ns per instruction; 753 passed, 0 failed, 42 ignored** This covers the "Not tested: AMD hosts" line. The speedup reproduces on Zen 4: `decode` is about 1.9× faster, and the other decoder functions are unchanged. **Tested** - Head `2159c3b`, baseline `main` `930e8b4` - AMD Ryzen 5 7600, 32 GB RAM, AMD Radeon RX 7800 XT (driver 32.0.32029.2010), Windows 11 Pro build 26300 - rustc 1.100.0 `stable-x86_64-pc-windows-msvc`, DXC 1.9.2602.17 (Windows SDK 10.0.26100.0) - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4` (debug): - `main` `930e8b4`: 751 passed, 0 failed, 41 ignored, 0 SKIPPED - `2159c3b`: 753 passed, 0 failed, 42 ignored, 0 SKIPPED; `decode_matches_the_hash_map_reference` and `llvm_gfx10_corpus` pass - `bench_decode` (release, `cargo test --release -p xcl --lib rdna2::tests::bench_decode -- --ignored --nocapture`). For the baseline I copied the PR's `llvm_encodings`, `per_instruction` and `bench_decode` unchanged into the test module of a `main` `930e8b4` worktree. The two test binaries were run alternately, three times each (ns per instruction, median of 7, 23 812 instructions): | run | `decode` main → PR | `sgpr_uses` | `vgpr_uses` | `branch_target` | `format` | |---|---|---|---|---|---| | 1 | 123 → 65 | 138 → 141 | 90 → 86 | 2 → 1 | 374 → 374 | | 2 | 123 → 64 | 141 → 137 | 91 → 89 | 2 → 1 | 366 → 366 | | 3 | 129 → 63 | 145 → 140 | 93 → 86 | 2 → 1 | 365 → 369 | **Not tested** - No retail title or shader pack on this machine: no `xcl shaders` translation timing, no smoke run - Linux / Wine, Intel CPUs **AI use** - Claude Code (Claude Opus 5.5) installed the toolchain, set up the baseline worktree, ran the commands above and wrote this report.
ArturoWolff commented 2026-11-24 16:07:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ArturoWolff on 2026-11-24T15:51:07Z.


Tested the decoder change inside #1269’s lane_masks::analyze_code(&code, true), not just rdna2::decode in isolation. Same analyzer (gefydev/xcl 51f977a7f29171c88307f152d529bed8bcc0d468), swapping only the decoder from 930e8b49c1c2ec683d22c724a398b39111cd0e56 to 2159c3bb7750e25f57e17adb81584bf628d16c72.

Generated wave64 program Whole-analysis CPU time, base → head (median) Median within-pair CPU reduction Head faster
Branch join, 36 instructions 33.36 → 31.12 µs 6.89% 8/8 pairs
Arithmetic mixer, 6,166 instructions 4.605 → 4.359 ms 5.60% 7/8 pairs

The decoder alone used 41% and 34% less CPU time respectively. Both decoders produced identical per-instruction records and every returned analyzer field matched. The join kept all seven guard sites; the mixer needed none.

Method: Ryzen 5 5600, native Linux x86-64, rustc 1.92.0, -C opt-level=3, one codegen unit. Private CPU harness: python3 -IB measure2.py then python3 -IB stats.py; eight alternating A/B pairs, equal calls per pair, pinned to one hardware thread, warm inputs, measured process CPU time. No outliers removed; the mixer’s paired whole-analysis change ranged from 7.3% slower to 19.9% faster. This measures two generated programs, not total shader compilation or title loading. No DXC, GPU dispatch or full Windows suite in this test.

AI use: Hermes Agent (gpt-6.2-astra) prepared and ran the harness, checked outputs and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7136720005 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1387#issuecomment-7136720005). Originally posted by [ArturoWolff](https://github.com/ArturoWolff) on 2026-11-24T15:51:07Z. --- Tested the decoder change inside #1269’s `lane_masks::analyze_code(&code, true)`, not just `rdna2::decode` in isolation. Same analyzer (`gefydev/xcl` `51f977a7f29171c88307f152d529bed8bcc0d468`), swapping only the decoder from `930e8b49c1c2ec683d22c724a398b39111cd0e56` to `2159c3bb7750e25f57e17adb81584bf628d16c72`. | Generated wave64 program | Whole-analysis CPU time, base → head (median) | Median within-pair CPU reduction | Head faster | |---|---:|---:|---:| | Branch join, 36 instructions | 33.36 → 31.12 µs | 6.89% | 8/8 pairs | | Arithmetic mixer, 6,166 instructions | 4.605 → 4.359 ms | 5.60% | 7/8 pairs | The decoder alone used 41% and 34% less CPU time respectively. Both decoders produced identical per-instruction records and every returned analyzer field matched. The join kept all seven guard sites; the mixer needed none. **Method:** Ryzen 5 5600, native Linux x86-64, rustc 1.92.0, `-C opt-level=3`, one codegen unit. Private CPU harness: `python3 -IB measure2.py` then `python3 -IB stats.py`; eight alternating A/B pairs, equal calls per pair, pinned to one hardware thread, warm inputs, measured process CPU time. No outliers removed; the mixer’s paired whole-analysis change ranged from 7.3% slower to 19.9% faster. This measures two generated programs, not total shader compilation or title loading. No DXC, GPU dispatch or full Windows suite in this test. AI use: Hermes Agent (gpt-6.2-astra) prepared and ran the harness, checked outputs and wrote this report.
nnonno91 commented 2026-11-24 16:07:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-24T15:54:53Z.


Windows test report and paired decoder benchmark for 2159c3b

On the Ryzen 7 9800X3D, median decode time fell from 112.5 to 56 ns per instruction (2.01× throughput).

Tested

  • Ryzen 7 9800X3D, GeForce RTX 5090 (driver 617.42), Windows 11 25H2 (26200.9974), Rust 1.100.0 MSVC, DXC 1.8.2502.11.
  • On clean head 2159c3bb7750e25f57e17adb81584bf628d16c72, cargo build --workspace --locked and cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output passed. Cargo reported 753 passed, 0 failed, 42 ignored, including passing decoder equivalence tests and the synthetic end-to-end title. Two GPU tests reported SKIPPED for lack of native wave64 and are included in Cargo’s pass count: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware.
  • I copied only the PR’s benchmark harness into a temporary main worktree at 930e8b49c1c2ec683d22c724a398b39111cd0e56. I built each with cargo test --locked --release -p xcl --lib --no-run and ran gpu::rdna2::tests::bench_decode directly from the two compiled test binaries with --exact --ignored --nocapture --test-threads=1. Both used the same 23,812-entry LLVM gfx10 corpus. The table shows the decode median reported for each run, with the order reversed on every other pair.
Build Decode time across six runs (ns/instruction) Median
main 126, 110, 111, 114, 110, 126 112.5
PR 56, 60, 56, 56, 56, 55 56

Not tested

  • Retail-title smoke runs and end-to-end shader compilation time.

AI use

  • OpenAI Codex (GPT-6, exact model variant unavailable) ran the tests and prepared this report.
<!-- greyfinch-sync:ivall/xcl:comment:7136823178 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1387#issuecomment-7136823178). Originally posted by [nnonno91](https://github.com/nnonno91) on 2026-11-24T15:54:53Z. --- ### Windows test report and paired decoder benchmark for `2159c3b` On the Ryzen 7 9800X3D, median `decode` time fell from **112.5 to 56 ns per instruction** (2.01× throughput). **Tested** - Ryzen 7 9800X3D, GeForce RTX 5090 (driver 617.42), Windows 11 25H2 (26200.9974), Rust 1.100.0 MSVC, DXC 1.8.2502.11. - On clean head `2159c3bb7750e25f57e17adb81584bf628d16c72`, `cargo build --workspace --locked` and `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output` passed. Cargo reported **753 passed, 0 failed, 42 ignored**, including passing decoder equivalence tests and the synthetic end-to-end title. Two GPU tests reported `SKIPPED` for lack of native wave64 and are included in Cargo’s pass count: `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`. - I copied only the PR’s benchmark harness into a temporary `main` worktree at `930e8b49c1c2ec683d22c724a398b39111cd0e56`. I built each with `cargo test --locked --release -p xcl --lib --no-run` and ran `gpu::rdna2::tests::bench_decode` directly from the two compiled test binaries with `--exact --ignored --nocapture --test-threads=1`. Both used the same 23,812-entry LLVM gfx10 corpus. The table shows the `decode` median reported for each run, with the order reversed on every other pair. | Build | Decode time across six runs (ns/instruction) | Median | | --- | --- | ---: | | `main` | 126, 110, 111, 114, 110, 126 | 112.5 | | PR | 56, 60, 56, 56, 56, 55 | 56 | **Not tested** - Retail-title smoke runs and end-to-end shader compilation time. **AI use** - OpenAI Codex (GPT-6, exact model variant unavailable) ran the tests and prepared this report.
mastrr9 commented 2026-11-24 16:07:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by mastrr9 on 2026-11-24T16:04:54Z.


Huge thanks @Frtuchinno, @ArturoWolff, and @nnonno91 for the independent AMD Zen 4 (1.9x), RTX 5090 / 9800X3D (2.01x), and lane_masks verification runs!

<!-- greyfinch-sync:ivall/xcl:comment:7137087195 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1387#issuecomment-7137087195). Originally posted by [mastrr9](https://github.com/mastrr9) on 2026-11-24T16:04:54Z. --- Huge thanks @Frtuchinno, @ArturoWolff, and @nnonno91 for the independent AMD Zen 4 (1.9x), RTX 5090 / 9800X3D (2.01x), and `lane_masks` verification runs!
DavidM1911 commented 2026-11-24 17:06:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T16:55:32Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7138418461 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1387#issuecomment-7138418461). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T16:55:32Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. Thanks!
LocranKing commented 2026-11-24 18:09:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by LocranKing on 2026-11-24T17:43:32Z.


Independent Windows 11 + NVIDIA GeForce RTX 3060 Ti (8 GB, wave32) test and retail smoke report on clean head 2159c3bb7750e25f57e17adb81584bf628d16c72.

Tested

  • Commit: 2159c3bb7750e25f57e17adb81584bf628d16c72 (clean tree, merge-base 930e8b4)
  • Hardware / software: Windows 11 Home Build 26200, AMD Ryzen 5 5500, 31.8 GB RAM, NVIDIA GeForce RTX 3060 Ti (8024 MiB VRAM, driver 32.0.16.2101), rustc 1.100.0 (x86_64-pc-windows-msvc, MSVC 14.44.35207), DXC 1.9.2602.17 (SDK 10.0.26100.0), --release
  • cargo build --release --workspace: ok (exit 0)
  • cargo test --workspace --release --no-fail-fast -- --test-threads=4: 753 passed, 0 failed, 42 ignored, exit 0
    • SKIPPED (no wave64): gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware

Regression run
main baseline (b7aa9f3bd212088e0d927439284dc5ed325ce3c7):

xcl-smoke v1
commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1508 (PresentX 1508)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14730 MB

PR head (2159c3bb7750e25f57e17adb81584bf628d16c72):

xcl-smoke v1
commit: 2159c3bb7750e25f57e17adb81584bf628d16c72
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1571 (PresentX 1571)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14712 MB

Not tested: debug build, isolated decode throughput microbenchmark, AMD / native wave64 hardware, extended gameplay past 60 s.

AI use: Antigravity (Gemini 4 Neon) ran the build, tests, and smoke runs and drafted this report from the command outputs.

<!-- greyfinch-sync:ivall/xcl:comment:7139613745 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1387#issuecomment-7139613745). Originally posted by [LocranKing](https://github.com/LocranKing) on 2026-11-24T17:43:32Z. --- Independent Windows 11 + NVIDIA GeForce RTX 3060 Ti (8 GB, wave32) test and retail smoke report on clean head `2159c3bb7750e25f57e17adb81584bf628d16c72`. **Tested** - Commit: `2159c3bb7750e25f57e17adb81584bf628d16c72` (clean tree, merge-base `930e8b4`) - Hardware / software: Windows 11 Home Build 26200, AMD Ryzen 5 5500, 31.8 GB RAM, NVIDIA GeForce RTX 3060 Ti (`8024 MiB VRAM`, driver `32.0.16.2101`), `rustc 1.100.0` (`x86_64-pc-windows-msvc`, MSVC `14.44.35207`), DXC `1.9.2602.17` (SDK `10.0.26100.0`), `--release` - `cargo build --release --workspace`: ok (`exit 0`) - `cargo test --workspace --release --no-fail-fast -- --test-threads=4`: **753 passed, 0 failed, 42 ignored**, exit `0` - `SKIPPED` (`no wave64`): `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` **Regression run** `main` baseline (`b7aa9f3bd212088e0d927439284dc5ed325ce3c7`): ``` xcl-smoke v1 commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7 gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1508 (PresentX 1508) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14730 MB ``` PR head (`2159c3bb7750e25f57e17adb81584bf628d16c72`): ``` xcl-smoke v1 commit: 2159c3bb7750e25f57e17adb81584bf628d16c72 gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1571 (PresentX 1571) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14712 MB ``` **Not tested:** debug build, isolated decode throughput microbenchmark, AMD / native wave64 hardware, extended gameplay past 60 s. **AI use:** Antigravity (`Gemini 4 Neon`) ran the build, tests, and smoke runs and drafted this report from the command outputs.
Royalflamejlh commented 2026-11-24 21:08:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-24T19:16:30Z.


Linux (Wine + vkd3d-proton) + NVIDIA test of 2159c3b on main 9e3831e + #684: in a retail title the burst of pipeline creation after the loading screen starts (about 10,500 shaders parsed on the title's threads) took 2.9 to 5.1 s with it against 4.2 to 7.3 s without, shorter in 4 of 5 alternated pairs. Its tests pass under Wine.

Setup: Fedora 44 (kernel 7.2.9), Wine 11.21 Staging (Wayland driver), vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch, VKD3D_CONFIG=ignore_shared_fence. RTX 4070 12 GB (driver 615.71.09), Ryzen 9 9950X3D, 64 GB RAM. Release, cross-compiled to x86_64-pc-windows-gnu (rustc 1.98.0), DXC 1.9.2609.5, XCL_NETWORK=0. Retail title 1.0.2.1, the first-run screens completed once and no story progress. 2159c3b merged onto main 9e3831e + #684 (e56dbc3) without conflicts; main is c160d86 now. The machine was busy with other work throughout (load 6 to 16 on 32 threads), so the timings are noisier than they would be alone.

Tested

  • cargo test --release -p xcl --lib rdna2:: under Wine, on the merge: 11 passed, 0 failed, 1 ignored (the benchmark). That includes bits_match_the_bitwise_reference and decode_matches_the_hash_map_reference.
  • bench_decode under Wine, 3 runs: decode 53, 55 and 52 ns per instruction. main has no such benchmark, so I have no figure without the change here.
  • The title, 60 s runs, A pressed on the account screen at 16 to 20 s, XCL_PSO_PRELOAD=0, caches warm. The burst is timed from its 100th [SHADER] line to its 10,400th:
pair 9e3831e + #684 the same + 2159c3b
1 7.25 s 3.17 s
2 4.28 s 5.12 s
3 4.46 s 2.86 s
4 4.59 s 3.15 s
5 4.17 s 2.88 s

Four earlier runs of the same baseline tree today gave 4.28 to 4.62 s (two of them on a rebuilt copy of the same vkd3d-proton). All ten runs reached 60 s without a fault; one with the change then hung in XCL's shutdown and was ended by the harness.

  • Two cold starts with the change (the preload of #690 on, an empty DXIL cache) faulted at 4.4 and 4.7 s with an access violation in ntdll.dll under dxcompiler.dll. The machine had 7 to 10 GB of memory free before those two; 9 other cold starts with the change and 11 without had no fault, so I cannot tie them to the change.

Read

  • rdna2.rs:203 and :226: the two scratch Vecs of decode are arrays on the stack now. One allocation per instruction is left, read_words at :264 for Decoded::words (up to 5 dwords). In the thread dumps on #688 the title's threads waited for the process heap's lock inside rdna2::decode, and a DXC worker was at the same lock from an allocation of its own; I have not taken a dump with this change, but this is the allocation they would still wait on. Would a [u32; 5] with the length do for words?
  • rdna2.rs:137: the one-shift path of bits covers cnt up to 32 and reads a missing dword as 0, as the loop did. I found no field it reads differently, and the reference test agrees.

Not tested: the burst with the preload on and an empty DXIL cache (5 runs were made, 2 of them beside a test suite of ours that faulted on the same card, so they do not compare); the offline pass (xcl shaders --precompile) with and without; a quiet machine; AMD and Intel graphics.

AI use: Claude Code (Claude Fable 5.2) read the diff, built the trees, ran the tests, the benchmark and the runs, compared the logs and wrote this report.

Posted without review by a person: the account owner was away and reads replies later.

<!-- greyfinch-sync:ivall/xcl:comment:7141857205 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1387#issuecomment-7141857205). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-11-24T19:16:30Z. --- Linux (Wine + vkd3d-proton) + NVIDIA test of `2159c3b` on `main` `9e3831e` + #684: in a retail title the burst of pipeline creation after the loading screen starts (about 10,500 shaders parsed on the title's threads) took 2.9 to 5.1 s with it against 4.2 to 7.3 s without, shorter in 4 of 5 alternated pairs. Its tests pass under Wine. **Setup:** Fedora 44 (kernel 7.2.9), Wine 11.21 Staging (Wayland driver), vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch, `VKD3D_CONFIG=ignore_shared_fence`. RTX 4070 12 GB (driver 615.71.09), Ryzen 9 9950X3D, 64 GB RAM. Release, cross-compiled to `x86_64-pc-windows-gnu` (rustc 1.98.0), DXC 1.9.2609.5, `XCL_NETWORK=0`. Retail title 1.0.2.1, the first-run screens completed once and no story progress. `2159c3b` merged onto `main` `9e3831e` + #684 (`e56dbc3`) without conflicts; `main` is `c160d86` now. The machine was busy with other work throughout (load 6 to 16 on 32 threads), so the timings are noisier than they would be alone. **Tested** - `cargo test --release -p xcl --lib rdna2::` under Wine, on the merge: 11 passed, 0 failed, 1 ignored (the benchmark). That includes `bits_match_the_bitwise_reference` and `decode_matches_the_hash_map_reference`. - `bench_decode` under Wine, 3 runs: `decode` 53, 55 and 52 ns per instruction. `main` has no such benchmark, so I have no figure without the change here. - The title, 60 s runs, A pressed on the account screen at 16 to 20 s, `XCL_PSO_PRELOAD=0`, caches warm. The burst is timed from its 100th `[SHADER]` line to its 10,400th: | pair | `9e3831e` + #684 | the same + `2159c3b` | |---|---|---| | 1 | 7.25 s | 3.17 s | | 2 | 4.28 s | 5.12 s | | 3 | 4.46 s | 2.86 s | | 4 | 4.59 s | 3.15 s | | 5 | 4.17 s | 2.88 s | Four earlier runs of the same baseline tree today gave 4.28 to 4.62 s (two of them on a rebuilt copy of the same vkd3d-proton). All ten runs reached 60 s without a fault; one with the change then hung in XCL's shutdown and was ended by the harness. - Two cold starts with the change (the preload of #690 on, an empty DXIL cache) faulted at 4.4 and 4.7 s with an access violation in `ntdll.dll` under `dxcompiler.dll`. The machine had 7 to 10 GB of memory free before those two; 9 other cold starts with the change and 11 without had no fault, so I cannot tie them to the change. **Read** - `rdna2.rs:203` and `:226`: the two scratch `Vec`s of `decode` are arrays on the stack now. One allocation per instruction is left, `read_words` at `:264` for `Decoded::words` (up to 5 dwords). In the thread dumps on #688 the title's threads waited for the process heap's lock inside `rdna2::decode`, and a DXC worker was at the same lock from an allocation of its own; I have not taken a dump with this change, but this is the allocation they would still wait on. Would a `[u32; 5]` with the length do for `words`? - `rdna2.rs:137`: the one-shift path of `bits` covers `cnt` up to 32 and reads a missing dword as 0, as the loop did. I found no field it reads differently, and the reference test agrees. **Not tested:** the burst with the preload on and an empty DXIL cache (5 runs were made, 2 of them beside a test suite of ours that faulted on the same card, so they do not compare); the offline pass (`xcl shaders --precompile`) with and without; a quiet machine; AMD and Intel graphics. **AI use:** Claude Code (Claude Fable 5.2) read the diff, built the trees, ran the tests, the benchmark and the runs, compared the logs and wrote this report. Posted without review by a person: the account owner was away and reads replies later.
ClosetPie107 commented 2026-11-25 18:04:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-25T17:42:14Z.


Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head 2159c3bb7750e25f57e17adb81584bf628d16c72 (merged locally onto main 68a284a, clean merge).

Hardware & environment

  • AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1, native wave64), Ryzen 5 9600X, 30 GiB RAM, CachyOS Linux
  • Proton Experimental (experimental-11.0-20261112), vkd3d-proton master ec207194 (3.2.0) + dxil-spirv b540c8a2 + relaxed-vtable patch (-Db_ndebug=true), DXVK v3.1.1-209, DXC 1.9.2609.5, Rust x86_64-pc-windows-gnu (debug)

Tested (XCL_REQUIRE_GPU=wave64, VKD3D_CONFIG=ignore_shared_fence, --test-threads=1 --nocapture)

  • gpu::rdna2: 19 passed, 0 failed, 1 ignored (0 skipped)

Not tested

  • Full workspace test suite, release bench_decode timing, retail title smoke run, native Windows.

AI use

  • T3 Code / Antigravity (Gemini 4 Neon) merged the PR locally, ran the tests on this machine, and drafted this report.
<!-- greyfinch-sync:ivall/xcl:comment:7169880054 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1387#issuecomment-7169880054). Originally posted by [ClosetPie107](https://github.com/ClosetPie107) on 2026-11-25T17:42:14Z. --- Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head `2159c3bb7750e25f57e17adb81584bf628d16c72` (merged locally onto `main` `68a284a`, clean merge). **Hardware & environment** - AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1, native wave64), Ryzen 5 9600X, 30 GiB RAM, CachyOS Linux - Proton Experimental (`experimental-11.0-20261112`), `vkd3d-proton` `master` `ec207194` (3.2.0) + `dxil-spirv` `b540c8a2` + relaxed-vtable patch (`-Db_ndebug=true`), DXVK `v3.1.1-209`, DXC `1.9.2609.5`, Rust `x86_64-pc-windows-gnu` (debug) **Tested** (`XCL_REQUIRE_GPU=wave64`, `VKD3D_CONFIG=ignore_shared_fence`, `--test-threads=1 --nocapture`) - `gpu::rdna2`: **19 passed, 0 failed, 1 ignored** (0 skipped) **Not tested** - Full workspace test suite, release `bench_decode` timing, retail title smoke run, native Windows. **AI use** - T3 Code / Antigravity (Gemini 4 Neon) merged the PR locally, ran the tests on this machine, and drafted this report.
oni-swr commented 2026-11-27 17:02:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-27T17:02:32Z.


merge-check
base: 6089122a1c (origin/main, re-fetched before the run)
head: 2159c3bb77
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1466 passed, 1 failed, 48 ignored; failing: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, which also fails on the base (1464 passed, 1 failed, 47 ignored; the difference is the PR's 2 new tests passing plus 1 new #[ignore] benchmark). Both new tests (bits_match_the_bitwise_reference, decode_matches_the_hash_map_reference) ran and passed. SKIPPED lines are identical on base and merge (f16 / f32-conversion per-lane programs refused by the translator, one "no heap windows"); no GPU test skipped for lack of hardware. Debug profile, real GPU, no WARP.
review: none, after reading the whole diff of the merge result (one file, gpu/rdna2.rs). The indexed tables are equivalent to the hash maps: same first-instruction-wins rule, same op as u16 truncation. bits() fast path is correct for cnt <= 32 (off % 32 + cnt <= 63 in the u64 shift; dwords past the end read as 0, as before). head_words is safe because every primary encoding is 32 or 64 bits; the 96/128/160-bit ones are all non-primary. The tests compare against a copy of the old implementation on the LLVM corpus (also truncated), every encoding of every instruction, and 100k random dwords. The benchmark is #[ignore] by design, not hiding a failure.
performance: CPU only, no frame-time effect: faster instruction decode during shader translation (the PR measures it; I did not benchmark). Memory: the tables are a few KB. Nothing changes in the translated output, so no re-translation of shader caches.
verdict: safe to merge
hardware / tool and model: AMD RX 7800 XT (driver 32.0.31035.1003), Ryzen 7 5700X3D, Windows 11 build 26200, Rust stable-x86_64-pc-windows-msvc. Claude Code (Claude Sonnet 5.5). No retail-title run (not required for a merge check, per #3041).

<!-- greyfinch-sync:ivall/xcl:comment:7223958871 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1387#issuecomment-7223958871). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-27T17:02:32Z. --- merge-check base: 6089122a1c96dff16e93b6fdf04c8ed20cfb6102 (origin/main, re-fetched before the run) head: 2159c3bb7750e25f57e17adb81584bf628d16c72 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1466 passed, 1 failed, 48 ignored; failing: `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`, which also fails on the base (1464 passed, 1 failed, 47 ignored; the difference is the PR's 2 new tests passing plus 1 new `#[ignore]` benchmark). Both new tests (`bits_match_the_bitwise_reference`, `decode_matches_the_hash_map_reference`) ran and passed. SKIPPED lines are identical on base and merge (f16 / f32-conversion per-lane programs refused by the translator, one "no heap windows"); no GPU test skipped for lack of hardware. Debug profile, real GPU, no WARP. review: none, after reading the whole diff of the merge result (one file, `gpu/rdna2.rs`). The indexed tables are equivalent to the hash maps: same first-instruction-wins rule, same `op as u16` truncation. `bits()` fast path is correct for cnt <= 32 (off % 32 + cnt <= 63 in the u64 shift; dwords past the end read as 0, as before). `head_words` is safe because every primary encoding is 32 or 64 bits; the 96/128/160-bit ones are all non-primary. The tests compare against a copy of the old implementation on the LLVM corpus (also truncated), every encoding of every instruction, and 100k random dwords. The benchmark is `#[ignore]` by design, not hiding a failure. performance: CPU only, no frame-time effect: faster instruction decode during shader translation (the PR measures it; I did not benchmark). Memory: the tables are a few KB. Nothing changes in the translated output, so no re-translation of shader caches. verdict: safe to merge hardware / tool and model: AMD RX 7800 XT (driver 32.0.31035.1003), Ryzen 7 5700X3D, Windows 11 build 26200, Rust stable-x86_64-pc-windows-msvc. Claude Code (Claude Sonnet 5.5). No retail-title run (not required for a merge check, per #3041).
thehollowedone commented 2026-11-27 17:27:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-27T17:27:03Z.


merge-check
base: 6089122a1c96dff16e93b6fdf04c8ed20cfb6102 (main, checked 2026-11-27)
head: 2159c3bb7750e25f57e17adb81584bf628d16c72
merge: clean
build: cargo build --workspace -> ok in an isolated merged-tree build directory
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1,466 passed, 1 failed, 48 ignored; 25 GPU SKIPPED notices within Cargo's passing counts. The sole failure was gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk (cached_only console_mesh hit: "DXIL not compiled yet"). The same focused test failed with that error on untouched base 6089122 in my earlier current-base check. The new decode_matches_the_hash_map_reference test and the LLVM gfx10 corpus test passed.
review: none found in the merged one-file diff. The indexed opcode tables retain first-match priority; the two-dword scratch read preserves zero fill for short input; all current primary encodings are 32 or 64 bits, and decoded instructions still own their extension/literal words. The differential test covers truncation, encodings, and random instruction words.
performance: the default decode path removes per-instruction scratch allocations and hash probes, replacing field extraction up to 32 bits with constant work. Its tables are built once. I did not benchmark throughput or title frame time on this merge; existing PR reports measure decoder/startup improvements on other hardware.
verdict: safe to merge on this base and head. The one workspace failure is reproduced on the unmodified base; I found no new failure or open source finding attributable to this PR. This check did not run a retail title.
hardware / tool and model: Windows 11 build 26300, Ryzen 7 9800X3D, NVIDIA RTX 3080 Ti 12 GB / driver 621.35, Rust 1.99.1 MSVC, DXC 1.8.2502.11. Codex (GPT-6.2 Sol) ran the build/tests and reviewed the merge; Codex (GPT-6.2 Astra) independently reviewed the low-level decoder path.

<!-- greyfinch-sync:ivall/xcl:comment:7224419165 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1387#issuecomment-7224419165). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-27T17:27:03Z. --- merge-check base: [`6089122a1c96dff16e93b6fdf04c8ed20cfb6102`](https://github.com/xcl-dev/xcl/commit/6089122a1c96dff16e93b6fdf04c8ed20cfb6102) (`main`, checked 2026-11-27) head: [`2159c3bb7750e25f57e17adb81584bf628d16c72`](https://github.com/xcl-dev/xcl/commit/2159c3bb7750e25f57e17adb81584bf628d16c72) merge: clean build: `cargo build --workspace` -> ok in an isolated merged-tree build directory tests: `cargo test --workspace --no-fail-fast -- --test-threads=4` -> **1,466 passed, 1 failed, 48 ignored**; 25 GPU `SKIPPED` notices within Cargo's passing counts. The sole failure was `gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk` (`cached_only console_mesh hit: "DXIL not compiled yet"`). The same focused test failed with that error on untouched base `6089122` in [my earlier current-base check](https://github.com/xcl-dev/xcl/pull/671#issuecomment-7223888221). The new `decode_matches_the_hash_map_reference` test and the LLVM gfx10 corpus test passed. review: none found in the merged one-file diff. The indexed opcode tables retain first-match priority; the two-dword scratch read preserves zero fill for short input; all current primary encodings are 32 or 64 bits, and decoded instructions still own their extension/literal words. The differential test covers truncation, encodings, and random instruction words. performance: the default decode path removes per-instruction scratch allocations and hash probes, replacing field extraction up to 32 bits with constant work. Its tables are built once. I did not benchmark throughput or title frame time on this merge; existing PR reports measure decoder/startup improvements on other hardware. verdict: safe to merge on this base and head. The one workspace failure is reproduced on the unmodified base; I found no new failure or open source finding attributable to this PR. This check did not run a retail title. hardware / tool and model: Windows 11 build 26300, Ryzen 7 9800X3D, NVIDIA RTX 3080 Ti 12 GB / driver 621.35, Rust 1.99.1 MSVC, DXC 1.8.2502.11. Codex (GPT-6.2 Sol) ran the build/tests and reviewed the merge; Codex (GPT-6.2 Astra) independently reviewed the low-level decoder path.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1377
No description provided.