gpu: compare dxr_placed_build with a direct-address DXR reference #1619

Manually merged
github merged 1 commit from gh-pr/1619/head into gh-pr/1619/base 2026-11-26 23:21:20 +00:00
Owner

@⁠MasterDomino on GitHub · 2026-11-24 15:07 UTC · original
MasterDomino:gpu/dxr-placed-direct-control → main · +61 −21 · 3 files · 1 commits · merged 2026-11-24 15:17 UTC

Refs #874

dxr_placed_build_{hardware,warp} now compares the slot-133 placed DXR path with a direct-address reference on the same adapter, as R0Y00 asked on #874. This follows #1360. It replaces the 1e-5 hit-distance tolerance from 82680176.

Change

  • check_dxr_placed_build traces three scenes with trace_placed_triangle:
    • placed: the path under test.
    • direct: the reference. It has the same geometry, build and instance inputs, rays and readback shader, with desktop GPU addresses given directly. Only the placed-address resolver is bypassed; this is the same call tests/cpu/placed_dxr_provider.cpp already uses for its reference.
    • misrouted: the wrong-routing control.
  • Checks:
    • placed and direct must both match the fixed expectations in hit, instance and primitive: hit instance 7, a spatial miss, a masked miss, with zero miss rows;
    • all 12 placed words, distance included, must equal the direct words;
    • the misrouted rows must differ from the direct rows.
  • Output: the three row sets (placed_dxr_rows) and the measured distance bits against the mathematical 0x3f800000 (placed_dxr_distance).
  • Wrong-routing control: PlacedBuildScene::misroute builds a decoy BLAS from the same triangle moved 4 units right. The decoy has its own placed destination and scratch, resolved through the same resolve_placed_build, and the TLAS instance is routed to it. trace_scene builds the decoy in the same command list, with a UAV barrier, as the address-range fixture already does.
  • Unchanged: the #1326 refusal controls (unregistered destination, short scratch, swapped roles) still run in every placed scene. The comparison applies to all adapters, and there is no general distance tolerance.
  • docs/experiments.md: the paragraph now describes the reference and the measured bits, keeping the RX 6600 note.

Results

main + this change at 8e0eb6cd (on 4aefce63). Windows 11 26H2, build 26300.9974. MSVC 19.44.35207, DXC 1.8.2502.11. D3D12 debug layer enabled, with debug_errors=0 debug_warnings=0 on both backends.

cmake --build --preset release
ctest --preset release --no-tests=error -R '^dxr_placed_build_(hardware|warp)$' -V

AMD Radeon RX 9070 XT (1002:7550), driver 32.0.31044.16: pass.

placed_dxr_rows placed    [1,7,0,0x3f7fffff] [0,0,0,0x00000000] [0,0,0,0x00000000]
placed_dxr_rows direct    [1,7,0,0x3f7fffff] [0,0,0,0x00000000] [0,0,0,0x00000000]
placed_dxr_rows misrouted [0,0,0,0x00000000] [1,7,0,0x3f7fffff] [0,0,0,0x00000000]
placed_dxr_distance placed=0x3f7fffff direct=0x3f7fffff (1.0=0x3f800000)

WARP 10.0.26100.9818: pass.

placed_dxr_rows placed    [1,7,0,0x3f800000] [0,0,0,0x00000000] [0,0,0,0x00000000]
placed_dxr_rows direct    [1,7,0,0x3f800000] [0,0,0,0x00000000] [0,0,0,0x00000000]
placed_dxr_rows misrouted [0,0,0,0x00000000] [1,7,0,0x3f800000] [0,0,0,0x00000000]
placed_dxr_distance placed=0x3f800000 direct=0x3f800000 (1.0=0x3f800000)

On the RX 9070 XT the placed and direct paths give the same one-ULP-short distance. As with #1360, that difference comes from the adapter's intersection, not from the placed-address path.

Other DXR tests:

  • ctest -R '^(dxr_.*|cpu_placed_dxr_.*|gpu_alias_(warp|hardware))$' in dev: 23/24 pass. The release DXR set: 21/22.
  • In both, the only failure is the known dxr_opacity_hardware (#1011).
  • cpu_placed_dxr_{hardware,warp}, which share trace_placed_triangle, pass.

AI-assisted.

🤖 Generated with Claude Code

**@⁠MasterDomino** on GitHub · 2026-11-24 15:07 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1619) `MasterDomino:gpu/dxr-placed-direct-control` → `main` · +61 −21 · 3 files · 1 commits · merged 2026-11-24 15:17 UTC Refs #874 `dxr_placed_build_{hardware,warp}` now compares the slot-133 placed DXR path with a direct-address reference on the same adapter, as R0Y00 asked on #874. This follows #1360. It replaces the 1e-5 hit-distance tolerance from `82680176`. ## Change - **`check_dxr_placed_build`** traces three scenes with `trace_placed_triangle`: - **placed:** the path under test. - **direct:** the reference. It has the same geometry, build and instance inputs, rays and readback shader, with desktop GPU addresses given directly. Only the placed-address resolver is bypassed; this is the same call `tests/cpu/placed_dxr_provider.cpp` already uses for its reference. - **misrouted:** the wrong-routing control. - **Checks:** - placed and direct must both match the fixed expectations in hit, instance and primitive: hit instance 7, a spatial miss, a masked miss, with zero miss rows; - all 12 placed words, distance included, must equal the direct words; - the misrouted rows must differ from the direct rows. - **Output:** the three row sets (`placed_dxr_rows`) and the measured distance bits against the mathematical `0x3f800000` (`placed_dxr_distance`). - **Wrong-routing control:** `PlacedBuildScene::misroute` builds a decoy BLAS from the same triangle moved 4 units right. The decoy has its own placed destination and scratch, resolved through the same `resolve_placed_build`, and the TLAS instance is routed to it. `trace_scene` builds the decoy in the same command list, with a UAV barrier, as the address-range fixture already does. - **Unchanged:** the #1326 refusal controls (unregistered destination, short scratch, swapped roles) still run in every placed scene. The comparison applies to all adapters, and there is no general distance tolerance. - **`docs/experiments.md`:** the paragraph now describes the reference and the measured bits, keeping the RX 6600 note. ## Results `main` + this change at `8e0eb6cd` (on `4aefce63`). Windows 11 26H2, build 26300.9974. MSVC 19.44.35207, DXC 1.8.2502.11. D3D12 debug layer enabled, with `debug_errors=0 debug_warnings=0` on both backends. ```powershell cmake --build --preset release ctest --preset release --no-tests=error -R '^dxr_placed_build_(hardware|warp)$' -V ``` AMD Radeon RX 9070 XT (`1002:7550`), driver `32.0.31044.16`: pass. ``` placed_dxr_rows placed [1,7,0,0x3f7fffff] [0,0,0,0x00000000] [0,0,0,0x00000000] placed_dxr_rows direct [1,7,0,0x3f7fffff] [0,0,0,0x00000000] [0,0,0,0x00000000] placed_dxr_rows misrouted [0,0,0,0x00000000] [1,7,0,0x3f7fffff] [0,0,0,0x00000000] placed_dxr_distance placed=0x3f7fffff direct=0x3f7fffff (1.0=0x3f800000) ``` WARP `10.0.26100.9818`: pass. ``` placed_dxr_rows placed [1,7,0,0x3f800000] [0,0,0,0x00000000] [0,0,0,0x00000000] placed_dxr_rows direct [1,7,0,0x3f800000] [0,0,0,0x00000000] [0,0,0,0x00000000] placed_dxr_rows misrouted [0,0,0,0x00000000] [1,7,0,0x3f800000] [0,0,0,0x00000000] placed_dxr_distance placed=0x3f800000 direct=0x3f800000 (1.0=0x3f800000) ``` On the RX 9070 XT the placed and direct paths give the same one-ULP-short distance. As with #1360, that difference comes from the adapter's intersection, not from the placed-address path. **Other DXR tests:** - `ctest -R '^(dxr_.*|cpu_placed_dxr_.*|gpu_alias_(warp|hardware))$'` in `dev`: 23/24 pass. The release DXR set: 21/22. - In both, the only failure is the known `dxr_opacity_hardware` (#1011). - `cpu_placed_dxr_{hardware,warp}`, which share `trace_placed_triangle`, pass. AI-assisted. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Replace the 1e-5 distance tolerance with a reference traced on the same
adapter: the same geometry, build and instance inputs, rays and readback,
with desktop GPU addresses given directly and only the placed-address
resolver bypassed. All 12 words, distance included, must equal that
reference, and hit, instance and primitive keep their fixed
expectations. A decoy BLAS placed through the same slot-133 path is the
wrong-routing control and must differ. The refusal controls from #1326
are unchanged.

Refs #874

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 23:21:18 +00:00
github manually merged commit 8e0eb6cd01 into gh-pr/1619/base 2026-11-26 23:21:20 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-24 15:13 UTC · original · reviewed

Reviewed 8e0eb6cd012e15dca826215bf4ab593c93b50116:

  • Diff & semantics: Replacing the 1e-5 hit-distance tolerance with a direct-address DXR reference (trace_placed_triangle(device, nullptr, nullptr)) on the same adapter cleanly isolates the slot-133 placed-address resolver while preserving bit-exact distance comparison (output == direct) and fixed hit/miss/masked-miss checks. The decoy BLAS control (PlacedBuildScene::misroute / prepare_decoy routing the TLAS instance to a triangle 4 units to the right) ensures wrong instance routing is caught (misrouted != direct).
  • Hygiene (Linux): python3 tests/docs_links_check.py (16 Markdown files, 348 links) and python3 tests/bidi_controls_check.py (1262 files) passed.
  • Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP):
    • Debug (--preset dev): cmake --build --preset dev --target offscreen_check + ctest --preset dev -R '^(dxr_placed_build_warp|dxr_pipeline_warp|dxr_query_warp)$' --parallel 4 --no-tests=error --output-on-failure -> 3/3 passed (0.16s).
    • Release /O2 (--preset release): cmake --build --preset release --target offscreen_check + ctest --preset release -R '^(dxr_placed_build_warp|dxr_pipeline_warp|dxr_query_warp)$' --parallel 4 --no-tests=error --output-on-failure -> 3/3 passed (0.15s).

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-24 15:13 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1619#pullrequestreview-6041916646) · **reviewed** Reviewed `8e0eb6cd012e15dca826215bf4ab593c93b50116`: - **Diff & semantics**: Replacing the `1e-5` hit-distance tolerance with a direct-address DXR reference (`trace_placed_triangle(device, nullptr, nullptr)`) on the same adapter cleanly isolates the slot-133 placed-address resolver while preserving bit-exact distance comparison (`output == direct`) and fixed hit/miss/masked-miss checks. The decoy BLAS control (`PlacedBuildScene::misroute` / `prepare_decoy` routing the TLAS instance to a triangle 4 units to the right) ensures wrong instance routing is caught (`misrouted != direct`). - **Hygiene (Linux)**: `python3 tests/docs_links_check.py` (16 Markdown files, 348 links) and `python3 tests/bidi_controls_check.py` (1262 files) passed. - **Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP)**: - Debug (`--preset dev`): `cmake --build --preset dev --target offscreen_check` + `ctest --preset dev -R '^(dxr_placed_build_warp|dxr_pipeline_warp|dxr_query_warp)$' --parallel 4 --no-tests=error --output-on-failure` -> **3/3 passed** (`0.16s`). - Release `/O2` (`--preset release`): `cmake --build --preset release --target offscreen_check` + `ctest --preset release -R '^(dxr_placed_build_warp|dxr_pipeline_warp|dxr_query_warp)$' --parallel 4 --no-tests=error --output-on-failure` -> **3/3 passed** (`0.15s`). AI-assisted; commands listed were executed locally.
This discussion has been locked. Commenting is limited to contributors.
No description provided.