gpu: test triangle opacity on DXR Tier 1.0 #827

Merged
Jess-Doit merged 1 commit from upstream-pr/833 into main 2026-11-23 09:58:23 +00:00
Jess-Doit commented 2026-11-23 09:46:36 +00:00 (Migrated from github.com)

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


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.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6556534157 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/833). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-23T09:46:36Z. --- ## 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.
upstream-sync closed this pull request 2026-11-24 06:45:00 +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!827
No description provided.