Repository navigation
Tests: verify direct DXIL vs HLSL GPU parity for BVH ray-box and ray-triangle ops - #2087
ramon-victor wants to merge 1 commit into
Conversation
PR #2087 — Arc A770 ray-triangle parityTested
Commands $runDir = 'L:/XclTooling/pr2087/dc0ef7f-20261125T034142015Z'
$env:TEMP = Join-Path $runDir 'temp'
$env:TMP = $env:TEMP
$env:CARGO_TARGET_DIR = 'L:/XclTooling/pr1778-2e2ee55-20261125-020159/target'
$env:CARGO_BUILD_JOBS = '2'
$env:CARGO_INCREMENTAL = '0'
$env:CARGO_PROFILE_DEV_DEBUG = '0'
$env:CARGO_PROFILE_TEST_DEBUG = '0'
$env:XCL_ADAPTER = 'A770'
$env:XCL_DXC_DIR = Join-Path $env:LOCALAPPDATA 'XclTooling/dxc-1.9.2609/bin/x64'
$env:Path = "$env:USERPROFILE/.cargo/bin;$env:Path"
cargo test --locked -p xcl --test gpu_dxil_bvh_parity --no-run --message-format=json-render-diagnostics
$env:XCL_PR2087_TEST_EXE = [IO.File]::ReadAllText((Join-Path $runDir 'test-executable.txt'))
# This block ran in powershell.exe -NoProfile -ExecutionPolicy RemoteSigned -EncodedCommand.
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test {
& $env:XCL_PR2087_TEST_EXE --exact direct_dxil_bvh_triangle_pair_and_bvh64_parity --test-threads=1 --nocapture
}Cargo's JSON artifact record selected the executable. The build and run logs, exit codes, and executable path are stored beside this report. The wrapper logged lock release, and the assigned Cargo target slot is released. Not tested Box32/Box16 and EXEC masks, multi-window addressing, native Wave64, other adapters, the workspace suite, retail data, and title smoke runs. AI use T3 Code / Codex ( |
|
Native 64-lane wave64 run on AMD, which this PR lists as not tested (the RTX 3070 ran wave64 split; the other report here is Arc). AMD also has hardware ray accelerators, so this is the BVH parity on a GPU with its own RT units. Tested: pass, head
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report. |
|
A run with vkd3d-proton as the host D3D12, so both the direct DXIL and the HLSL → DXC output go through dxil-spirv and the NVIDIA Vulkan driver: all 3 parity tests pass, none skipped. Tested
Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Independent desktop NVIDIA verification of PR #2087 at head Environment
Targeted GPU parity tests & build (
|
| Command | Result |
|---|---|
cargo test --release -p xcl --test gpu_dxil_bvh_parity -- --nocapture (3 consecutive runs) |
3 passed; 0 failed; 0 ignored; 0 filtered out × 3 (2.42s, 0.79s, 0.56s, 0 skipped; live RTX 4060 wave32 + split-wave64 execution of direct_dxil_bvh_box32_box16_and_exec_mask_parity, direct_dxil_bvh_triangle_pair_and_bvh64_parity, and UMA 2-window direct_dxil_bvh64_multi_window_parity) |
cargo build --release -p xcl |
Clean build (1.94s incremental --test compile + 0.06s incremental --release build, exit 0, 0 new warnings) |
Paired quiet 60 s retail smoke (title: 29640639)
Exact parent & merge-base (cbc296ab65a2661a61e3e2da109134bcd5319f60, cached baseline on the same machine):
xcl-smoke v1
commit: cbc296ab65a2661a61e3e2da109134bcd5319f60
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1572 (PresentX 1572)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14509 MB
PR #2087 (dc0ef7fd41b702a7cdad5bb4b0772a780af0f699):
xcl-smoke v1
commit: dc0ef7fd41b702a7cdad5bb4b0772a780af0f699
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1509 (PresentX 1509)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14475 MB
Limits of coverage
- This PR is test-only (
crates/xcl/tests/gpu_dxil_bvh_parity.rs,0production-code changes); all 3 direct-DXIL vs. HLSL BVH ray-box, ray-triangle, and UMA 2-windowbvh64differential parity tests executed and passed3/3on desktop RTX 4060 acrosswave32andsplit-wave64(gpu_modes()omits native Wave64 on Wave32-only Ada). - The 60 s retail smoke confirms non-regression of the unchanged runtime binary at this commit (single-run frame/commit delta vs. cached parent reflects normal startup variance, not this PR).
AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
|
merge-check claim |
|
merge-check |
|
merge-check Finding and tested candidate The triangle descriptor at line 207 hardcodes word 3 to zero. Since a173b472, both translators honor bit 24: mode 0 returns triangle ID/status in dwords 2/3; mode 1 returns barycentric numerators. On lane 6, mode 0 returns raw dwords Only change the triangle test's descriptor line to use the existing helper: st.sgpr[8..12].copy_from_slice(&bvh_words(base as u64, true));All original inputs and assertions were retained. Box/EXEC-mask and multi-window tests pass on both versions; the triangle test changes from fail to pass. Additional verification An owned diagnostic runs both return modes through HLSL/DXC and direct DXIL, with BVH32 and BVH64 instructions, in wave32 and non-split wave64 configurations. Three fresh processes: 1 passed, 0 failed, 0 ignored each, zero skips. Mode 0 checks integer ID/status; mode 1 checks barycentrics. Captured inputs were independently regenerated and all 576 lane records / 9,216 GPU result words checked against planar geometry and typed results; normalized geometric error below 7.5e-8. Repeat captures are identical. Not tested Native Windows, other GPUs, split-wave64, a separate physical-wave-width probe, full workspace suite, retail titles, AI use Codex (GPT-6, exact serving variant not exposed) reviewed the diff and descriptor history, ran the comparisons, prepared the local candidate and diagnostic, independently verified captures and source/binary provenance, and drafted this report. Publication authorized by the account owner. |
|
Test-only: adds AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
Add GPU differential parity tests between the direct RDNA2 → DXIL translator (
xcl::gpu::dxil::kernel::translate, validated withdxil.dll), the HLSL + DXC path (xcl::gpu::recomp), and the CPU BVH reference (xcl::gpu::bvh::intersect_node) forIMAGE_BVH_INTERSECT_RAYandIMAGE_BVH64_INTERSECT_RAYacross wave32 and wave64 (split wave64 on wave32-only GPUs). Test-only change; no runtime files modified.What is in it
crates/xcl/tests/gpu_dxil_bvh_parity.rs:direct_dxil_bvh_box32_box16_and_exec_mask_parity: Box32 sorted and unsorted child ordering, Box16 half-precision bounds,t_maxculling, NaN-disabled and inverted boxes, axis-aligned grazing rays (dx == 0,inv.x == +inf), full misses, and inactiveEXECdestination preservation.direct_dxil_bvh_triangle_pair_and_bvh64_parity: rotated quad triangle pair (tri0/tri1) through bothIMAGE_BVH_INTERSECT_RAYandIMAGE_BVH64_INTERSECT_RAY, asserting parity across Direct DXIL, HLSL+DXC, and CPUbvh::intersect_node.direct_dxil_bvh64_multi_window_parity: 2-window UMA arena (Uma::with_windows(2, 1 MiB)) with BVH in window 1 and poisoned decoy in window 0, checking both 64-bit node pointers (IMAGE_BVH64_INTERSECT_RAY, base 0) and 48-bitbvh_wordsdescriptors (IMAGE_BVH_INTERSECT_RAY).Tested
x86_64-pc-windows-msvc), DXC 1.8.2502.11 (Windows SDK 10.0.26100.0), debug build.cargo test -p xcl --test gpu_dxil_bvh_parity -- --nocapture: 3 passed, 0 failed, 0 ignored (0 SKIPPED; each test ran both wave32 and split wave64 through both Direct DXIL and HLSL+DXC)..\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4) on headdc0ef7f: 1157 passed, 0 failed, 46 ignored (24 SKIPPED GPU tests: 20no wave64, 3per-lane form#1426, 1no heap windows).Not tested
AI use