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

Merged
Jess-Doit merged 1 commit from upstream-pr/825 into main 2026-11-23 09:25:54 +00:00
Jess-Doit commented 2026-11-23 09:14:16 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-23T09:14:16Z.


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.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6556013890 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/825). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-23T09:14:16Z. --- ## 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.
upstream-sync closed this pull request 2026-11-24 06:44:57 +00:00
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
R0Y00/Xbox2Windows!819
No description provided.