gpu: test triangle facing and culling on DXR Tier 1.0 #825

Manually merged
github merged 1 commit from gh-pr/825/head into gh-pr/825/base 2026-11-26 22:21:32 +00:00
Owner

@⁠Jess-Doit on GitHub · 2026-11-23 09:14 UTC · original
Jess-Doit:test/dxr-tier-1-0-facing → main · +47 −18 · 8 files · 1 commits · merged 2026-11-23 09:25 UTC

Change

Run the existing triangle-facing and shared-edge fixtures through the DXR Tier 1.0 DispatchRays pipeline. The lib_6_3 shader passes the front- or back-face cull flag to TraceRay and reports facing from HitKind. The inline RayQuery test is still registered separately.

Both paths use the same CPU references for the 96 facing rays and 12 shared-edge rays. The missing-cull control must produce exactly 24 hit-status mismatches.

Refs #118 and #641.

Verification

Tested e2ade14a2be927343a357f1dab42a4cd347fd08c on Windows 10 22H2 build 19045.6456. The GTX 1060 6 GB (driver 32.0.15.6094) passed DispatchRays and skipped RayQuery at Tier 1.0. App-local WARP 1.0.22 with Agility SDK 1.620.2 passed both paths. In-box WARP 10.0.19041.5794 exposed no DXR and skipped both facing tests.

Each passing facing test matched all 108 rays and reported zero D3D12 debug warnings and errors. A local Debug rebuild with the cull flags removed from TraceRay failed on both the GTX 1060 and app-local WARP with exactly 24 mismatches. The first was ray 2, which hit instance 1 at distance 2 instead of missing.

Built offscreen_check in Debug and Release and ran the following from the configured source checkout.

$env:XBOX2WINDOWS_ADAPTER = 'GTX 1060'
$dxr = 'dxr_(query|pipeline|update|update_pipeline|facing|facing_pipeline|opacity)'
$bvh = 'bvh_(hits|differential|differential_pipeline)'
foreach ($preset in 'dev', 'release') {
    cmake --build --preset $preset --parallel 4 --target offscreen_check
    ctest --preset $preset --no-tests=error -V -R "^($dxr|$bvh)_(hardware|warp)`$|^(docs_links|offscreen_capability_table_self_test)`$"
    cmake --build "out/build/app-local-$preset" --parallel 4 --target offscreen_check
    ctest --test-dir "out/build/app-local-$preset" --no-tests=error -V -R "^($dxr|$bvh)_warp`$|^(app_local_warp_toggle|offscreen_capability_table_self_test)`$"
}

Each in-box matrix had 7 passes and 14 capability skips. Each app-local matrix had 12 passes. No test failed with the original cull flags restored.

Evidence and follow-up

The existing source-built scenes and CPU references are covered by the repository's MIT license. At the shared diagonal either incident primitive is valid. See the face-culling experiment for fixture details and the focused reproduction command.

AI-assisted implementation and verification.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for the focused verification.
  • I verified a negative control for the fixture.
  • I updated the experiment documentation.
  • This patch contains only source-built fixtures and documentation.
**@⁠Jess-Doit** on GitHub · 2026-11-23 09:14 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/825) `Jess-Doit:test/dxr-tier-1-0-facing` → `main` · +47 −18 · 8 files · 1 commits · merged 2026-11-23 09:25 UTC ## Change Run the existing triangle-facing and shared-edge fixtures through the DXR Tier 1.0 DispatchRays pipeline. The `lib_6_3` shader passes the front- or back-face cull flag to `TraceRay` and reports facing from `HitKind`. The inline RayQuery test is still registered separately. Both paths use the same CPU references for the 96 facing rays and 12 shared-edge rays. The missing-cull control must produce exactly 24 hit-status mismatches. Refs #118 and #641. ## Verification Tested `e2ade14a2be927343a357f1dab42a4cd347fd08c` on Windows 10 22H2 build 19045.6456. The GTX 1060 6 GB (driver 32.0.15.6094) passed DispatchRays and skipped RayQuery at Tier 1.0. App-local WARP 1.0.22 with Agility SDK 1.620.2 passed both paths. In-box WARP 10.0.19041.5794 exposed no DXR and skipped both facing tests. Each passing facing test matched all 108 rays and reported zero D3D12 debug warnings and errors. A local Debug rebuild with the cull flags removed from `TraceRay` failed on both the GTX 1060 and app-local WARP with exactly 24 mismatches. The first was ray 2, which hit instance 1 at distance 2 instead of missing. Built `offscreen_check` in Debug and Release and ran the following from the configured source checkout. ```powershell $env:XBOX2WINDOWS_ADAPTER = 'GTX 1060' $dxr = 'dxr_(query|pipeline|update|update_pipeline|facing|facing_pipeline|opacity)' $bvh = 'bvh_(hits|differential|differential_pipeline)' foreach ($preset in 'dev', 'release') { cmake --build --preset $preset --parallel 4 --target offscreen_check ctest --preset $preset --no-tests=error -V -R "^($dxr|$bvh)_(hardware|warp)`$|^(docs_links|offscreen_capability_table_self_test)`$" cmake --build "out/build/app-local-$preset" --parallel 4 --target offscreen_check ctest --test-dir "out/build/app-local-$preset" --no-tests=error -V -R "^($dxr|$bvh)_warp`$|^(app_local_warp_toggle|offscreen_capability_table_self_test)`$" } ``` Each in-box matrix had 7 passes and 14 capability skips. Each app-local matrix had 12 passes. No test failed with the original cull flags restored. ## Evidence and follow-up The existing source-built scenes and CPU references are covered by the repository's MIT license. At the shared diagonal either incident primitive is valid. See the [face-culling experiment](docs/experiments.md#face-culling-under-mirrored-instances) for fixture details and the focused reproduction command. AI-assisted implementation and verification. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for the focused verification. - [x] I verified a negative control for the fixture. - [x] I updated the experiment documentation. - [x] This patch contains only source-built fixtures and documentation.
Run both DXR facing scenes through the existing DispatchRays pipeline. Compare the same CPU reference and require 24 hit-status mismatches when the unculled answers stand in for the flagged rays.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:21:29 +00:00
github manually merged commit e2ade14a2b into gh-pr/825/base 2026-11-26 22:21:32 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.