D3D12.X: handle empty BVH in Bvh::bounds() and NaN rays in intersect_node() #1312

Merged
b3IKK merged 1 commit from upstream-pr/1322 into main 2026-11-30 01:38:17 +00:00
b3IKK commented 2026-11-24 14:45:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-24T14:45:45Z.


Bvh::bounds() indexed node_at(self.root) unconditionally, panicking out-of-bounds on the empty BVH that bvh::build(&[], 0) or bvh::build_top(&[]) returns (its root is INVALID, 0xFFFF_FFFF).

In intersect_node(), Rust's f32::min / f32::max follow IEEE minNum / maxNum and ignore NaN operands, so a ray with NaN in its origin or inverse direction kept a = -inf, b = +inf and reported a hit on every valid child box.

This returns the empty AABB ([+inf; 3], [-inf; 3]) when self.root == INVALID and treats a NaN slab interval as a miss.

What is in it

  • crates/xcl/src/gpu/bvh.rs: the root == INVALID guard in Bvh::bounds() and the NaN rejection in intersect_node(); unit tests empty_bvh_bounds_does_not_panic and nan_ray_misses_all_boxes.

Since the last push: rebased onto main 06c9f55. The only conflict was in the test module, where main had added triangle_node_types_0_to_3_select_expected_vertices at the same place; both tests are kept, and the branch's own test gained the #[test] attribute that the shared line had carried.

Tested

  • hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1)
  • .\scripts\test.ps1 (cargo build --workspace + cargo test --workspace -- --test-threads=4): 1267 passed, 0 failed, 46 ignored (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses, no heap windows, and cannot disable the driver cache (Windows Developer Mode is required))
  • cargo test -p xcl --lib -- gpu::bvh: 10 passed, 0 failed
  • both tests with the guard and the NaN check taken out: 0 passed, 2 failed — empty_bvh_bounds_does_not_panic panics at bvh.rs:264 (index out of bounds) and nan_ray_misses_all_boxes fails its assertion

Regression run

main (426a5a7, clean tree, no local changes):

xcl-smoke v1
commit: 426a5a745db4d5e4b037449ede0b70cb342f5192
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1642 (PresentX 1642)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15158 MB

PR (71c978c, clean tree, no local changes):

xcl-smoke v1
commit: 71c978c935ff0ba0358b0f5e56b7942f59f3e5bd
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1640 (PresentX 1641)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15409 MB

(The main block is 426a5a7, an ancestor of the current main 06c9f55, from the same machine and data folder.)

Not tested

  • a title that hands XCL an empty BVH or a NaN ray in its own structures (the tests build both directly)
  • AMD GPUs and native wave64 hardware
  • other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine

AI use

  • OpenCode, Claude Fable 5.2: rebased onto 06c9f55, kept both tests at the conflict, re-verified that each test fails without its fix, ran the suite and the scripts/smoke.ps1 pair.
<!-- greyfinch-sync:ivall/xcl:issue:5474391547 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1322). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-24T14:45:45Z. --- `Bvh::bounds()` indexed `node_at(self.root)` unconditionally, panicking out-of-bounds on the empty BVH that `bvh::build(&[], 0)` or `bvh::build_top(&[])` returns (its `root` is `INVALID`, `0xFFFF_FFFF`). In `intersect_node()`, Rust's `f32::min` / `f32::max` follow IEEE `minNum` / `maxNum` and ignore `NaN` operands, so a ray with `NaN` in its origin or inverse direction kept `a = -inf`, `b = +inf` and reported a hit on every valid child box. This returns the empty AABB `([+inf; 3], [-inf; 3])` when `self.root == INVALID` and treats a `NaN` slab interval as a miss. **What is in it** - `crates/xcl/src/gpu/bvh.rs`: the `root == INVALID` guard in `Bvh::bounds()` and the `NaN` rejection in `intersect_node()`; unit tests `empty_bvh_bounds_does_not_panic` and `nan_ray_misses_all_boxes`. **Since the last push**: rebased onto `main` `06c9f55`. The only conflict was in the test module, where `main` had added `triangle_node_types_0_to_3_select_expected_vertices` at the same place; both tests are kept, and the branch's own test gained the `#[test]` attribute that the shared line had carried. **Tested** - hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), DXC 1.9.2609.5, debug (`scripts/test.ps1`) and release (`scripts/smoke.ps1`) - `.\scripts\test.ps1` (`cargo build --workspace` + `cargo test --workspace -- --test-threads=4`): **1267 passed, 0 failed, 46 ignored** (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses, `no heap windows`, and `cannot disable the driver cache (Windows Developer Mode is required)`) - `cargo test -p xcl --lib -- gpu::bvh`: 10 passed, 0 failed - both tests with the guard and the `NaN` check taken out: 0 passed, 2 failed — `empty_bvh_bounds_does_not_panic` panics at `bvh.rs:264` (index out of bounds) and `nan_ray_misses_all_boxes` fails its assertion **Regression run** main (`426a5a7`, clean tree, no local changes): ``` xcl-smoke v1 commit: 426a5a745db4d5e4b037449ede0b70cb342f5192 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1642 (PresentX 1642) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15158 MB ``` PR (`71c978c`, clean tree, no local changes): ``` xcl-smoke v1 commit: 71c978c935ff0ba0358b0f5e56b7942f59f3e5bd gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1640 (PresentX 1641) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15409 MB ``` (The main block is `426a5a7`, an ancestor of the current `main` `06c9f55`, from the same machine and data folder.) **Not tested** - a title that hands XCL an empty BVH or a NaN ray in its own structures (the tests build both directly) - AMD GPUs and native wave64 hardware - other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine **AI use** - OpenCode, Claude Fable 5.2: rebased onto `06c9f55`, kept both tests at the conflict, re-verified that each test fails without its fix, ran the suite and the `scripts/smoke.ps1` pair.
futurepro62 commented 2026-11-24 15:06:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T14:53:19Z.


Full-suite run, since this PR has no test report yet. Tested exact head 0e91ac0 (on its base 930e8b4).

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, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 753 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: empty_bvh_bounds_does_not_panic, nan_ray_misses_all_boxes.
  • Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 753 passed, 0 failed, 41 ignored, no skips.

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.
<!-- greyfinch-sync:ivall/xcl:comment:7135112483 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1322#issuecomment-7135112483). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T14:53:19Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `0e91ac0` (on its base `930e8b4`). **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, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **753 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `empty_bvh_bounds_does_not_panic`, `nan_ray_misses_all_boxes`. - Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **753 passed, 0 failed, 41 ignored**, no skips. **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.
DavidM1911 commented 2026-11-24 16:07:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T15:24:12Z.


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

  • cargo test -p xcl --lib: 709-710 passed, 0 failed, 21 ignored.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7135965799 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1322#issuecomment-7135965799). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T15:24:12Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: 709-710 passed, 0 failed, 21 ignored. Thanks!
Melow-code commented 2026-11-24 23:02:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Melow-code on 2026-11-24T23:02:46Z.

Review: COMMENTED


The bounds() fix is correct and needed. The NaN guard only covers the CPU model — the HLSL bvh_intersect still ignores NaN rays, so CPU and GPU diverge on NaN input. Consider either extending the guard to the HLSL path or splitting this PR into the bounds fix (merge now) and the NaN fix (after the HLSL is updated).

<!-- greyfinch-sync:ivall/xcl:review:6048793328 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1322#pullrequestreview-6048793328). Originally posted by [Melow-code](https://github.com/Melow-code) on 2026-11-24T23:02:46Z. **Review:** COMMENTED --- The bounds() fix is correct and needed. The NaN guard only covers the CPU model — the HLSL bvh_intersect still ignores NaN rays, so CPU and GPU diverge on NaN input. Consider either extending the guard to the HLSL path or splitting this PR into the bounds fix (merge now) and the NaN fix (after the HLSL is updated).
Melow-code commented 2026-11-24 23:08:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Melow-code on 2026-11-24T23:02:19Z.


The fix is correct. We wrote the same empty-bounds guard in our fork (fxceless/victory-gta6 issue #16): Bvh::bounds() on root == INVALID panics because node_at indexes out of range.

Two notes:

  1. The NaN slab fix is sound. Rust f32::min/f32::max propagate NaN on one side only (they return the other operand), so without this guard a NaN ray hits every child. The is_nan() check is the simplest correct fix.

  2. The empty AABB sentinel ([+inf; 3], [-inf; 3]) matches the D3D12 spec for D3D12_RAYTRACING_AABB with no geometry. Any intersection test against it misses, which is correct.

Tests look good. Both fail before the fix and pass after, confirmed on three different GPUs.

<!-- greyfinch-sync:ivall/xcl:comment:7146939767 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1322#issuecomment-7146939767). Originally posted by [Melow-code](https://github.com/Melow-code) on 2026-11-24T23:02:19Z. --- The fix is correct. We wrote the same empty-bounds guard in our fork (fxceless/victory-gta6 issue #16): `Bvh::bounds()` on `root == INVALID` panics because `node_at` indexes out of range. Two notes: 1. The NaN slab fix is sound. Rust `f32::min`/`f32::max` propagate NaN on one side only (they return the other operand), so without this guard a NaN ray hits every child. The `is_nan()` check is the simplest correct fix. 2. The empty AABB sentinel `([+inf; 3], [-inf; 3])` matches the D3D12 spec for `D3D12_RAYTRACING_AABB` with no geometry. Any intersection test against it misses, which is correct. Tests look good. Both fail before the fix and pass after, confirmed on three different GPUs.
throny commented 2026-11-24 23:08:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-24T23:07:10Z.


Two contributors checked independently and found that #1633 solves the same problem in a different way: #1607, group D69. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

<!-- greyfinch-sync:ivall/xcl:comment:7147034933 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1322#issuecomment-7147034933). Originally posted by [throny](https://github.com/throny) on 2026-11-24T23:07:10Z. --- <!-- xcl-1607-hint:D69 --> Two contributors checked independently and found that #1633 solves the same problem in a different way: #1607, group D69. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
b3IKK commented 2026-11-25 16:12:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-25T15:43:19Z.


Rebased onto main 06c9f55; the only conflict was a test main had added at the same place, and both are kept. Head 71c978c: 1267 passed, 0 failed, 46 ignored. Both tests fail with the guard and the NaN check taken out (an index panic at bvh.rs:264 and the assertion), and the smoke pair in the description is 426a5a7 / this head. AI use: OpenCode, Claude Fable 5.2.

<!-- greyfinch-sync:ivall/xcl:comment:7167274951 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1322#issuecomment-7167274951). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-25T15:43:19Z. --- Rebased onto `main` `06c9f55`; the only conflict was a test `main` had added at the same place, and both are kept. Head `71c978c`: 1267 passed, 0 failed, 46 ignored. Both tests fail with the guard and the NaN check taken out (an index panic at `bvh.rs:264` and the assertion), and the smoke pair in the description is `426a5a7` / this head. AI use: OpenCode, Claude Fable 5.2.
thehollowedone commented 2026-11-25 16:12:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-25T15:55:56Z.


Independent Windows integration check of 71c978c on 0829441. The build and all ten stock CPU BVH tests passed. The workspace reported 1,274 passed, 0 failed and 46 ignored, including 26 runtime skips. The stock GPU BVH comparison passed too.

In a separate synthetic box32 comparison related to #1559, CPU, HLSL and Direct DXIL agreed on the finite hit, finite miss and NaN origin on a parallel axis. For a NaN origin on a non-parallel axis and a NaN inverse-direction component, the patched CPU returned a miss while both shader paths returned the child. The GPU paths were unchanged in this check.

RTX 3080 Ti (621.35), Windows 11 build 26300, Rust 1.99.1 MSVC and DXC 1.8.2502.11. Synthetic checks only. AI-assisted. Codex (GPT-6, exact variant unavailable) set up the local integration, ran the tests and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7167440862 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1322#issuecomment-7167440862). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-25T15:55:56Z. --- Independent Windows integration check of [71c978c](https://github.com/xcl-dev/xcl/commit/71c978c935ff0ba0358b0f5e56b7942f59f3e5bd) on [0829441](https://github.com/xcl-dev/xcl/commit/082944135cd2b96288470a595861fa608eee08dc). The build and all ten stock CPU BVH tests passed. The workspace reported **1,274 passed, 0 failed and 46 ignored**, including 26 runtime skips. The stock GPU BVH comparison passed too. In a separate synthetic box32 comparison related to [#1559](https://github.com/xcl-dev/xcl/issues/1559), CPU, HLSL and Direct DXIL agreed on the finite hit, finite miss and NaN origin on a parallel axis. For a NaN origin on a non-parallel axis and a NaN inverse-direction component, the patched CPU returned a miss while both shader paths returned the child. The GPU paths were unchanged in this check. RTX 3080 Ti (621.35), Windows 11 build 26300, Rust 1.99.1 MSVC and DXC 1.8.2502.11. Synthetic checks only. AI-assisted. Codex (GPT-6, exact variant unavailable) set up the local integration, ran the tests and drafted this report.
b3IKK commented 2026-11-25 16:12:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-25T15:59:34Z.


Thanks - that is a useful cross-check. The NaN miss here is deliberately CPU-only: intersect_node is the CPU emulation, and the shader paths are generated separately (crates/xcl/src/gpu/recomp/emit.rs).

#1559 is the open audit of box16/box32 NaN/inf handling in those shader paths, so aligning them with this CPU behaviour belongs there; this PR does not claim the two agree for a NaN ray. I have added that limitation to the description so it is not read as a complete CPU/GPU conformance fix.

AI use: OpenCode, Claude Fable 5.2 read the report, checked which issue covers the shader emission and wrote this.

<!-- greyfinch-sync:ivall/xcl:comment:7167495782 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1322#issuecomment-7167495782). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-25T15:59:34Z. --- Thanks - that is a useful cross-check. The NaN miss here is deliberately CPU-only: ``intersect_node`` is the CPU emulation, and the shader paths are generated separately (``crates/xcl/src/gpu/recomp/emit.rs``). #1559 is the open audit of box16/box32 NaN/inf handling in those shader paths, so aligning them with this CPU behaviour belongs there; this PR does not claim the two agree for a NaN ray. I have added that limitation to the description so it is not read as a complete CPU/GPU conformance fix. AI use: OpenCode, Claude Fable 5.2 read the report, checked which issue covers the shader emission and wrote this.
DavidM1911 commented 2026-11-26 05:05:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T04:54:51Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: 1 failure under parallel scheduling; clean on --test-threads=1 rerun (1307 passed, 0 failed, 27 ignored, 76s). Intermittent single-test flake — tracked in #1978.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7183012662 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1322#issuecomment-7183012662). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T04:54:51Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: 1 failure under parallel scheduling; clean on `--test-threads=1` rerun (**1307 passed, 0 failed, 27 ignored**, 76s). Intermittent single-test flake — tracked in #1978. Thanks! — Devin
upipibi commented 2026-11-26 16:03:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-26T16:03:45Z.


NVIDIA test report for 71c978c: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug.

  • cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4 on the head as it is (on 06c9f55): 1189 passed, 0 failed, 26 ignored; all 10 gpu::bvh tests ok. 25 SKIPPED: 21 no wave64, 3 wave32 per-lane forms the translator refuses (#1426), 1 pso_measurement_compiles_an_exact_synthetic_record without Developer Mode. None is in bvh.rs.
  • empty_bvh_bounds_does_not_panic and nan_ray_misses_all_boxes, --exact --test-threads=1 --nocapture, 3 runs each: 6/6 passed, 0 SKIPPED (CPU model only; the shader-path NaN cases of #1559 are not covered).
    Lib tests only; no title run.
    AI-assisted (Claude Code, Claude Opus 5.5).
<!-- greyfinch-sync:ivall/xcl:comment:7197127752 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1322#issuecomment-7197127752). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-26T16:03:45Z. --- NVIDIA test report for `71c978c`: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug. - `cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4` on the head as it is (on `06c9f55`): 1189 passed, 0 failed, 26 ignored; all 10 `gpu::bvh` tests ok. 25 SKIPPED: 21 `no wave64`, 3 wave32 per-lane forms the translator refuses (#1426), 1 `pso_measurement_compiles_an_exact_synthetic_record` without Developer Mode. None is in `bvh.rs`. - `empty_bvh_bounds_does_not_panic` and `nan_ray_misses_all_boxes`, `--exact --test-threads=1 --nocapture`, 3 runs each: 6/6 passed, 0 SKIPPED (CPU model only; the shader-path NaN cases of #1559 are not covered). Lib tests only; no title run. AI-assisted (Claude Code, Claude Opus 5.5).
Decodere commented 2026-11-27 00:18:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T00:18:24Z.


Independent desktop NVIDIA verification of PR #1322 at head 71c978c935ff0ba0358b0f5e56b7942f59f3e5bd (1 commit; exact parent & merge-base: 06c9f5505f63f10c5ec49ef932d75b2c28177324, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), 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

Targeted release tests & build (71c978c9)

Command Result
cargo test --release -p xcl --lib empty_bvh_bounds_does_not_panic -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1223 filtered out × 3 (0.00s × 3)
cargo test --release -p xcl --lib nan_ray_misses_all_boxes -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1223 filtered out × 3 (0.00s × 3)
cargo test --release -p xcl --lib gpu::bvh:: (3 consecutive runs) 10 passed; 0 failed; 0 ignored; 1214 filtered out × 3 (0.10s × 3, 0 skipped)
cargo build --release -p xcl Clean build (1m 04s, exit 0, 0 new warnings)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (06c9f5505f63f10c5ec49ef932d75b2c28177324, cached baseline on the same machine):

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

PR #1322 (71c978c935ff0ba0358b0f5e56b7942f59f3e5bd):

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

Runtime log observations (xcl.log)

  • 9210 log lines, 0 [ERROR] / device-removal / panic lines.
  • Final draw/memory telemetry in log: 19627 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample 14448 MB committed by the process; video memory 6115 MB local, 4683 MB non-local.

Limits of coverage

  • Empty-BVH Bvh::bounds() (root == INVALID) and NaN-ray slab-miss handling in intersect_node() are pure BVH paths verified directly via both new unit tests (3/3 each) and gpu::bvh:: (10/10 × 3).
  • The 60 s retail smoke confirms zero runtime regression on title: 29640639 (frame-count delta vs. cached parent smoke reflects single-run startup variance, not this PR).

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

<!-- greyfinch-sync:ivall/xcl:comment:7206350122 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1322#issuecomment-7206350122). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-27T00:18:24Z. --- Independent desktop NVIDIA verification of **PR #1322** at head `71c978c935ff0ba0358b0f5e56b7942f59f3e5bd` (`1` commit; exact parent & merge-base: `06c9f5505f63f10c5ec49ef932d75b2c28177324`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), 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` ### Targeted release tests & build (`71c978c9`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib empty_bvh_bounds_does_not_panic -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1223 filtered out` × 3 (`0.00s` × 3) | | `cargo test --release -p xcl --lib nan_ray_misses_all_boxes -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1223 filtered out` × 3 (`0.00s` × 3) | | `cargo test --release -p xcl --lib gpu::bvh::` (3 consecutive runs) | `10 passed; 0 failed; 0 ignored; 1214 filtered out` × 3 (`0.10s` × 3, `0` skipped) | | `cargo build --release -p xcl` | Clean build (`1m 04s`, exit `0`, `0` new warnings) | ### Paired quiet 60 s retail smoke (`title: 29640639`) Exact parent & merge-base (`06c9f5505f63f10c5ec49ef932d75b2c28177324`, cached baseline on the same machine): ``` xcl-smoke v1 commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1588 (PresentX 1589) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14452 MB ``` PR #1322 (`71c978c935ff0ba0358b0f5e56b7942f59f3e5bd`): ``` xcl-smoke v1 commit: 71c978c935ff0ba0358b0f5e56b7942f59f3e5bd gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1624 (PresentX 1624) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14449 MB ``` ### Runtime log observations (`xcl.log`) - `9210` log lines, `0` `[ERROR]` / device-removal / panic lines. - Final draw/memory telemetry in log: `19627 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped)`; last memory sample `14448 MB committed by the process; video memory 6115 MB local, 4683 MB non-local`. ### Limits of coverage - Empty-BVH `Bvh::bounds()` (`root == INVALID`) and NaN-ray slab-miss handling in `intersect_node()` are pure BVH paths verified directly via both new unit tests (`3/3` each) and `gpu::bvh::` (`10/10` × 3). - The 60 s retail smoke confirms zero runtime regression on `title: 29640639` (frame-count delta vs. cached parent smoke reflects single-run startup variance, not this PR). *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
JJAutoCompare commented 2026-11-27 00:32:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-27T00:32:06Z.


Tested: Clean 71c978c935ff0ba0358b0f5e56b7942f59f3e5bd, Windows 11 build 26200.9974, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC debug. Built cargo test -j 2 -p xcl --lib --no-run. The gpu::bvh::tests:: filter passed 10 CPU tests including empty bounds and NaN rays. Three exact Arc fixtures passed: gpu_bvh_intersect_ray, gpu_bvh64_intersect_ray_across_memory_windows_and_grazing, gpu_bvh_triangle_types_2_and_3. Zero failures, ignores or skips. The GPU cases cover adjacent finite-ray sorting/traversal and hit/miss behavior.

Not tested: NaN-ray handling on GPU, Direct DXIL, native DXR, workspace suite, and retail smoke.

AI use: T3 Code / Codex (gpt-6.2-sol) ran and reran the checks and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7206541212 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1322#issuecomment-7206541212). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-27T00:32:06Z. --- **Tested:** Clean `71c978c935ff0ba0358b0f5e56b7942f59f3e5bd`, Windows 11 build 26200.9974, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC debug. Built `cargo test -j 2 -p xcl --lib --no-run`. The `gpu::bvh::tests::` filter passed 10 CPU tests including empty bounds and NaN rays. Three exact Arc fixtures passed: `gpu_bvh_intersect_ray`, `gpu_bvh64_intersect_ray_across_memory_windows_and_grazing`, `gpu_bvh_triangle_types_2_and_3`. Zero failures, ignores or skips. The GPU cases cover adjacent finite-ray sorting/traversal and hit/miss behavior. **Not tested:** NaN-ray handling on GPU, Direct DXIL, native DXR, workspace suite, and retail smoke. **AI use:** T3 Code / Codex (`gpt-6.2-sol`) ran and reran the checks and drafted this report.
thehollowedone commented 2026-11-28 09:47:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-28T09:47:14Z.


merge-check
base: e429936c10
head: 71c978c935
merge: clean
build: cargo build --offline --locked -j 4 --workspace -> ok
tests: cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4 -> 2,127 passed, 10 failed, 48 ignored; 25 GPU skip notices. The same 10 tests failed in my earlier untouched-main run at this base: dispatch_chain_oversized_loop_matches_whole, dispatch_chain_wave32_live_loops, dispatch_chain_wave64_live_loops_and_exchange, gpu_heap_flat_reads_match_guarded_and_root_output, console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, gpu_compute_mode_dispatch_abi, gpu_float_cas_uses_ieee_equality, and the three test_title_* e2e cases. The focused gpu::bvh::tests filter passed 10/10, including both new regressions, with 0 ignored or skipped.
review: no blocker found in the full diff. The empty-root guard avoids indexing INVALID and returns the inverted empty AABB; the NaN-slab check rejects the affected child without changing finite-ray results. #1633 overlaps the empty-bounds hunk but addresses separate transform guards and returns a different sentinel there. If #1322 merges first, preserve its empty-box semantics when #1633 is rebased. The CPU model's NaN behavior still differs from the shader paths, tracked separately in #1559.
performance: reasoned only. Source search found no production caller of this CPU BVH model in crates/xcl/src; the shader paths are unchanged. No frame-time benchmark was run.
verdict: safe to merge relative to the checked main base; the full suite remains red for the same 10 base failures.
hardware / tool and model: Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, DXC 1.8.2502.11; Codex (GPT-6.2 Sol) reviewed the diff and ran these checks.

<!-- greyfinch-sync:ivall/xcl:comment:7237465272 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1322#issuecomment-7237465272). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-28T09:47:14Z. --- merge-check base: e429936c10a5b8aa09470ff99dfc8c8d3d8c56fd head: 71c978c935ff0ba0358b0f5e56b7942f59f3e5bd merge: clean build: `cargo build --offline --locked -j 4 --workspace` -> ok tests: `cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4` -> 2,127 passed, 10 failed, 48 ignored; 25 GPU skip notices. The same 10 tests failed in my earlier untouched-main run at this base: `dispatch_chain_oversized_loop_matches_whole`, `dispatch_chain_wave32_live_loops`, `dispatch_chain_wave64_live_loops_and_exchange`, `gpu_heap_flat_reads_match_guarded_and_root_output`, `console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk`, `gpu_compute_mode_dispatch_abi`, `gpu_float_cas_uses_ieee_equality`, and the three `test_title_*` e2e cases. The focused `gpu::bvh::tests` filter passed 10/10, including both new regressions, with 0 ignored or skipped. review: no blocker found in the full diff. The empty-root guard avoids indexing `INVALID` and returns the inverted empty AABB; the NaN-slab check rejects the affected child without changing finite-ray results. [#1633](https://github.com/xcl-dev/xcl/pull/1633) overlaps the empty-bounds hunk but addresses separate transform guards and returns a different sentinel there. If #1322 merges first, preserve its empty-box semantics when #1633 is rebased. The CPU model's NaN behavior still differs from the shader paths, tracked separately in [#1559](https://github.com/xcl-dev/xcl/issues/1559). performance: reasoned only. Source search found no production caller of this CPU BVH model in `crates/xcl/src`; the shader paths are unchanged. No frame-time benchmark was run. verdict: safe to merge relative to the checked main base; the full suite remains red for the same 10 base failures. hardware / tool and model: Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, DXC 1.8.2502.11; Codex (GPT-6.2 Sol) reviewed the diff and ran these checks.
throny commented 2026-11-28 13:22:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T13:22:55Z.


merge-check claim
head: 71c978c935

<!-- greyfinch-sync:ivall/xcl:comment:7239895273 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1322#issuecomment-7239895273). Originally posted by [throny](https://github.com/throny) on 2026-11-28T13:22:55Z. --- merge-check claim head: 71c978c935ff0ba0358b0f5e56b7942f59f3e5bd
throny commented 2026-11-28 13:38:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T13:38:31Z.


merge-check
base: e429936c
head: 71c978c935
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2128 passed, 9 failed, 48 ignored (26 SKIPPED lines). The 9 failures are main's own at e429936c on this GPU (#3093), the same set with and without this PR; base alone: 2126 passed, 9 failed, 48 ignored.
review: no blocker. An empty structure's bounds are now the inverted empty box; both changed functions are used only by tests and the CPU model on main, so nothing at run time consumes the result. NaN rays: with a finite inverse direction and a NaN origin, or a NaN inverse, the slab test used to fall out as a hit (min and max drop the NaN) and is now a miss; the parallel-axis and invalid-box cases were misses already. Open from the thread: the GPU paths still report a hit for NaN rays (that is #1559), so the CPU model and the GPU now disagree there, and the comment 'same results as the HLSL emulation' is no longer true for NaN rays.
performance: none; not a translator source.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7240080017 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1322#issuecomment-7240080017). Originally posted by [throny](https://github.com/throny) on 2026-11-28T13:38:31Z. --- merge-check base: e429936c head: 71c978c935ff0ba0358b0f5e56b7942f59f3e5bd merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2128 passed, 9 failed, 48 ignored (26 SKIPPED lines). The 9 failures are main's own at e429936c on this GPU (#3093), the same set with and without this PR; base alone: 2126 passed, 9 failed, 48 ignored. review: no blocker. An empty structure's bounds are now the inverted empty box; both changed functions are used only by tests and the CPU model on main, so nothing at run time consumes the result. NaN rays: with a finite inverse direction and a NaN origin, or a NaN inverse, the slab test used to fall out as a hit (min and max drop the NaN) and is now a miss; the parallel-axis and invalid-box cases were misses already. Open from the thread: the GPU paths still report a hit for NaN rays (that is #1559), so the CPU model and the GPU now disagree there, and the comment 'same results as the HLSL emulation' is no longer true for NaN rays. performance: none; not a translator source. verdict: safe to merge hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

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