Recompiler: direct DXIL rolls and shares BVH box32/box16 loop #1800

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

@⁠xADEL on GitHub · 2026-11-24 20:54 UTC · original
xADEL:dxil/roll-bvh-box-loop → main · +332 −88 · 3 files · 1 commits · open

Direct DXIL lowering of image_bvh_intersect_ray still unrolled box32 and box16 separately across all four children, emitting 8 copies of the slab math, 2 copies of the sorting network, 24 legacyF16ToF32 conversions, and 11 box rawBufferLoads (15 total with triangle) per instruction. This unifies ty == 4 / ty == 5 into one guarded region with a single rolled 4-iteration loop, vectorized with_mem_i32s loads, and one shared sorting network (the direct-DXIL counterpart to #1542). Part of #1269.

What is in it

  • crates/xcl/src/gpu/dxil/lower_image.rs: add vectorized bvh_load_box32 (2 raw_loads via with_mem_i32s) and bvh_load_box16 (1 raw_load via with_mem_i32s), load the 4 child pointers once via with_mem_i32s(..., 0xF), unify ty == 4 || ty == 5 into a single rolled 4-iteration loop carrying the four (t, id) slots via a 3-slot explicit phi shift register, and emit one sorting network after the loop (reducing per-BVH rawBufferLoads from 15 → 8 and legacyF16ToF32 calls from 24 → 6).
  • crates/xcl/src/gpu/dxil/kernel.rs: bump TRANSLATOR_VERSION from 7 to 8.
  • crates/xcl/src/gpu/dxil/core_tests.rs: DXIL validation/IR-count test (bvh_intersect_rolls_box_loop_and_validates) and bit-exact GPU test covering box32, box16, sorting, tmax culling, grazing rays, NaN/inverted boxes, triangle, and instance nodes (bvh_intersect_gpu_matches_box_sort_and_triangle).

Tested

  • Hardware: NVIDIA GeForce RTX 3050 6GB Laptop GPU (32.0.16.2124), Intel Core i5-12450HX, 24 GB RAM, Windows 11 Pro (10.0.26300), rustc 1.100.0, Windows SDK 10.0.26100.0 (dxcompiler.dll / dxil.dll 1.9.2602.17), debug tests + release sweep/smoke.
  • XCL_ADAPTER="rtx 3050" cargo test --workspace -- --test-threads=4 (rebased head 9503770 on main 8e87fc7): 992 passed, 0 failed, 45 ignored (both new BVH tests, gpu_bvh_intersect_ray, and all upstream core_tests / msaa_tests / geometry_tests / round_tests passed).
  • SKIPPED GPU tests on this adapter (24): 19 no wave64 (gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, lower::tests::*, lower_dxil::tests::* wave64 arms), 3 per-lane wave32 unsupported f16/cvt arms (f16_programs_on_the_gpu, f32_programs_on_the_gpu), 1 no heap windows (heap_window_out_of_memory_falls_back_to_the_switch_form), 1 0x887A002D Developer Mode required (pso_measurement_compiles_an_exact_synthetic_record).
  • Retail shaders.rpf sweep (xcl shaders <pack> --direct --validate --sample 500 --seed 1, release): 408/408 translated (100.0%: 33 CS, 11 GS, 155 MS, 164 PS, 45 VS), 0 validator errors, 0 panics (2.1 s).

Regression run

xcl-smoke v1
commit: 8e87fc7b62a87ea589ccb9ea6182f514016cf7db
gpu: NVIDIA GeForce RTX 3050 6GB Laptop GPU
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1514 (PresentX 1514)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14719 MB
xcl-smoke v1
commit: 95037704a20771e8fee14f7454ce8e6a5fa1d271
gpu: NVIDIA GeForce RTX 3050 6GB Laptop GPU
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1527 (PresentX 1527)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14714 MB

(Note: smoke.ps1 runs without XCL_DIRECT_DXIL=1, so this regression check verifies no default-path regression and is not a gameplay FPS claim for the BVH optimization.)

Not tested

  • Native wave64 GPUs (AMD RDNA2/3/4), Intel GPUs, XCL_HEAP_WINDOWS=1 runtime runs, XCL_DIRECT_DXIL=1 full RT title runs, and XCL_SAMPLE_* tests.

AI use

  • Antigravity (Gemini 4 Neon) wrote the patch and tests, rebased onto 8e87fc7 (preserving #1748 vector loads, #1869, and bumping TRANSLATOR_VERSION to 8), ran the workspace suite, --direct --validate sweep, and smoke.ps1 runs on this machine, and drafted this description.
**@⁠xADEL** on GitHub · 2026-11-24 20:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/1800) `xADEL:dxil/roll-bvh-box-loop` → `main` · +332 −88 · 3 files · 1 commits · open Direct DXIL lowering of `image_bvh_intersect_ray` still unrolled `box32` and `box16` separately across all four children, emitting 8 copies of the slab math, 2 copies of the sorting network, 24 `legacyF16ToF32` conversions, and 11 box `rawBufferLoad`s (15 total with triangle) per instruction. This unifies `ty == 4` / `ty == 5` into one guarded region with a single rolled 4-iteration loop, vectorized `with_mem_i32s` loads, and one shared sorting network (the direct-DXIL counterpart to #1542). Part of #1269. **What is in it** - `crates/xcl/src/gpu/dxil/lower_image.rs`: add vectorized `bvh_load_box32` (2 `raw_load`s via `with_mem_i32s`) and `bvh_load_box16` (1 `raw_load` via `with_mem_i32s`), load the 4 child pointers once via `with_mem_i32s(..., 0xF)`, unify `ty == 4 || ty == 5` into a single rolled 4-iteration loop carrying the four `(t, id)` slots via a 3-slot explicit phi shift register, and emit one sorting network after the loop (reducing per-BVH `rawBufferLoad`s from 15 → 8 and `legacyF16ToF32` calls from 24 → 6). - `crates/xcl/src/gpu/dxil/kernel.rs`: bump `TRANSLATOR_VERSION` from 7 to 8. - `crates/xcl/src/gpu/dxil/core_tests.rs`: DXIL validation/IR-count test (`bvh_intersect_rolls_box_loop_and_validates`) and bit-exact GPU test covering `box32`, `box16`, sorting, `tmax` culling, grazing rays, NaN/inverted boxes, triangle, and instance nodes (`bvh_intersect_gpu_matches_box_sort_and_triangle`). **Tested** - Hardware: NVIDIA GeForce RTX 3050 6GB Laptop GPU (`32.0.16.2124`), Intel Core i5-12450HX, 24 GB RAM, Windows 11 Pro (`10.0.26300`), `rustc 1.100.0`, Windows SDK `10.0.26100.0` (`dxcompiler.dll` / `dxil.dll` `1.9.2602.17`), debug tests + release sweep/smoke. - `XCL_ADAPTER="rtx 3050" cargo test --workspace -- --test-threads=4` (rebased head `9503770` on `main` `8e87fc7`): **992 passed, 0 failed, 45 ignored** (both new BVH tests, `gpu_bvh_intersect_ray`, and all upstream `core_tests` / `msaa_tests` / `geometry_tests` / `round_tests` passed). - `SKIPPED` GPU tests on this adapter (24): 19 `no wave64` (`gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `lower::tests::*`, `lower_dxil::tests::*` wave64 arms), 3 per-lane wave32 unsupported f16/cvt arms (`f16_programs_on_the_gpu`, `f32_programs_on_the_gpu`), 1 `no heap windows` (`heap_window_out_of_memory_falls_back_to_the_switch_form`), 1 `0x887A002D` Developer Mode required (`pso_measurement_compiles_an_exact_synthetic_record`). - Retail `shaders.rpf` sweep (`xcl shaders <pack> --direct --validate --sample 500 --seed 1`, release): **408/408 translated (100.0%: 33 CS, 11 GS, 155 MS, 164 PS, 45 VS)**, 0 validator errors, 0 panics (`2.1 s`). **Regression run** ``` xcl-smoke v1 commit: 8e87fc7b62a87ea589ccb9ea6182f514016cf7db gpu: NVIDIA GeForce RTX 3050 6GB Laptop GPU title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1514 (PresentX 1514) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14719 MB ``` ``` xcl-smoke v1 commit: 95037704a20771e8fee14f7454ce8e6a5fa1d271 gpu: NVIDIA GeForce RTX 3050 6GB Laptop GPU title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1527 (PresentX 1527) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14714 MB ``` *(Note: `smoke.ps1` runs without `XCL_DIRECT_DXIL=1`, so this regression check verifies no default-path regression and is not a gameplay FPS claim for the BVH optimization.)* **Not tested** - Native wave64 GPUs (AMD RDNA2/3/4), Intel GPUs, `XCL_HEAP_WINDOWS=1` runtime runs, `XCL_DIRECT_DXIL=1` full RT title runs, and `XCL_SAMPLE_*` tests. **AI use** - Antigravity (Gemini 4 Neon) wrote the patch and tests, rebased onto `8e87fc7` (preserving `#1748` vector loads, `#1869`, and bumping `TRANSLATOR_VERSION` to `8`), ran the workspace suite, `--direct --validate` sweep, and `smoke.ps1` runs on this machine, and drafted this description.
Direct DXIL lowering of image_bvh_intersect_ray still unrolled box32 and box16 separately across all four children, emitting 8 copies of the slab intersection math, 2 copies of the sorting network, 24 legacyF16ToF32 conversions, and 11 box rawBufferLoads (15 total with triangle) per instruction.

- Unify ty == 4 (box16) and ty == 5 (box32) into one guarded region: load the 4 child pointers once via a 4-dword vectorized with_mem_i32s load, run a single rolled 4-iteration loop branching on ty == 5 only for the vectorized box32 (2 raw_loads) vs box16 (1 raw_load) AABB loads, and run one shared sorting network after the loop.
- Carry the four child (t, id) slots through a 3-slot explicit phi shift register without per-slot selects.
- Cuts per-instruction rawBufferLoads from 15 to 8 (box loads 11 -> 4) and legacyF16ToF32 calls from 24 to 6; bump TRANSLATOR_VERSION from 7 to 8.

Part of #1269.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:05:39 +00:00
Author
Owner

@⁠minimalhipster990 on GitHub · 2026-11-24 21:22 UTC · original

RTX 4090 benchmark for #1269 — retail BVH compute shader

On one retail wave32 compute shader, PR #1800 reduced median direct DXIL translation time by 15.4% across 11 paired trials. The validated DXIL container was 26.8% smaller. Both revisions returned the expected GPU results for the full shader on three controlled inputs and for both intersection instructions in isolation.

Measurement Immediate parent PR #1800
Direct DXIL translation, median [min–max], ms 5.336 [5.134–5.561] 4.517 [4.337–5.104]
D3D12 compute PSO creation, repeat median [min–max], ms 0.639 [0.609–0.872] 0.571 [0.527–0.829]
First observed PSO creation, one sample per build, ms 180.528 119.726
Validated DXIL container, bytes 32,512 23,792

The PR translated faster in 11/11 pairs and created the PSO faster in 9/11. Repeat median PSO creation time fell by 10.6%. The attempt to disable the implicit driver cache returned 0x887A002D on both builds. The first-observed row has one sample per revision with unknown initial cache state. A repeatable cold-driver compilation speedup remains unverified. Microsoft’s ShaderCacheControl documentation

Input, builds and timing method

  • Shader — deferred_tiled:CS_LaserLightShadowRaytracing_c3ab3042_Wrapped, the smallest qualifying program in a scan of first compute variants. All 3,332 bytes decoded to 642 instructions. The two exact image_bvh_intersect_ray instructions are at byte offsets 0x01C8 and 0x0880. Thread group size was 32 × 1 × 1.
  • Identity — Inflated input record FNV-1a-64 was 7118f495493c73af on both builds. The output container hashes were 0f9d95ebc5bb03e2 on the parent and f72e8ee89b9a12d5 on the PR. Every timed container passed explicit validation and reproduced its revision’s digest.
  • Revisions — Same timing harness, release profile and locked dependencies. Immediate parent 6c89285 · Tested PR head c2c5d73
  • System — NVIDIA GeForce RTX 4090, driver 621.24, AMD Ryzen 7 5800X3D, Windows 11 build 26300.10075, Rust 1.99.1, DXC and DXIL validator 1.9.2602.17. Tested 24 November 2026.
  • DXIL timer — CPU wall time around kernel::translate_compute on the direct DXIL path, wave32, one memory window. Archive I/O, shader selection, explicit validation, PSO creation and dispatch were outside the timer.
  • Driver timer — CPU wall time around the synchronous ID3D12Device::CreateComputePipelineState call. Device and root signature were ready before timing began. The application supplied no cached PSO blob. Each sample ran in a fresh process with alternating build order. Percentages compare medians for pairs 1–11. The parent pilot and pair 0 are listed separately below.

GPU correctness

Full retail shader. Both builds dispatched the original program on three inputs: a zero activity mask, an active mask with an empty root, and an active mask with a box32 root containing four invalid children. All 32 output words started at 0xdeadbeef. In every case all 32 lanes wrote the expected miss value 0x7f7fffff. Comparing the entire 20 KiB buffer against its expected contents found zero differing words. A separate coverage probe immediately after the first BVH instruction redirected participating lanes’ final stores outside the output descriptor. All 32 sentinels survived in the empty-box case, while both controls wrote all 32 outputs. This confirmed full-shader coverage of the first BVH site. All timing trials used the original program.

Both BVH instructions. We replayed each exact 20-byte instruction with its original register operands in a wave32 GPU readback harness. For each site we tested box32 and box16 nodes with four children, sorting on and off, and lanes containing a four-child hit, a distance-limited hit, a grazing ray and a miss. All 1,024 output words per revision (2 sites × 2 formats × 2 sort modes × 32 lanes × 4 words) matched both the geometric expectations and an independent HLSL + DXC GPU run bit for bit. Parent and PR readbacks also matched. The second site was covered by instruction replay. Full-program coverage of that site and a rendered gameplay frame remain untested.

Individual timings and readback digests

All times below are in nanoseconds. The standalone parent pilot recorded 11,507,100 ns for DXIL and 180,528,300 ns for PSO creation. Pair 0 contains the first PR invocation.

Pair Ran first Parent DXIL PR DXIL Parent PSO PR PSO
0 PR 5373600 4580400 998900 119726200
1 Parent 5336000 4558400 635200 542200
2 PR 5278100 5104300 761200 625500
3 Parent 5392300 4516800 622200 571200
4 PR 5560700 4337100 609100 527400
5 Parent 5154100 4391500 629800 528700
6 PR 5475000 4579500 641600 549800
7 Parent 5313600 4630600 871900 829300
8 PR 5377300 4431800 684300 576400
9 Parent 5424900 4367700 647600 796400
10 PR 5245500 4491400 638700 698700
11 Parent 5134300 4635100 617700 527900

Each site/format/sort combination produced 128 output words. For both sites, both box formats and both revisions, the FNV-1a-64 readback digest was a87dab4558a7e865 with sorting off and ef0749ae2a4b4ce5 with sorting on.

AI disclosure. Codex prepared the harness, ran the measurements on the RTX 4090 and drafted this report.

**@⁠minimalhipster990** on GitHub · 2026-11-24 21:22 UTC · [original](https://github.com/xcl-dev/xcl/pull/1800#issuecomment-7144840837) ## RTX 4090 benchmark for #1269 — retail BVH compute shader On one retail wave32 compute shader, PR #1800 reduced median direct DXIL translation time by **15.4%** across 11 paired trials. The validated DXIL container was **26.8% smaller**. Both revisions returned the expected GPU results for the full shader on three controlled inputs and for both intersection instructions in isolation. | Measurement | Immediate parent | PR #1800 | |---|---:|---:| | Direct DXIL translation, median [min–max], ms | 5.336 [5.134–5.561] | 4.517 [4.337–5.104] | | D3D12 compute PSO creation, repeat median [min–max], ms | 0.639 [0.609–0.872] | 0.571 [0.527–0.829] | | First observed PSO creation, one sample per build, ms | 180.528 | 119.726 | | Validated DXIL container, bytes | 32,512 | 23,792 | The PR translated faster in **11/11** pairs and created the PSO faster in **9/11**. Repeat median PSO creation time fell by **10.6%**. The attempt to disable the implicit driver cache returned `0x887A002D` on both builds. The first-observed row has one sample per revision with unknown initial cache state. A repeatable cold-driver compilation speedup remains unverified. [Microsoft’s ShaderCacheControl documentation](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device9-shadercachecontrol) ### Input, builds and timing method - **Shader** — `deferred_tiled:CS_LaserLightShadowRaytracing_c3ab3042_Wrapped`, the smallest qualifying program in a scan of first compute variants. All 3,332 bytes decoded to 642 instructions. The two exact `image_bvh_intersect_ray` instructions are at byte offsets `0x01C8` and `0x0880`. Thread group size was 32 × 1 × 1. - **Identity** — Inflated input record FNV-1a-64 was `7118f495493c73af` on both builds. The output container hashes were `0f9d95ebc5bb03e2` on the parent and `f72e8ee89b9a12d5` on the PR. Every timed container passed explicit validation and reproduced its revision’s digest. - **Revisions** — Same timing harness, release profile and locked dependencies. [Immediate parent 6c89285](https://github.com/xcl-dev/xcl/commit/6c89285b8b529bde59cd17a26b911c39912fb677) · [Tested PR head c2c5d73](https://github.com/xcl-dev/xcl/commit/c2c5d735b2144959a4a8aae12855d428b7932f46) - **System** — NVIDIA GeForce RTX 4090, driver 621.24, AMD Ryzen 7 5800X3D, Windows 11 build 26300.10075, Rust 1.99.1, DXC and DXIL validator 1.9.2602.17. Tested 24 November 2026. - **DXIL timer** — CPU wall time around `kernel::translate_compute` on the direct DXIL path, wave32, one memory window. Archive I/O, shader selection, explicit validation, PSO creation and dispatch were outside the timer. - **Driver timer** — CPU wall time around the synchronous `ID3D12Device::CreateComputePipelineState` call. Device and root signature were ready before timing began. The application supplied no cached PSO blob. Each sample ran in a fresh process with alternating build order. Percentages compare medians for pairs 1–11. The parent pilot and pair 0 are listed separately below. ### GPU correctness **Full retail shader.** Both builds dispatched the original program on three inputs: a zero activity mask, an active mask with an empty root, and an active mask with a box32 root containing four invalid children. All 32 output words started at `0xdeadbeef`. In every case all 32 lanes wrote the expected miss value `0x7f7fffff`. Comparing the entire 20 KiB buffer against its expected contents found **zero differing words**. A separate coverage probe immediately after the first BVH instruction redirected participating lanes’ final stores outside the output descriptor. All 32 sentinels survived in the empty-box case, while both controls wrote all 32 outputs. This confirmed full-shader coverage of the first BVH site. All timing trials used the original program. **Both BVH instructions.** We replayed each exact 20-byte instruction with its original register operands in a wave32 GPU readback harness. For each site we tested box32 and box16 nodes with four children, sorting on and off, and lanes containing a four-child hit, a distance-limited hit, a grazing ray and a miss. All **1,024 output words per revision** (2 sites × 2 formats × 2 sort modes × 32 lanes × 4 words) matched both the geometric expectations and an independent HLSL + DXC GPU run bit for bit. Parent and PR readbacks also matched. The second site was covered by instruction replay. Full-program coverage of that site and a rendered gameplay frame remain untested. <details> <summary>Individual timings and readback digests</summary> All times below are in nanoseconds. The standalone parent pilot recorded 11,507,100 ns for DXIL and 180,528,300 ns for PSO creation. Pair 0 contains the first PR invocation. | Pair | Ran first | Parent DXIL | PR DXIL | Parent PSO | PR PSO | |---:|---|---:|---:|---:|---:| | 0 | PR | 5373600 | 4580400 | 998900 | 119726200 | | 1 | Parent | 5336000 | 4558400 | 635200 | 542200 | | 2 | PR | 5278100 | 5104300 | 761200 | 625500 | | 3 | Parent | 5392300 | 4516800 | 622200 | 571200 | | 4 | PR | 5560700 | 4337100 | 609100 | 527400 | | 5 | Parent | 5154100 | 4391500 | 629800 | 528700 | | 6 | PR | 5475000 | 4579500 | 641600 | 549800 | | 7 | Parent | 5313600 | 4630600 | 871900 | 829300 | | 8 | PR | 5377300 | 4431800 | 684300 | 576400 | | 9 | Parent | 5424900 | 4367700 | 647600 | 796400 | | 10 | PR | 5245500 | 4491400 | 638700 | 698700 | | 11 | Parent | 5134300 | 4635100 | 617700 | 527900 | Each site/format/sort combination produced 128 output words. For both sites, both box formats and both revisions, the FNV-1a-64 readback digest was `a87dab4558a7e865` with sorting off and `ef0749ae2a4b4ce5` with sorting on. </details> **AI disclosure.** Codex prepared the harness, ran the measurements on the RTX 4090 and drafted this report.
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 22:37 UTC · original · edited 2026-11-24 22:46 UTC

Full-suite run, since this PR has no test report yet. Tested exact head 455e4ab (on its base 1d027e5).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, 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: 956 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: bvh_intersect_rolls_box_loop_and_validates, bvh_intersect_gpu_matches_box_sort_and_triangle.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 961 passed, 0 failed, 43 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))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • On NVIDIA, --skip leaves out five tests where this PR's base has them. They fail on main 689f2db too, not because of this PR: under XCL_REQUIRE_GPU=mesh, runner::skip_test turns their skips into failures. These are 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). The AMD run does not set XCL_REQUIRE_GPU.

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 22:37 UTC · [original](https://github.com/xcl-dev/xcl/pull/1800#issuecomment-7146452492) · edited 2026-11-24 22:46 UTC Full-suite run, since this PR has no test report yet. Tested exact head `455e4ab` (on its base `1d027e5`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, 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`: **956 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: `bvh_intersect_rolls_box_loop_and_validates`, `bvh_intersect_gpu_matches_box_sort_and_triangle`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **961 passed, 0 failed, 43 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))), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - On NVIDIA, `--skip` leaves out five tests where this PR's base has them. They fail on main `689f2db` too, not because of this PR: under `XCL_REQUIRE_GPU=mesh`, `runner::skip_test` turns their skips into failures. These are `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)). The AMD run does not set `XCL_REQUIRE_GPU`. **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

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

Tested

PR #1800 was open at 95037704a20771e8fee14f7454ce8e6a5fa1d271 before and after testing. The assigned STOR-WINLAB checkout was clean and detached at that SHA for both runs. I found no equivalent Intel Arc A770 result in the PR discussion or GPU test reports (#42).

STOR-WINLAB ran Windows 11 Enterprise Evaluation 26200.9974 on an AMD Ryzen 7 3800X with an Intel Arc A770 (driver 32.0.101.9175, XCL_ADAPTER=A770). Rust and Cargo were 1.100.0 on x86_64-pc-windows-msvc (rustc 0ef1bc386). Both runs logged DXC and DXIL 1.9.2609.5 from %LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64 via XCL_DXC_DIR. Cargo used the unoptimized test profile with CARGO_BUILD_JOBS=2, CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0 and CARGO_TARGET_DIR=L:/XclTooling/pr1947-1831ec4-t3-97236edf/target. TEMP and TMP were L:/XclTooling/pr1800/temp.

cargo test --locked -p xcl --lib --no-run --message-format=json
$fixtureExe = 'L:/XclTooling/pr1947-1831ec4-t3-97236edf/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe'
& $fixtureExe --exact gpu::dxil::core_tests::bvh_intersect_rolls_box_loop_and_validates --nocapture --test-threads=1
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test { & $fixtureExe --exact gpu::dxil::core_tests::bvh_intersect_gpu_matches_box_sort_and_triangle --nocapture --test-threads=1 }
  • Prebuild completed outside the mutex in 59.70 s. The GPU wrapper ran in a fresh PowerShell with -NoProfile -ExecutionPolicy RemoteSigned and logged mutex acquisition and release. All three processes exited 0.
  • CPU/DXC (0.09 s) validated the rolled box loop across the fixture's wave and memory-window configurations. Disassembly assertions confirmed eight raw-buffer loads per generic BVH instruction (four box, four triangle), six f16-to-f32 conversions and a float phi.
  • Arc A770 (4.76 s) matched the fixture's expected box32/box16 ordering, ray and node edge cases, and triangle hit/miss outputs. Direct DXIL and HLSL/DXC matched bit for bit across 28 output VGPRs in each of 64 logical lanes.
  • Each exact filter reported 1 passed, 0 failed, 0 ignored, 0 skipped, with 967 filtered out. Both fixtures used checked-in synthetic inputs.

Not tested

PR #1959's triangle type-2/type-3 fixtures, native wave64 GPU execution, other adapters, the workspace suite, retail titles and smoke/regression runs.

AI use

T3 Code / Codex gpt-6.2-sol ran both fixtures and wrote this report.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 06:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/1800#issuecomment-7155302216) **Tested** [PR #1800](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1800) was open at `95037704a20771e8fee14f7454ce8e6a5fa1d271` before and after testing. The assigned STOR-WINLAB checkout was clean and detached at that SHA for both runs. I found no equivalent Intel Arc A770 result in the PR discussion or [GPU test reports (#42)](https://git.gtahub.st/github/xcl-dev--xcl/issues/42). STOR-WINLAB ran Windows 11 Enterprise Evaluation 26200.9974 on an AMD Ryzen 7 3800X with an Intel Arc A770 (driver 32.0.101.9175, `XCL_ADAPTER=A770`). Rust and Cargo were 1.100.0 on `x86_64-pc-windows-msvc` (rustc `0ef1bc386`). Both runs logged DXC and DXIL 1.9.2609.5 from `%LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64` via `XCL_DXC_DIR`. Cargo used the unoptimized test profile with `CARGO_BUILD_JOBS=2`, `CARGO_INCREMENTAL=0`, `CARGO_PROFILE_DEV_DEBUG=0`, `CARGO_PROFILE_TEST_DEBUG=0` and `CARGO_TARGET_DIR=L:/XclTooling/pr1947-1831ec4-t3-97236edf/target`. `TEMP` and `TMP` were `L:/XclTooling/pr1800/temp`. ```powershell cargo test --locked -p xcl --lib --no-run --message-format=json $fixtureExe = 'L:/XclTooling/pr1947-1831ec4-t3-97236edf/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe' & $fixtureExe --exact gpu::dxil::core_tests::bvh_intersect_rolls_box_loop_and_validates --nocapture --test-threads=1 & 'L:/XclTooling/Invoke-ArcTest.ps1' -Test { & $fixtureExe --exact gpu::dxil::core_tests::bvh_intersect_gpu_matches_box_sort_and_triangle --nocapture --test-threads=1 } ``` - Prebuild completed outside the mutex in 59.70 s. The GPU wrapper ran in a fresh PowerShell with `-NoProfile -ExecutionPolicy RemoteSigned` and logged mutex acquisition and release. All three processes exited 0. - CPU/DXC (0.09 s) validated the rolled box loop across the fixture's wave and memory-window configurations. Disassembly assertions confirmed eight raw-buffer loads per generic BVH instruction (four box, four triangle), six f16-to-f32 conversions and a float phi. - Arc A770 (4.76 s) matched the fixture's expected box32/box16 ordering, ray and node edge cases, and triangle hit/miss outputs. Direct DXIL and HLSL/DXC matched bit for bit across 28 output VGPRs in each of 64 logical lanes. - Each exact filter reported **1 passed, 0 failed, 0 ignored, 0 skipped**, with 967 filtered out. Both fixtures used checked-in synthetic inputs. **Not tested** PR #1959's triangle type-2/type-3 fixtures, native wave64 GPU execution, other adapters, the workspace suite, retail titles and smoke/regression runs. **AI use** T3 Code / Codex `gpt-6.2-sol` ran both fixtures and wrote this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 06:19 UTC · original

Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current main on the new head — needs another rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-26 06:19 UTC · [original](https://github.com/xcl-dev/xcl/pull/1800#issuecomment-7184323551) Re-verification on RTX 3060 Ti (Windows 11): still a **merge conflict with current `main`** on the new head — needs another rebase before it can be tested.
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/gpu/dxil/core_tests.rs
  • crates/xcl/src/gpu/dxil/kernel.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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