gpu: test triangle opacity on DXR Tier 1.0 #833

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

@⁠Jess-Doit on GitHub · 2026-11-23 09:46 UTC · original
Jess-Doit:test/dxr-tier-1-0-opacity → main · +170 −44 · 8 files · 1 commits · merged 2026-11-23 09:58 UTC

Change

Run the existing 126-ray opacity fixture through a source-built lib_6_3 DispatchRays pipeline. The GTX 1060 can run this path at DXR Tier 1.0. Each geometry supplies its index as a local root constant in its hit group record. The any-hit shader uses that index to apply the fixture's accept mask and calls IgnoreHit for rejected candidates.

The two backends share the CPU reference for ray, instance and geometry opacity flags. The pipeline checks hit identity and distance, required and allowed any-hit geometry masks, and termination after a shader-accepted first hit. Refs #216.

Verification

Tested 87df17142490d64b9b66614311748a79e2962dc8 in Debug and Release on Windows 10 22H2 build 19045.6456.

Adapter DispatchRays opacity Inline opacity
GTX 1060 6 GB, driver 32.0.15.6094 126 rays matched Capability skip at DXR Tier 1.0
In-box WARP 10.0.19041.5794 Capability skip with no DXR Capability skip with no DXR
App-local WARP 1.0.22 with Agility SDK 1.620.2 126 rays matched 126 rays passed with three known first-hit continuations

Each DispatchRays run matched 94 hits and 32 misses with zero D3D12 debug warnings or errors. The focused matrix, including the neighboring DXR, BVH and capability checks, had 42 passes and 30 capability skips with zero failures.

$env:XBOX2WINDOWS_ADAPTER = 'GTX 1060'
foreach ($preset in 'dev', 'release') {
    cmake --build --preset $preset --parallel 4 --target offscreen_check
    ctest --preset $preset --no-tests=error -V -R '^(dxr_[a-z_]+_(hardware|warp)|bvh_(hits|differential|differential_pipeline)_(hardware|warp)|offscreen_capability_table_self_test|docs_links)$'
    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_[a-z_]+_warp|bvh_(hits|differential|differential_pipeline)_warp|offscreen_capability_table_self_test|app_local_warp_toggle)$'
}
python -B tests/bidi_controls_check.py

For the negative controls, rebuilt the lib_6_3 Debug shader once with the accept-mask rejection disabled and once with the low bit of the geometry index flipped in both hit shaders. Ran offscreen_check hardware --dxr-opacity-pipeline on the GTX 1060 and offscreen_check warp --dxr-opacity-pipeline with app-local WARP. Both mutations returned 1 on both adapters and first failed at ray 0. Accepting every candidate gave 41 and 42 mismatches respectively and hit geometry 0 at distance 1 instead of geometry 1 at distance 2. Flipping the index gave 96 mismatches on each adapter and reported geometry 0 at the correct distance of 2. The debug layer was clean in all four controls. These controls ran at 7da31d8 before the final rebase, which preserved the opacity shader and comparison code.

Evidence and follow-up

The scene and CPU reference use the repository's original MIT-licensed fixture. Traversal order and candidate duplication are implementation-dependent. The check allows any committable first hit and compares candidate masks. See the DispatchRays opacity experiment for the focused reproduction command.

AI-assisted implementation and verification.

Checklist

  • This pull request covers one reviewable behavior.
  • The verification includes commands, adapter results and capability skips.
  • Two negative controls failed as expected.
  • The experiment documentation explains the new path.
  • The patch contains source-built fixtures and documentation.
**@⁠Jess-Doit** on GitHub · 2026-11-23 09:46 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/833) `Jess-Doit:test/dxr-tier-1-0-opacity` → `main` · +170 −44 · 8 files · 1 commits · merged 2026-11-23 09:58 UTC ## Change Run the existing 126-ray opacity fixture through a source-built `lib_6_3` DispatchRays pipeline. The GTX 1060 can run this path at DXR Tier 1.0. Each geometry supplies its index as a local root constant in its hit group record. The any-hit shader uses that index to apply the fixture's accept mask and calls `IgnoreHit` for rejected candidates. The two backends share the CPU reference for ray, instance and geometry opacity flags. The pipeline checks hit identity and distance, required and allowed any-hit geometry masks, and termination after a shader-accepted first hit. Refs #216. ## Verification Tested `87df17142490d64b9b66614311748a79e2962dc8` in Debug and Release on Windows 10 22H2 build 19045.6456. | Adapter | DispatchRays opacity | Inline opacity | | --- | --- | --- | | GTX 1060 6 GB, driver 32.0.15.6094 | 126 rays matched | Capability skip at DXR Tier 1.0 | | In-box WARP 10.0.19041.5794 | Capability skip with no DXR | Capability skip with no DXR | | App-local WARP 1.0.22 with Agility SDK 1.620.2 | 126 rays matched | 126 rays passed with three known first-hit continuations | Each DispatchRays run matched 94 hits and 32 misses with zero D3D12 debug warnings or errors. The focused matrix, including the neighboring DXR, BVH and capability checks, had 42 passes and 30 capability skips with zero failures. ```powershell $env:XBOX2WINDOWS_ADAPTER = 'GTX 1060' foreach ($preset in 'dev', 'release') { cmake --build --preset $preset --parallel 4 --target offscreen_check ctest --preset $preset --no-tests=error -V -R '^(dxr_[a-z_]+_(hardware|warp)|bvh_(hits|differential|differential_pipeline)_(hardware|warp)|offscreen_capability_table_self_test|docs_links)$' 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_[a-z_]+_warp|bvh_(hits|differential|differential_pipeline)_warp|offscreen_capability_table_self_test|app_local_warp_toggle)$' } python -B tests/bidi_controls_check.py ``` For the negative controls, rebuilt the `lib_6_3` Debug shader once with the accept-mask rejection disabled and once with the low bit of the geometry index flipped in both hit shaders. Ran `offscreen_check hardware --dxr-opacity-pipeline` on the GTX 1060 and `offscreen_check warp --dxr-opacity-pipeline` with app-local WARP. Both mutations returned 1 on both adapters and first failed at ray 0. Accepting every candidate gave 41 and 42 mismatches respectively and hit geometry 0 at distance 1 instead of geometry 1 at distance 2. Flipping the index gave 96 mismatches on each adapter and reported geometry 0 at the correct distance of 2. The debug layer was clean in all four controls. These controls ran at `7da31d8` before the final rebase, which preserved the opacity shader and comparison code. ## Evidence and follow-up The scene and CPU reference use the repository's original MIT-licensed fixture. Traversal order and candidate duplication are implementation-dependent. The check allows any committable first hit and compares candidate masks. See the [DispatchRays opacity experiment](docs/experiments.md#opacity-in-dispatchrays) for the focused reproduction command. AI-assisted implementation and verification. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] The verification includes commands, adapter results and capability skips. - [x] Two negative controls failed as expected. - [x] The experiment documentation explains the new path. - [x] The patch contains source-built fixtures and documentation.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:22:04 +00:00
github manually merged commit 87df171424 into gh-pr/833/base 2026-11-26 22:22:07 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.