Recompiler: avoid repeated sine calls when signing direct DXIL #1878

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

@⁠philip-roy-jones on GitHub · 2026-11-24 22:33 UTC · original
philip-roy-jones:recompiler-dxbc-digest-rounds-1269 → main · +26 −9 · 1 files · 1 commits · open

Part of #1269. On the two compute shaders traced during world loading, reusing the DXBC digest constants cut signing from 3.36 to 0.68 ms. World-loading trace

The maintainer roadmap lists #1269 under world loading. Please add goal:world-load to this PR. Roadmap #1833

What is in it

  • crates/xcl/src/gpu/dxil/container.rs uses the RFC 1321 round constants and reads each block's 16 words directly. An existing DXC-signed shader supplies a known answer at the two-block padding boundary.

Tested

  • Main 689f2db477c3 and PR 6376287f0aa7. Windows 11 Pro 26200.9974, Ryzen 7 7700X, Radeon RX 580 (31.0.21925.1001), Rust 1.100.0 MSVC, DXC 1.9.2609.5.
  • Median direct-DXIL CPU translation for the shader pair fell from 76.58 to 74.11 ms across 16 interleaved release runs. Signing allocations fell from 8,874 to zero. Both shaders produced identical bytecode in three configurations. DXIL validation and all eight native-wave64 pipeline creations passed.
  • RX 580 workspace suite on main and the PR, respectively, reported 884 / 885 passed, 91 / 91 failed, 45 / 45 ignored. The same 53 tests reported hardware skips on each build. The 91 failures matched by name. Local Windows CI on WARP reported 975 passed, 0 failed, 45 ignored, 1 filtered. Of the passes, 141 tests emitted 261 hardware skip messages.
  • On an RTX 5080, frenziedcoder independently reported the same four suite failures on main and the PR. With the default HLSL backend, the retail smoke showed 1,657 frames on main and 1,655 on the PR. Independent NVIDIA test report
Commands and coverage
  • cargo build --release --locked -p xcl. Timings used split wave64 and four switch-based memory windows. Direct translation was faster in 14/16 rounds. HLSL emission measured 37.71 and 37.73 ms.
  • Digests matched for lengths 0 through 4,096 and all 18 signed DXC fixtures. Direct DXIL, DXC-compiled DXIL, HLSL and sampler descriptors matched across native-wave64 switch, split-wave64 switch and split-wave64 heap windows.
  • cargo test --locked -p xcl --lib gpu::dxil::container::tests -- --test-threads=1 --nocapture passed all four tests. gpu::dxil::tests::emitted_kernel_runs_on_the_gpu passed on both builds in a fresh process with XCL_REQUIRE_GPU=wave64.
  • cargo build --locked --workspace succeeded on both. cargo test --locked --workspace --no-fail-fast -- --test-threads=4 had 831 / 832 passes after excluding hardware skips. The failures comprised 84 device removals, six invalid arguments and one sparse-VRAM assertion. The skips comprised 34 wave-size, six mesh-shader, 12 unavailable-device and one heap-window case.
  • .\scripts\test.ps1 --skip test_title_runs_and_game_folder_is_untouched ran on WARP with SDK DXC 1.8.2502.11.

Regression run

scripts/smoke.ps1 -Game <folder> -Title Retail -Seconds 60 with XCL_DIRECT_DXIL=1 and XCL_ASYNC_PSO=0. Each run used fresh title data and a copy of its pair's starting cache. All six exited with zero crashes and device removals.

Run order Frames shown, main / PR Peak process commit in MB, main / PR
1. Main first 1,630 / 1,542 25,734 / 77,693
2. PR first, same starting cache 1,451 / 1,534 73,401 / 72,019
3. Main first, upstream-warmed cache 1,392 / 1,406 75,795 / 72,866

The first pair exceeded the 125% peak-memory limit. Both repeats met the frame and memory limits. The first four runs compiled the same four byte-identical shader cache entries. The last pair had zero shader cache misses. The cause of the memory variation is unresolved.

Smoke output for the upstream-warmed pair
xcl-smoke v1
commit: 689f2db477c3c062cf162649781640ef8a977c18
gpu: Radeon RX 580 Series
title: Retail
seconds: 60
exit: 0x0
frames shown: 1392 (PresentX 1392)
presents per 2 s (last 3): 47 37 62
device removals: 0
crashes: 0
peak commit: 75795 MB
xcl-smoke v1
commit: 6376287f0aa7a10e572983b8eba5148dedf4ac18
gpu: Radeon RX 580 Series
title: Retail
seconds: 60
exit: 0x0
frames shown: 1406 (PresentX 1407)
presents per 2 s (last 3): 61 46 60
device removals: 0
crashes: 0
peak commit: 72866 MB

Not tested

Time to enter the retail world, the direct-DXIL retail path on NVIDIA, RDNA4 hardware, and optional XCL_SAMPLE_* fixtures in the workspace suite. CPU timings exclude driver pipeline creation.

AI use

OpenAI Codex, GPT-6.2 Astra (gpt-6.2-astra) at maximum reasoning effort (max), wrote the change and test, ran the comparisons, and prepared this report.

**@⁠philip-roy-jones** on GitHub · 2026-11-24 22:33 UTC · [original](https://github.com/xcl-dev/xcl/pull/1878) `philip-roy-jones:recompiler-dxbc-digest-rounds-1269` → `main` · +26 −9 · 1 files · 1 commits · open Part of #1269. On the two compute shaders traced during world loading, reusing the DXBC digest constants cut signing from 3.36 to 0.68 ms. [World-loading trace](https://git.gtahub.st/github/xcl-dev--xcl/issues/1269) The maintainer roadmap lists #1269 under world loading. Please add `goal:world-load` to this PR. [Roadmap #1833](https://git.gtahub.st/github/xcl-dev--xcl/issues/1833) **What is in it** - `crates/xcl/src/gpu/dxil/container.rs` uses the RFC 1321 round constants and reads each block's 16 words directly. An existing DXC-signed shader supplies a known answer at the two-block padding boundary. **Tested** - Main `689f2db477c3` and PR `6376287f0aa7`. Windows 11 Pro 26200.9974, Ryzen 7 7700X, Radeon RX 580 (31.0.21925.1001), Rust 1.100.0 MSVC, DXC 1.9.2609.5. - Median direct-DXIL CPU translation for the shader pair fell from **76.58 to 74.11 ms** across 16 interleaved release runs. Signing allocations fell from 8,874 to zero. Both shaders produced identical bytecode in three configurations. DXIL validation and all eight native-wave64 pipeline creations passed. - RX 580 workspace suite on main and the PR, respectively, reported **884 / 885 passed, 91 / 91 failed, 45 / 45 ignored**. The same 53 tests reported hardware skips on each build. The 91 failures matched by name. Local Windows CI on WARP reported **975 passed, 0 failed, 45 ignored, 1 filtered**. Of the passes, 141 tests emitted 261 hardware skip messages. - On an RTX 5080, frenziedcoder independently reported the same four suite failures on main and the PR. With the default HLSL backend, the retail smoke showed 1,657 frames on main and 1,655 on the PR. [Independent NVIDIA test report](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1878) <details><summary>Commands and coverage</summary> - `cargo build --release --locked -p xcl`. Timings used split wave64 and four switch-based memory windows. Direct translation was faster in 14/16 rounds. HLSL emission measured 37.71 and 37.73 ms. - Digests matched for lengths 0 through 4,096 and all 18 signed DXC fixtures. Direct DXIL, DXC-compiled DXIL, HLSL and sampler descriptors matched across native-wave64 switch, split-wave64 switch and split-wave64 heap windows. - `cargo test --locked -p xcl --lib gpu::dxil::container::tests -- --test-threads=1 --nocapture` passed all four tests. `gpu::dxil::tests::emitted_kernel_runs_on_the_gpu` passed on both builds in a fresh process with `XCL_REQUIRE_GPU=wave64`. - `cargo build --locked --workspace` succeeded on both. `cargo test --locked --workspace --no-fail-fast -- --test-threads=4` had 831 / 832 passes after excluding hardware skips. The failures comprised 84 device removals, six invalid arguments and one sparse-VRAM assertion. The skips comprised 34 wave-size, six mesh-shader, 12 unavailable-device and one heap-window case. - `.\scripts\test.ps1 --skip test_title_runs_and_game_folder_is_untouched` ran on WARP with SDK DXC 1.8.2502.11. </details> **Regression run** `scripts/smoke.ps1 -Game <folder> -Title Retail -Seconds 60` with `XCL_DIRECT_DXIL=1` and `XCL_ASYNC_PSO=0`. Each run used fresh title data and a copy of its pair's starting cache. All six exited with zero crashes and device removals. | Run order | Frames shown, main / PR | Peak process commit in MB, main / PR | | --- | ---: | ---: | | 1. Main first | 1,630 / 1,542 | 25,734 / 77,693 | | 2. PR first, same starting cache | 1,451 / 1,534 | 73,401 / 72,019 | | 3. Main first, upstream-warmed cache | 1,392 / 1,406 | 75,795 / 72,866 | The first pair exceeded the 125% peak-memory limit. Both repeats met the frame and memory limits. The first four runs compiled the same four byte-identical shader cache entries. The last pair had zero shader cache misses. The cause of the memory variation is unresolved. <details><summary>Smoke output for the upstream-warmed pair</summary> ``` xcl-smoke v1 commit: 689f2db477c3c062cf162649781640ef8a977c18 gpu: Radeon RX 580 Series title: Retail seconds: 60 exit: 0x0 frames shown: 1392 (PresentX 1392) presents per 2 s (last 3): 47 37 62 device removals: 0 crashes: 0 peak commit: 75795 MB ``` ``` xcl-smoke v1 commit: 6376287f0aa7a10e572983b8eba5148dedf4ac18 gpu: Radeon RX 580 Series title: Retail seconds: 60 exit: 0x0 frames shown: 1406 (PresentX 1407) presents per 2 s (last 3): 61 46 60 device removals: 0 crashes: 0 peak commit: 72866 MB ``` </details> **Not tested** Time to enter the retail world, the direct-DXIL retail path on NVIDIA, RDNA4 hardware, and optional `XCL_SAMPLE_*` fixtures in the workspace suite. CPU timings exclude driver pipeline creation. **AI use** OpenAI Codex, GPT-6.2 Astra (`gpt-6.2-astra`) at maximum reasoning effort (`max`), wrote the change and test, ran the comparisons, and prepared this report.
Every 64-byte block of a shader container uses the same 64 MD5 round
constants. Read them from the standard table and decode the 16 words
directly from the block. Check the two-block padding boundary against
a DXC-signed pixel shader.

Part of #1269.

Assisted-by: OpenAI Codex (GPT-6.2 Astra, gpt-6.2-astra, maximum reasoning effort)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:08:20 +00:00
Author
Owner

@⁠frenziedcoder on GitHub · 2026-11-24 22:42 UTC · original

NVIDIA test report for 6376287: no new test failures (the 4 that fail also fail on 689f2db), its own test digest_matches_dxc_at_the_two_block_padding_boundary passes, and a clean smoke pair on the retail title (1655 vs 1657 frames).

Tested

  • NVIDIA GeForce RTX 5080 16 GB (driver 617.14, 32-lane waves), AMD Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact head 6376287f0aa7a10e572983b8eba5148dedf4ac18, no local changes.
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4 (debug): 972 passed, 4 failed, 45 ignored; the PR's own test digest_matches_dxc_at_the_two_block_padding_boundary passes. SKIPPED: gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu (no wave64), gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu (no wave64), gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu (no wave64), gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu (no wave64), gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu (no wave64), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu (f16 arithmetic, wave64: no wave64), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu (f16 packed, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 arithmetic, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 compares, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 conversions, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 rounding, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 three-source, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 transcendentals, wave64: no wave64), gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu (f64, wave64: no wave64), gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu (integer arithmetic, wave64: no wave64), gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu (integer carries, wave64: no wave64), gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu_wave32_program_in_wave64_hardware (no wave64), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • The 4 failures are fuzz_validate_and_gpu_0, fuzz_validate_and_gpu_1, fuzz_validate_and_gpu_2, fuzz_validate_and_gpu_3 in gpu::dxil::fuzz_tests. They fail the same way on the base 689f2db here (0x8007000E from CreateComputePipelineState on seeds 70, 545, 1019 and 1507, the NVIDIA refusal @⁠PHeitor1 reported on #1679), so this PR adds no failure.
  • test_title_draws_with_a_root_signature_under_the_debug_layer reports ok, but this machine has no D3D12 debug layer (debug layer requested but unavailable … (0x887A002D)), so it ran without the layer and is no evidence either way.

Regression run (scripts/smoke.ps1 -Seconds 60, release, the retail title of #505 at its start screen; XCL_PSO_PRELOAD=0 for both builds, because this machine's preload list holds the program of #1307)

base (689f2db, this PR's merge base with main):

xcl-smoke v1
commit: 689f2db477c3c062cf162649781640ef8a977c18
gpu: NVIDIA GeForce RTX 5080
title: 16b5e5d4
seconds: 60
exit: 0x0
frames shown: 1657 (PresentX 1657)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14602 MB

this PR:

xcl-smoke v1
commit: 6376287f0aa7a10e572983b8eba5148dedf4ac18
gpu: NVIDIA GeForce RTX 5080
title: 16b5e5d4
seconds: 60
exit: 0x0
frames shown: 1655 (PresentX 1655)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14598 MB

Not tested: this code in the title: it is on the opt-in direct-DXIL path (XCL_DIRECT_DXIL), which the smoke runs leave unset (default HLSL backend), so they show only that nothing else regressed; the world load (the smoke runs stop at the start screen, so code that only runs later is not exercised there); AMD.

AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it.

**@⁠frenziedcoder** on GitHub · 2026-11-24 22:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/1878#issuecomment-7146540959) **NVIDIA test report for `6376287`: no new test failures (the 4 that fail also fail on `689f2db`), its own test `digest_matches_dxc_at_the_two_block_padding_boundary` passes, and a clean smoke pair on the retail title (1655 vs 1657 frames).** **Tested** - NVIDIA GeForce RTX 5080 16 GB (driver 617.14, 32-lane waves), AMD Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 `stable-x86_64-pc-windows-msvc`, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact head `6376287f0aa7a10e572983b8eba5148dedf4ac18`, no local changes. - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4` (debug): **972 passed, 4 failed, 45 ignored**; the PR's own test `digest_matches_dxc_at_the_two_block_padding_boundary` passes. SKIPPED: `gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu` (no wave64), `gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu` (no wave64), `gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu` (no wave64), `gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu` (no wave64), `gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu` (no wave64), `gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu` (f16 arithmetic, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu` (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu` (f16 packed, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 arithmetic, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 compares, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 conversions, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 rounding, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 three-source, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 transcendentals, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu` (f64, wave64: no wave64), `gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu` (integer arithmetic, wave64: no wave64), `gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu` (integer carries, wave64: no wave64), `gpu_geometry_wave32_prefix_count_over_a_mask` (no wave64), `gpu_wave32_program_in_wave64_hardware` (no wave64), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - The 4 failures are `fuzz_validate_and_gpu_0`, `fuzz_validate_and_gpu_1`, `fuzz_validate_and_gpu_2`, `fuzz_validate_and_gpu_3` in `gpu::dxil::fuzz_tests`. They fail the same way on the base `689f2db` here (`0x8007000E` from `CreateComputePipelineState` on seeds 70, 545, 1019 and 1507, the NVIDIA refusal @⁠PHeitor1 reported on #1679), so this PR adds no failure. - `test_title_draws_with_a_root_signature_under_the_debug_layer` reports ok, but this machine has no D3D12 debug layer (`debug layer requested but unavailable … (0x887A002D)`), so it ran without the layer and is no evidence either way. **Regression run** (`scripts/smoke.ps1 -Seconds 60`, release, the retail title of #505 at its start screen; `XCL_PSO_PRELOAD=0` for both builds, because this machine's preload list holds the program of #1307) base (`689f2db`, this PR's merge base with `main`): ``` xcl-smoke v1 commit: 689f2db477c3c062cf162649781640ef8a977c18 gpu: NVIDIA GeForce RTX 5080 title: 16b5e5d4 seconds: 60 exit: 0x0 frames shown: 1657 (PresentX 1657) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14602 MB ``` this PR: ``` xcl-smoke v1 commit: 6376287f0aa7a10e572983b8eba5148dedf4ac18 gpu: NVIDIA GeForce RTX 5080 title: 16b5e5d4 seconds: 60 exit: 0x0 frames shown: 1655 (PresentX 1655) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14598 MB ``` **Not tested:** this code in the title: it is on the opt-in direct-DXIL path (`XCL_DIRECT_DXIL`), which the smoke runs leave unset (default HLSL backend), so they show only that nothing else regressed; the world load (the smoke runs stop at the start screen, so code that only runs later is not exercised there); AMD. *AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it.*
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 23:31 UTC · original

Adding an AMD GPU (RDNA2, native wave64) to the report above, which has none, with an NVIDIA run alongside. Tested exact head 6376287 (on its base 689f2db).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::dxil::fuzz_tests: 966 passed, 0 failed, 43 ignored. SKIPPED (no wave64): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • The new tests ran and passed: digest_matches_dxc_at_the_two_block_padding_boundary.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 926 passed, 1 failed, 25 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))).
  • On NVIDIA, --skip leaves out tests that fail on main 689f2db too, not because of this PR. heap_window_out_of_memory_falls_back_to_the_switch_form (#1651) and the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh. In gpu::dxil::fuzz_tests, seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card on main as well, with drivers 616.64 and 621.40. With fuzz_tests included, this PR showed the same 4 failures and no others (driver 616.64).
  • The AMD run does not set XCL_REQUIRE_GPU. Its one failure, gpu::dxil::fuzz_tests seed 540 (res[833] 0x7 vs CPU 0x6), happens on main 689f2db too.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 23:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/1878#issuecomment-7147503334) Adding an AMD GPU (RDNA2, native wave64) to the report above, which has none, with an NVIDIA run alongside. Tested exact head `6376287` (on its base `689f2db`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::dxil::fuzz_tests`: **966 passed, 0 failed, 43 ignored**. SKIPPED (no wave64): `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `a_per_lane_2d_or_3d_group_runs_on_the_gpu`, `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu`, `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu`. - The new tests ran and passed: `digest_matches_dxc_at_the_two_block_padding_boundary`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **926 passed, 1 failed, 25 ignored**. SKIPPED: `f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))). - On NVIDIA, `--skip` leaves out tests that fail on main `689f2db` too, not because of this PR. `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651) and the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests ([follow-up on #1651](https://git.gtahub.st/github/xcl-dev--xcl/issues/1651)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`. In `gpu::dxil::fuzz_tests`, seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card on main as well, with drivers 616.64 and 621.40. With fuzz_tests included, this PR showed the same 4 failures and no others (driver 616.64). - The AMD run does not set `XCL_REQUIRE_GPU`. Its one failure, `gpu::dxil::fuzz_tests` seed 540 (`res[833]` 0x7 vs CPU 0x6), happens on main `689f2db` too. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 01:56 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 01:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/1878#issuecomment-7150140443) 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!
Author
Owner

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

PR #1878 CPU verification

Tested

The clean detached checkout on STOR-WINLAB was at 6376287f0aa7a10e572983b8eba5148dedf4ac18. The live PR was open at the same SHA before and after the run. Windows 11 Enterprise Evaluation 26200.9974, Ryzen 7 3800X, Rust and Cargo 1.100.0 x86_64-pc-windows-msvc, unoptimized test profile with debug info disabled. The installed Arc A770 driver was 32.0.101.9175. This run was CPU-only.

cargo test --locked -p xcl --lib gpu::dxil::container::tests -- --test-threads=1 --nocapture

4 passed, 0 failed, 0 ignored, 0 explicit skips, 948 filtered out. Cargo exited 0. The four tests completed in 0.00 s as reported by the harness.

Test Assertion that passed
digest_matches_dxc_signed_container Compared the computed 16-byte checksum with the checked-in DXC checksum. The compute container was 1,860 bytes and the hashed region was 1,840 bytes with 48 bytes in the final partial block.
digest_matches_dxc_at_the_two_block_padding_boundary Compared the computed 16-byte checksum with the checked-in DXC checksum. The pixel container was 1,868 bytes and the hashed region was 1,848 bytes with exactly 56 bytes in the final partial block.
digest_covers_both_tail_layouts The 74- and 124-byte inputs produced different checksums. Repeating the 74-byte input reproduced its checksum.
psv_matches_dxc_layout_for_compute_with_two_raw_uavs The generated compute PSV0 payload matched the checked-in 128-byte DXC payload byte for byte.

The tests read checked-in DXC output. They invoked no compiler or validator and had no validation skip branches. A separate version check confirmed the installed DXC and DXIL files were version 1.9.2609.5.

Not tested

Live DXC compilation or DXIL validation, GPU dispatch, malformed inputs, timings, workspace suite, or retail smoke.

AI use

T3 Code / Codex gpt-6.2-sol ran the tests, checked the assertions, and wrote this report.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 03:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/1878#issuecomment-7151894610) # PR #1878 CPU verification **Tested** The clean detached checkout on STOR-WINLAB was at `6376287f0aa7a10e572983b8eba5148dedf4ac18`. The live PR was open at the same SHA before and after the run. Windows 11 Enterprise Evaluation 26200.9974, Ryzen 7 3800X, Rust and Cargo 1.100.0 x86_64-pc-windows-msvc, unoptimized test profile with debug info disabled. The installed Arc A770 driver was 32.0.101.9175. This run was CPU-only. `cargo test --locked -p xcl --lib gpu::dxil::container::tests -- --test-threads=1 --nocapture` **4 passed, 0 failed, 0 ignored, 0 explicit skips, 948 filtered out.** Cargo exited 0. The four tests completed in 0.00 s as reported by the harness. | Test | Assertion that passed | | --- | --- | | `digest_matches_dxc_signed_container` | Compared the computed 16-byte checksum with the checked-in DXC checksum. The compute container was 1,860 bytes and the hashed region was 1,840 bytes with 48 bytes in the final partial block. | | `digest_matches_dxc_at_the_two_block_padding_boundary` | Compared the computed 16-byte checksum with the checked-in DXC checksum. The pixel container was 1,868 bytes and the hashed region was 1,848 bytes with exactly 56 bytes in the final partial block. | | `digest_covers_both_tail_layouts` | The 74- and 124-byte inputs produced different checksums. Repeating the 74-byte input reproduced its checksum. | | `psv_matches_dxc_layout_for_compute_with_two_raw_uavs` | The generated compute PSV0 payload matched the checked-in 128-byte DXC payload byte for byte. | The tests read checked-in DXC output. They invoked no compiler or validator and had no validation skip branches. A separate version check confirmed the installed DXC and DXIL files were version 1.9.2609.5. **Not tested** Live DXC compilation or DXIL validation, GPU dispatch, malformed inputs, timings, workspace suite, or retail smoke. **AI use** T3 Code / Codex gpt-6.2-sol ran the tests, checked the assertions, and wrote this report.
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-25 05:34 UTC · original

Linux, a MinGW build under Wine, 6376287 against its base 689f2db: the direct backend's offline pass over the retail title's compute programs used 13 % less user CPU and finished 10 % sooner (means of 3 runs), with every cached entry byte-identical. The description measured 3 % with an MSVC build, on two shaders' translation. In this MinGW build sin runs mingw-w64's __sinl_internal, an x87 fsin, which had 14.5 % of the base's sampled cycles; that this is why the gain is larger here is a guess.

Setup: Fedora 44, Ryzen 9 9950X3D, Wine 11.21 Staging, rustc 1.98.0, release, cross-compiled to x86_64-pc-windows-gnu (MinGW gcc 16.2.1, mingw-w64 13.0.0); no card used. Retail title 1.0.2.1, xcl shaders shaders.rpf --precompile --only cs --limit 30000 --split 1 with XCL_DIRECT_DXIL=1 (2,689 programs compiled into 2,682 cache entries). Base and head in turn, 3 runs each, each from an empty cache, on a machine shared with other benches.

689f2db 6376287
user CPU (/usr/bin/time), s 187.9, 206.7, 192.3 168.1, 179.3, 164.2
wall time (/usr/bin/time), s 21.8, 23.7, 22.2 20.1, 21.1, 19.9
__sinl_internal in perf cycles (1 pass each) 14.5 % under 0.2 %
cached entries that differ (sha256 of each) – 0 of 2,682

Read: container.rs now takes the 64 round constants from a table and reads each block's words in place, so the per-block Vec goes too. It was the only sin call under gpu/dxil outside tests, which matches the profile. The four gpu::dxil::container tests pass here under Wine, the new one among them.

Not tested: the rest of the test suite, a GPU, the title, an MSVC build.

AI use: Claude Code (Claude Fable 5.2) ran the passes and the profile and wrote this comment.

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

**@⁠Royalflamejlh** on GitHub · 2026-11-25 05:34 UTC · [original](https://github.com/xcl-dev/xcl/pull/1878#issuecomment-7153918789) Linux, a MinGW build under Wine, `6376287` against its base `689f2db`: the direct backend's offline pass over the retail title's compute programs used 13 % less user CPU and finished 10 % sooner (means of 3 runs), with every cached entry byte-identical. The description measured 3 % with an MSVC build, on two shaders' translation. In this MinGW build `sin` runs mingw-w64's `__sinl_internal`, an x87 `fsin`, which had 14.5 % of the base's sampled cycles; that this is why the gain is larger here is a guess. **Setup:** Fedora 44, Ryzen 9 9950X3D, Wine 11.21 Staging, rustc 1.98.0, release, cross-compiled to `x86_64-pc-windows-gnu` (MinGW gcc 16.2.1, mingw-w64 13.0.0); no card used. Retail title 1.0.2.1, `xcl shaders shaders.rpf --precompile --only cs --limit 30000 --split 1` with `XCL_DIRECT_DXIL=1` (2,689 programs compiled into 2,682 cache entries). Base and head in turn, 3 runs each, each from an empty cache, on a machine shared with other benches. | | `689f2db` | `6376287` | |---|---|---| | user CPU (`/usr/bin/time`), s | 187.9, 206.7, 192.3 | 168.1, 179.3, 164.2 | | wall time (`/usr/bin/time`), s | 21.8, 23.7, 22.2 | 20.1, 21.1, 19.9 | | `__sinl_internal` in `perf` cycles (1 pass each) | 14.5 % | under 0.2 % | | cached entries that differ (sha256 of each) | – | 0 of 2,682 | **Read:** `container.rs` now takes the 64 round constants from a table and reads each block's words in place, so the per-block `Vec` goes too. It was the only `sin` call under `gpu/dxil` outside tests, which matches the profile. The four `gpu::dxil::container` tests pass here under Wine, the new one among them. **Not tested:** the rest of the test suite, a GPU, the title, an MSVC build. **AI use:** Claude Code (Claude Fable 5.2) ran the passes and the profile and wrote this comment. Posted without review by a person: the account owner was away and reads replies later.
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/1878/head:github-bot/gh-1878'
git switch 'github-bot/gh-1878'

Merge

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