Skip to content

Recompiler: the per-lane form takes f16 converts and products from #1426 - #2182

Merged
Prime1997 merged 1 commit into
xcl-dev:mainfrom
xpatfussy69x:recompiler/per-lane-f16-rne
Nov 30, 2026
Merged

Prime1997 merged 1 commit into
xcl-dev:mainfrom
xpatfussy69x:recompiler/per-lane-f16-rne

Conversation

@xpatfussy69x

@xpatfussy69x xpatfussy69x commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Removes the DIFFERS_ON_1426 refusal list from the per-lane form (crates/xcl/src/gpu/recomp/lower.rs). It was added in 878afda while #1426's lowering still used legacyF32ToF16 for v_cvt_f16_f32, v_mul_f16 and v_pk_mul_f16; #1742 (18423c3) has since made them round to nearest even, so the list only sent programs that now translate correctly to the fallback.

What is in it

  • one commit (c3015b1): drop the refusal list in crates/xcl/src/gpu/recomp/lower.rs (13 lines removed, nothing added)

Tested

  • NVIDIA GeForce RTX 3060 12 GB (32-lane waves only), driver 32.0.16.2124; Windows NT 10.0.26300; Rust 1.100.0; debug; DXC 1.9.2609.5
  • head c3015b1 (on main 568e7db), no uncommitted changes
  • cargo test --workspace -- --test-threads=4: 1154 passed, 0 failed, 46 ignored (same counts as main 568e7db on this machine)
  • SKIPPED GPU tests on this adapter: 24 on main → 21 here. The three "wave32, per-lane form: refused (… its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)" cases – f16_programs_on_the_gpu (f16 arithmetic, f16 packed) and f32_programs_on_the_gpu (f32 conversions) – now run and match the HLSL path. The remaining skips are 20 × "no wave64" and 1 × "no heap windows".

Regression run
Run by Anon64 on a retail title (RTX 3060 12 GB, Windows 11, release, 60 s, default settings): their comment. No device removal or crash; frames 102 % of main's, peak commit 100 %. siam4201 ran a 30 s pair on an RTX 5070 Ti with the same outcome (their comment). The per-lane form is only used with XCL_PER_LANE=1 (with XCL_DIRECT_DXIL=1), off by default, so these are regression checks of the default path.

main:

xcl-smoke v1
commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1454 (PresentX 1454)
presents per 2 s (last 3): 17 1 2
device removals: 0
crashes: 0
peak commit: 25606 MB

PR:

xcl-smoke v1
commit: c3015b19ad82247000fc0831e8cabd53dae1ee03
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1480 (PresentX 1480)
presents per 2 s (last 3): 23 9 5
device removals: 0
crashes: 0
peak commit: 25671 MB

Not tested

  • the full suite on AMD / native wave64 (luckyteagirl ran f16_programs_on_the_gpu and f32_programs_on_the_gpu on an RX 6800M with XCL_DIRECT_DXIL=1: both pass, no SKIPPED – their comment)
  • XCL_PER_LANE=1 at runtime on a title

AI use

  • Claude (Claude Opus 5.5): found the stale refusal, wrote the change, the scripts that ran the tests on my PC, and this description. I ran the tests and checked the results.

🤖 Generated with Claude Code

…l-dev#1426

DIFFERS_ON_1426 refused v_cvt_f16_f32, v_mul_f16 and v_pk_mul_f16 because
xcl-dev#1426's lowering rounded them toward zero (legacyF32ToF16). 18423c3 (xcl-dev#1742)
made them round to nearest even, so the refusal only sent those programs to
the fallback. f16_programs_on_the_gpu / f32_programs_on_the_gpu now run the
per-lane form for them and match the HLSL path on a 32-lane GPU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bph9DWs1uop8mppbbvYfu9
@luckyteagirl

Copy link
Copy Markdown
Contributor

Independent RX 6800M check on exact head c3015b19ad82247000fc0831e8cabd53dae1ee03 (base 568e7db7729c8fa6c8f0f4b32d798faaf11462bb). The detached worktree was clean.

Environment: Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M (RDNA2, native wave64), driver 30.0.13002.13003; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5. I set XCL_ADAPTER=6800M, XCL_REQUIRE_GPU=wave64, XCL_DIRECT_DXIL=1, and the matching XCL_DXC_DIR.

Commands and results:

  • cargo test --locked -p xcl --lib -j 2 f16_programs_on_the_gpu -- --test-threads=1 --show-output: 1 passed, 0 failed, 0 ignored.
  • cargo test --locked -p xcl --lib -j 2 f32_programs_on_the_gpu -- --test-threads=1 --show-output: 1 passed, 0 failed, 0 ignored.

Neither log contains SKIPPED. The shared test loop executes wave32 and native wave64 when both are supported, so the f16 arithmetic/packed and f32 conversion subcases reached the GPU instead of taking the old per-lane refusal path. The HLSL comparison program in these tests is compiled with -Gis, as the test source specifies; this report should not be read as a default-HLSL backend comparison.

Scope: Focused debug-build tests only. I did not run the full workspace suite, compare with main on this branch, or perform a retail-title smoke run with XCL_PER_LANE=1.

AI use: OpenAI Codex ran the tests, inspected the test's wave-width and HLSL-reference branches, checked the logs and exact revision, and prepared this report.

@Anon64

Anon64 commented Nov 25, 2026

Copy link
Copy Markdown

Regression run for this PR, on a retail title, from scripts/smoke.ps1 as printed. 60 s, release, default settings, A pressed every 4 s from 20 s. RTX 3060 12 GB, Windows 11.

main:

xcl-smoke v1
commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1454 (PresentX 1454)
presents per 2 s (last 3): 17 1 2
device removals: 0
crashes: 0
peak commit: 25606 MB

this PR:

xcl-smoke v1
commit: c3015b19ad82247000fc0831e8cabd53dae1ee03
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1480 (PresentX 1480)
presents per 2 s (last 3): 23 9 5
device removals: 0
crashes: 0
peak commit: 25671 MB

No device removal or crash. Frames are 102 % of main's, and peak commit is 100 % of main's. The run does not show whether the title reaches the per-lane form on 32-lane hardware, so this is a regression check only.

AI use: Claude Code (Claude Opus 5.5) ran both builds and wrote this report.

@siam4201

Copy link
Copy Markdown
Contributor

Tested on NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.2101, Ryzen 9 7900X, Rust 1.97.1):

Tested (.\scripts\test.ps1)

  • main (568e7db): 1094 passed, 4 failed (fuzz_validate_and_gpu_0..3, pre-existing E_OUTOFMEMORY DXIL GPU fuzz tests reproducibly fail with E_OUTOFMEMORY on RTX 5060 #1905), 26 ignored; skipped: 14 no wave64 + 3 per-lane form: refused (V_CVT_F16_F32, V_PK_MUL_F16, V_MUL_F16)
  • pr-2182 (c3015b1): 1094 passed, 4 failed (same pre-existing fuzz_validate_and_gpu_0..3), 26 ignored; skipped: 14 no wave64 (all 3 f16 per-lane tests now run and pass)

Regression run (.\scripts\smoke.ps1, 30s)

main:

xcl-smoke v1
commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb
gpu: NVIDIA GeForce RTX 5070 Ti
title: 9cc6a39e
seconds: 30
exit: 0x0
frames shown: 740 (PresentX 740)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15434 MB

pr-2182:

xcl-smoke v1
commit: c3015b19ad82247000fc0831e8cabd53dae1ee03
gpu: NVIDIA GeForce RTX 5070 Ti
title: 9cc6a39e
seconds: 30
exit: 0x0
frames shown: 744 (PresentX 744)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14727 MB

Not tested

  • Not tested on AMD RDNA / wave64 GPUs

AI use

  • Antigravity (Gemini 4 Neon)

@Victorbriez

Copy link
Copy Markdown

RTX 3070 check of this PR merged into current main: the three refused per-lane cases now run and pass, nothing else changes.

Tested

  • NVIDIA GeForce RTX 3070 8 GB (32-lane waves only), driver 621.24 (32.0.16.2124); AMD Ryzen 7 5800X; 16 GB RAM
  • Windows 11 Pro 10.0.26300.9974; Rust 1.100.0 (stable-x86_64-pc-windows-msvc); debug build; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0)
  • Trees: main 06c9f55 as is, and a local merge of head c3015b1 into main 06c9f55 (merges without conflicts; diff against main is the PR's 13 removed lines in crates/xcl/src/gpu/recomp/lower.rs)
  • cargo test --workspace -- --test-threads=4:
    • main 06c9f55: 1265 passed, 0 failed, 46 ignored; 27 SKIPPED
    • with this PR: 1265 passed, 0 failed, 46 ignored; 24 SKIPPED
  • The 3 skips that go away are the "wave32, per-lane form: refused (… its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)" cases: f16_programs_on_the_gpu (f16 arithmetic, f16 packed) and f32_programs_on_the_gpu (f32 conversions). Both tests pass, so these cases now match the CPU run of the lowering on this card.
  • Remaining skips with the PR: 21 × no wave64; 1 × no heap windows; 1 × pso_measurement_compiles_an_exact_synthetic_record (Developer Mode off, 0x887A002D); 1 × test_title_draws_with_a_root_signature_under_the_debug_layer (no xgameruntime.dll)

Not tested

  • No smoke run, no game: I do not have a title. XCL_PER_LANE=1 with a real title was not run
  • The PR's head c3015b1 on its own base 568e7db (only the merge into 06c9f55)
  • Release-build tests; AMD / wave64

AI use

  • Claude Code (Claude Opus 5.5) fetched and merged the PR locally, ran both test suites, read the logs and wrote this comment; the runs are on my machine.

@DavidM1911

Copy link
Copy Markdown
Contributor

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

Thanks!

@emirduran707

Copy link
Copy Markdown
Contributor

Independent AMD RDNA4 (native wave64) test report on exact head c3015b19ad82247000fc0831e8cabd53dae1ee03 (clean detached checkout, no local changes).

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64, driver 32.0.31044.16), Ryzen 5 5600, 32 GB RAM, Windows 11 Pro 26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17; tests debug, smoke release.
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1152 passed, 2 failed, 46 ignored; 2 SKIPPED (heap_window_out_of_memory_falls_back_to_the_switch_form; pso_measurement_compiles_an_exact_synthetic_record).
    • All 6 per-lane GPU cases that skip on main (gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu arithmetic/packed and f32_programs_on_the_gpu conversions, both wave32 and native wave64) ran and passed on AMD RDNA4 with zero skips.
    • The 2 failures (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 seed 722 and fuzz_validate_and_gpu_3 seed 1599) are pre-existing on unmodified main on this GPU.

Regression run (60 s retail-title smoke, XCL_NETWORK=0, release)

xcl-smoke v1
commit: c3015b19ad82247000fc0831e8cabd53dae1ee03
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1537 (PresentX 1537)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16208 MB

(Matched main 68a284a baseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)

Not tested

  • D3D12 debug layer; Intel GPUs.

AI use

  • Antigravity with Gemini 4 Neon ran the build, test suite, and smoke run and drafted this report.

@Decodere

Copy link
Copy Markdown
Contributor

Independent desktop NVIDIA verification of PR #2182 at head c3015b19ad82247000fc0831e8cabd53dae1ee03 (1 commit; exact parent & merge-base: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12, Wave32-only Ada), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Before/after per-lane GPU tests & build (568e7db7 -> c3015b19)

Command Result
Exact parent 568e7db7: cargo test --release -p xcl --lib -- f16_programs_on_the_gpu f32_programs_on_the_gpu --nocapture 2 passed; 0 failed (0.36s), with 11 SKIPPED notices: 8 no wave64 plus 3 Wave32 per-lane #1426 refusals (f16 arithmetic, f16 packed, f32 conversions)
PR #2182 c3015b19: cargo test --release -p xcl --lib f16_programs_on_the_gpu -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1123 filtered out × 3 (0.33s, 0.27s, 0.27s; 0 Wave32 per-lane refusals — both f16 arithmetic and f16 packed executed on RTX 4060 and matched HLSL; 2 no wave64 skips remain on Wave32-only Ada)
PR #2182 c3015b19: cargo test --release -p xcl --lib f32_programs_on_the_gpu -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1123 filtered out × 3 (0.40s, 0.36s, 0.36s; 0 Wave32 per-lane refusals — f32 conversions executed on RTX 4060 and matched HLSL; 6 no wave64 skips remain on Wave32-only Ada)
PR #2182 c3015b19: cargo test --release -p xcl --lib gpu::recomp::lower_dxil:: -- --test-threads=4 (3 consecutive runs) 18 passed; 0 failed; 0 ignored; 1106 filtered out × 3 (0.41s, 0.42s, 0.41s; 14 no wave64 notices across 7 distinct tests on Wave32-only Ada; 0 #1426 refusals)
cargo build --release -p xcl Clean build (1m 01s, exit 0, 0 new warnings)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (568e7db7729c8fa6c8f0f4b32d798faaf11462bb, same machine):

xcl-smoke v1
commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1587 (PresentX 1587)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14527 MB

PR #2182 (c3015b19ad82247000fc0831e8cabd53dae1ee03):

xcl-smoke v1
commit: c3015b19ad82247000fc0831e8cabd53dae1ee03
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1593 (PresentX 1593)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14490 MB

Limits of coverage

  • Removing V_CVT_F16_F32, V_MUL_F16, and V_PK_MUL_F16 from DIFFERS_ON_1426 was verified directly on desktop RTX 4060: Wave32 per-lane #1426 refusals dropped from 3 on parent 568e7db7 to 0 on c3015b19, with all three newly unblocked Wave32 programs executing on-GPU and matching HLSL (3/3 runs).
  • Native Wave64 sub-cases in gpu::recomp::lower_dxil:: remain self-skipped (no wave64) on Wave32-only Ada; the 60 s retail smoke confirms zero runtime regression on title: 29640639 (single-run frame/commit delta vs. parent reflects normal startup variance, not this PR).

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

@Parakeet-Wheat

Parakeet-Wheat commented Nov 30, 2026 •

Copy link
Copy Markdown

merge-check
base: 9335bc0
head: c3015b1
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2801 passed, 1 failed, 50 ignored; SKIPPED: 26 (22 no wave64, 2 no heap windows, 1 driver cache needs Developer Mode, 1 no GPU_UPLOAD heaps); failing: hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline fails on the base alone too (3 of 3 runs on the base, 3 of 3 on the merge)
review: The diff removes the 13-line DIFFERS_ON_1426 refusal list from lower.rs and adds nothing. On the same base, our #3474 check (a test-only change) shows 29 SKIPPED, 3 of them "wave32, per-lane form: refused" for #1426. With this PR, those 3 notices are gone and the other 26 SKIPPED stay the same. f16_programs_on_the_gpu and f32_programs_on_the_gpu pass, so the per-lane DXIL now runs f16 arithmetic, f16 packed and f32 conversions in wave32. These tests first check the HLSL path's registers against expected values. Then they require the per-lane DXIL to match the HLSL path register for register. In f16 arithmetic, v10 is V_MUL_F16 of x · 2^-15, which gives denormal ties, and the check expects the nearest-even result. 18423c3 (#1742, f16 converts and products round to nearest even) is on main, as the description says.
performance: Default path unchanged: the per-lane form runs only with XCL_PER_LANE=1 and XCL_DIRECT_DXIL=1. This check made no title run and no run with XCL_PER_LANE=1.
verdict: safe to merge (the 3 per-lane cases it unblocks match the HLSL path on our RTX 3070, a GPU without wave64)
hardware / tool and model: RTX 3070 8 GB (610.88), AMD Ryzen 5 5600X, Windows 11 Home 26300, Rust 1.95.0, debug / Claude Code, Claude Opus 5.5 (merge, build, suite, reruns and review)

@github-actions github-actions Bot added area:recompiler RDNA2 decoder, HLSL/direct-DXIL recompiler, wave64/wave32 gpu:both Code affects both AMD and NVIDIA GPUs (scope tag; see needs:*-test for remaining checks) needs-1st-check Passes gates; needs first independent merge-check (#3041) needs:amd-test Needs a test report or merge-check on an AMD GPU needs:nvidia-test Needs a test report or merge-check on an NVIDIA GPU needs-2nd-check Has 1 safe merge-check; needs second independent check (#3041) and removed needs-1st-check Passes gates; needs first independent merge-check (#3041) needs:nvidia-test Needs a test report or merge-check on an NVIDIA GPU labels Nov 30, 2026
@johnbf8x

Copy link
Copy Markdown

merge-check claim
head: c3015b1

@johnbf8x

Copy link
Copy Markdown

merge-check
base: cb80246
head: c3015b1
merge: clean (git merge --no-commit --no-ff onto origin/main in a detached worktree; the merged tree was tested uncommitted)
build: cargo build --workspace -> ok (the PR merged and main alike, each in its own target dir)
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (XCL_DXC_DIR = DXC 1.9.2609) -> main and PR the same: 137 passed, 2 failed, 20 ignored outside the lib; the lib binary ends abnormally on both (0x80004005), so no lib total. SKIPPED: main 28 (22 no wave64, 3 per-lane forms refused, 2 no heap windows, 1 no D3D12 debug layer), PR 25: the three "wave32, per-lane form: refused (... its #1426 semantics differ from the console's)" lines (V_CVT_F16_F32, V_MUL_F16, V_PK_MUL_F16) are gone, the other 25 are the same. Failing: e2e test_title_draws_with_a_root_signature_under_the_debug_layer and test_title_runs_under_the_debug_layer_with_dred (no D3D12 debug layer on this PC), both fail on main too. The lib in parts: hle::d3d12x::list_x alone on 1 thread 113 passed on both; the rest on 4 threads, 0 failed before the process ends on both (PR 1741 ok, main 1743 ok). gpu::recomp::lower_dxil::tests:: on 1 thread: 26 passed, 0 failed on main and on the PR in 3 of 3 runs; on the PR f16_programs_on_the_gpu and f32_programs_on_the_gpu now run f16 arithmetic, f16 packed and f32 conversions in their per-lane form in wave32 and match the HLSL path
review: none blocking, after reading the whole diff (lower.rs, 13 lines removed, nothing added). The list was there for #1426's old rounding; 18423c3 (#1742, "round direct-DXIL f16 converts and products to nearest-even", covering exactly V_CVT_F16_F32, V_MUL_F16 and V_PK_MUL_F16) is on main, so the reason for the list is gone. The refusals that remain in front of it (partial-lane FREXP denormal mode writes and the rest) are untouched. Not covered here: wave64 (no wave64 on this GPU) and a title that uses these instructions
performance: none expected by default; programs with these three instructions now take the per-lane form where they used to take the fallback (reasoned, not measured). It changes a translator source, so every tester re-translates all shaders once
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 3070 Ti 8 GB (driver 621.40), Intel Core i7-12700K, Windows 10 Pro 19045, rustc 1.100.0 / Claude Code, Claude Opus 5.5

@github-actions github-actions Bot added ready-to-merge Has 2 independent safe merge-checks on current head (#3041) and removed needs-2nd-check Has 1 safe merge-check; needs second independent check (#3041) labels Nov 30, 2026
@github-actions github-actions Bot removed the needs:amd-test Needs a test report or merge-check on an AMD GPU label Nov 30, 2026
@Prime1997
Prime1997 merged commit 9ad265a into xcl-dev:main Nov 30, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:recompiler RDNA2 decoder, HLSL/direct-DXIL recompiler, wave64/wave32 gpu:both Code affects both AMD and NVIDIA GPUs (scope tag; see needs:*-test for remaining checks) ready-to-merge Has 2 independent safe merge-checks on current head (#3041)

Projects

None yet

Development

Successfully merging this pull request may close these issues.