gpu: add DXR Tier 1.0 fixture coverage #635

Merged
Jess-Doit merged 1 commit from upstream-pr/641 into main 2026-11-22 17:21:46 +00:00
Jess-Doit commented 2026-11-22 17:10:03 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-22T17:10:03Z.


Change

Add a source-built lib_6_3 TraceRay and DispatchRays path to the five-ray fixture. Use it as the native BVH differential reference on DXR Tier 1.0 with Shader Model 6.5. The differential fixture keeps inline RayQuery as the default on Tier 1.1 and later. The standalone GPU report includes the five-ray test so Shader Model 6.3 and 6.4 adapters can report DXR Tier 1.0 independently of the BVH compute shader.

Refs #1.

Verification

Tested 824f3d7 on Windows 10 22H2 build 19045.6456.

  • GTX 1060 6GB, driver 32.0.15.6094, DXR Tier 1.0 and SM 6.5. The five-ray pipeline and all 408 BVH comparisons passed in Debug and Release. The inline DXR tests skipped.
  • Microsoft WARP 1.0.22 with Agility SDK 1.620.2 reported DXR Tier 1.2. The five-ray and 408-ray fixtures passed through both paths in Debug and Release. The update, facing, opacity, BVH hits, and WARP toggle tests also passed.
  • In-box WARP 10.0.19041.5794 reported no DXR and SM 6.2. The selected DXR and BVH tests skipped. The docs link and invalid-operation checks passed in both presets.
  • The D3D12 debug layer reported zero warnings and errors in the passing GPU checks.
  • The standalone Release runner reported dxr_pipeline_hardware PASS on the GTX 1060 and dxr_pipeline_warp SKIP on the in-box WARP. The GPU report format checks passed.
  • DXR Tier 1.0 hardware limited to Shader Model 6.3 or 6.4 remains untested.

Set up the repository Python environment and the app-local DLL directories described in docs/experiments.md before running the matrix.

.\tools\dev.ps1
$env:XBOX2WINDOWS_ADAPTER = 'GTX 1060'
$local = '^(dxr_(pipeline|query|update|facing|opacity)|bvh_(hits|differential))_(hardware|warp)$|^(bvh_differential_pipeline_warp|docs_links|offscreen_invalid_operation_warp)$'
$warp = '^(dxr_(pipeline|query|update|facing|opacity)|bvh_(hits|differential|differential_pipeline))_warp$|^(app_local_warp_toggle|offscreen_invalid_operation_warp)$'
foreach ($preset in 'dev', 'release') {
    cmake --preset $preset
    cmake --build --preset $preset --parallel 4 --target offscreen_check
    ctest --preset $preset --no-tests=error -V -R $local
    $buildDir = "out/build/w10-$preset"
    cmake --preset $preset -B $buildDir "-DOFFSCREEN_AGILITY_620_DIR=<agility-dir>" "-DOFFSCREEN_WARP_DIR=<warp-dir>"
    cmake --build $buildDir --parallel 4 --target offscreen_check
    ctest --test-dir $buildDir --no-tests=error -V -R $warp
}

Stage offscreen_check.exe from the Release build beside Run-GpuCheck.ps1 and write the tested SHA into SOURCE_COMMIT.txt. Run ./Run-GpuCheck.ps1 -Backend hardware -Adapter 'GTX 1060' and ./Run-GpuCheck.ps1 -Backend warp from that directory. Run python -B tests/gpu_report_format_check.py from the checkout.

Evidence and follow-up

The MIT-licensed fixture reuses the existing synthetic BLAS, TLAS, and CPU reference. Instance IDs, primitive indices, and distances matched for both hits. The geometry, clipping, and mask misses returned zero. The three BVH fault controls changed 4, 102, and 1 results and hit witnesses 0, 1, and 31. Two isolated source controls set InstanceContributionToHitGroupIndex to 1 or Ray.flags to 8 (SKIP_CLOSEST_HIT_SHADER). In both cases, offscreen_check hardware --dxr-pipeline returned exit 1 before constructing the ray pipeline. See the GTX 1060 README row and the "Independent BVH checks on PC" section of the experiment notes.

Checklist

  • The change covers one behavior with source-built fixtures.
  • Reproduction commands, adapter results, and capability skips are recorded.
  • Verified the three BVH fault controls and updated compatibility docs.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6545261368 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/641). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-22T17:10:03Z. --- ## Change Add a source-built `lib_6_3` TraceRay and DispatchRays path to the five-ray fixture. Use it as the native BVH differential reference on DXR Tier 1.0 with Shader Model 6.5. The differential fixture keeps inline RayQuery as the default on Tier 1.1 and later. The standalone GPU report includes the five-ray test so Shader Model 6.3 and 6.4 adapters can report DXR Tier 1.0 independently of the BVH compute shader. Refs #1. ## Verification Tested `824f3d7` on Windows 10 22H2 build 19045.6456. - GTX 1060 6GB, driver 32.0.15.6094, DXR Tier 1.0 and SM 6.5. The five-ray pipeline and all 408 BVH comparisons passed in Debug and Release. The inline DXR tests skipped. - Microsoft WARP 1.0.22 with Agility SDK 1.620.2 reported DXR Tier 1.2. The five-ray and 408-ray fixtures passed through both paths in Debug and Release. The update, facing, opacity, BVH hits, and WARP toggle tests also passed. - In-box WARP 10.0.19041.5794 reported no DXR and SM 6.2. The selected DXR and BVH tests skipped. The docs link and invalid-operation checks passed in both presets. - The D3D12 debug layer reported zero warnings and errors in the passing GPU checks. - The standalone Release runner reported `dxr_pipeline_hardware` PASS on the GTX 1060 and `dxr_pipeline_warp` SKIP on the in-box WARP. The GPU report format checks passed. - DXR Tier 1.0 hardware limited to Shader Model 6.3 or 6.4 remains untested. Set up the repository Python environment and the app-local DLL directories described in `docs/experiments.md` before running the matrix. ```powershell .\tools\dev.ps1 $env:XBOX2WINDOWS_ADAPTER = 'GTX 1060' $local = '^(dxr_(pipeline|query|update|facing|opacity)|bvh_(hits|differential))_(hardware|warp)$|^(bvh_differential_pipeline_warp|docs_links|offscreen_invalid_operation_warp)$' $warp = '^(dxr_(pipeline|query|update|facing|opacity)|bvh_(hits|differential|differential_pipeline))_warp$|^(app_local_warp_toggle|offscreen_invalid_operation_warp)$' foreach ($preset in 'dev', 'release') { cmake --preset $preset cmake --build --preset $preset --parallel 4 --target offscreen_check ctest --preset $preset --no-tests=error -V -R $local $buildDir = "out/build/w10-$preset" cmake --preset $preset -B $buildDir "-DOFFSCREEN_AGILITY_620_DIR=<agility-dir>" "-DOFFSCREEN_WARP_DIR=<warp-dir>" cmake --build $buildDir --parallel 4 --target offscreen_check ctest --test-dir $buildDir --no-tests=error -V -R $warp } ``` Stage `offscreen_check.exe` from the Release build beside `Run-GpuCheck.ps1` and write the tested SHA into `SOURCE_COMMIT.txt`. Run `./Run-GpuCheck.ps1 -Backend hardware -Adapter 'GTX 1060'` and `./Run-GpuCheck.ps1 -Backend warp` from that directory. Run `python -B tests/gpu_report_format_check.py` from the checkout. ## Evidence and follow-up The MIT-licensed fixture reuses the existing synthetic BLAS, TLAS, and CPU reference. Instance IDs, primitive indices, and distances matched for both hits. The geometry, clipping, and mask misses returned zero. The three BVH fault controls changed 4, 102, and 1 results and hit witnesses 0, 1, and 31. Two isolated source controls set `InstanceContributionToHitGroupIndex` to 1 or `Ray.flags` to 8 (`SKIP_CLOSEST_HIT_SHADER`). In both cases, `offscreen_check hardware --dxr-pipeline` returned exit 1 before constructing the ray pipeline. See the GTX 1060 README row and the "Independent BVH checks on PC" section of the experiment notes. ## Checklist - [x] The change covers one behavior with source-built fixtures. - [x] Reproduction commands, adapter results, and capability skips are recorded. - [x] Verified the three BVH fault controls and updated compatibility docs. AI-assisted.
upstream-sync closed this pull request 2026-11-24 06:44:06 +00:00
thepatrickworld commented 2026-11-24 06:48:36 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-22T17:18:55Z.


@Jess-Doit Independent AMD (RDNA4) result on 824f3d7. Measurements only, no code change.

Environment

  • Windows 11 25H2, build 26200.9711
  • MSVC 19.44.35230 (toolset 14.44.35207), Windows SDK 10.0.26100.0, DXC 1.9.2602.17
  • AMD Radeon RX 9070 XT, vendor 1002, device 7550, driver 32.0.32029.2010
  • dxr_tier=11 shader_model_capped_at_6_5=0x65
  • debug_layer=unavailable (Tools.Graphics.DirectX is NotPresent here), so no validation-layer evidence in this run.
  • Clean worktree of the PR head 824f3d7; the reference run below is a second clean worktree of b03f754 (the PR base, i.e. main without this change), same machine, same SDK.

Commands

Both presets, same filter as the PR body:

cmake --preset <dev|release>
cmake --build --preset <dev|release> --parallel 12 --target offscreen_check
set XBOX2WINDOWS_ADAPTER=AMD Radeon RX 9070 XT
ctest --preset <dev|release> --no-tests=error -V -R "^(dxr_(pipeline|query|update|facing|opacity)|bvh_(hits|differential))_hardware$"

App-local Agility/WARP DLLs were not staged, so this is the in-box D3D12 path only.

Observed — the path this PR adds

dxr_pipeline_hardware passed in both presets, through the new lib_6_3 path, with the same five-ray result as the inline query test:

dxr_tier=11 shader_model_capped_at_6_5=0x65
dxr_backend=dispatch_rays
ray=0 hit=1 instance=7  primitive=0 distance=1
ray=1 hit=0 instance=0  primitive=0 distance=0
ray=2 hit=0 instance=0  primitive=0 distance=0
ray=3 hit=1 instance=11 primitive=0 distance=1
ray=4 hit=0 instance=0  primitive=0 distance=0

dxr_query, dxr_update and dxr_facing also passed (dxr_facing rays=96 hits=72 front_hits=36 culled=24 mismatches=0), as did bvh_hits (3 epochs, mismatches=0) and bvh_differential (136 comparisons per epoch × 3 epochs = 408 BVH comparisons, mismatches=0).

So the TraceRay/DispatchRays reference compiles, creates a pipeline and traces correctly on this adapter, in Debug and in Release.

One test fails, and it is not this change

dxr_opacity_hardware fails in both presets with:

dxr_opacity rays=126 hits=94 shader_commits=42 misses=32 first_hit_rays=36
            mismatches=43 committed_hit=43 committed_t_plus_tmin=43

Every mismatch is a shader-committed hit, and the printed per-ray detail shows the recorded distance is the expected distance plus 0.25 in each case (expected ... distance=1 / actual ... distance=1.25, 2 / 2.25, 3 / 3.25) with a correct instance, geometry, primitive and shader_commit_t.

Control on the base commit. The same test was rebuilt and run from a clean worktree of b03f754, the PR base, without any of this PR's changes:

dxr_opacity rays=126 hits=94 shader_commits=42 misses=32 first_hit_rays=36
            mismatches=43 committed_hit=43 committed_t_plus_tmin=43
4/6 Test #45: dxr_opacity_hardware ... Failed

Identical counts, identical per-ray offsets. So this is pre-existing on RDNA 4, not introduced by 824f3d7. It is the same deviation reported by @denn0x under #216 and accepted there as a documented hardware result (CommittedRayT() equals the true distance plus the ray's TMin).

One new data point: #216 recorded driver 32.0.32015.7029. This run is on 32.0.32029.2010, a later driver, and the 43 cases reproduce unchanged. The driver update did not change this behaviour.

Limits

  • This adapter is DXR Tier 1.1, so the five-ray lib_6_3 path here runs on Tier 1.1 hardware. DXR Tier 1.0 hardware limited to Shader Model 6.3 or 6.4 — the gap the PR body names — is still untested by this run.
  • One machine, one adapter, no debug layer, in-box D3D12 only (no Agility 1.620.2 / WARP 1.0.22 staging).
  • The dxr_opacity failure above must be read as an independent reproduction, not as a verdict on this PR.

AI-assisted; runs executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7082743186 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/641#issuecomment-7082743186). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-22T17:18:55Z. --- @Jess-Doit **Independent AMD (RDNA4) result on `824f3d7`.** Measurements only, no code change. ### Environment - Windows 11 25H2, build **26200.9711** - MSVC **19.44.35230** (toolset 14.44.35207), Windows SDK 10.0.26100.0, DXC **1.9.2602.17** - **AMD Radeon RX 9070 XT**, vendor 1002, device 7550, driver **32.0.32029.2010** - `dxr_tier=11 shader_model_capped_at_6_5=0x65` - `debug_layer=unavailable` (`Tools.Graphics.DirectX` is `NotPresent` here), so no validation-layer evidence in this run. - Clean worktree of the PR head `824f3d7`; the reference run below is a second clean worktree of `b03f754` (the PR base, i.e. `main` without this change), same machine, same SDK. ### Commands Both presets, same filter as the PR body: ``` cmake --preset <dev|release> cmake --build --preset <dev|release> --parallel 12 --target offscreen_check set XBOX2WINDOWS_ADAPTER=AMD Radeon RX 9070 XT ctest --preset <dev|release> --no-tests=error -V -R "^(dxr_(pipeline|query|update|facing|opacity)|bvh_(hits|differential))_hardware$" ``` App-local Agility/WARP DLLs were not staged, so this is the in-box D3D12 path only. ### Observed — the path this PR adds `dxr_pipeline_hardware` **passed in both presets**, through the new `lib_6_3` path, with the same five-ray result as the inline query test: ``` dxr_tier=11 shader_model_capped_at_6_5=0x65 dxr_backend=dispatch_rays ray=0 hit=1 instance=7 primitive=0 distance=1 ray=1 hit=0 instance=0 primitive=0 distance=0 ray=2 hit=0 instance=0 primitive=0 distance=0 ray=3 hit=1 instance=11 primitive=0 distance=1 ray=4 hit=0 instance=0 primitive=0 distance=0 ``` `dxr_query`, `dxr_update` and `dxr_facing` also passed (`dxr_facing rays=96 hits=72 front_hits=36 culled=24 mismatches=0`), as did `bvh_hits` (3 epochs, `mismatches=0`) and `bvh_differential` (136 comparisons per epoch × 3 epochs = **408 BVH comparisons**, `mismatches=0`). So the TraceRay/DispatchRays reference compiles, creates a pipeline and traces correctly on this adapter, in Debug and in Release. ### One test fails, and it is not this change `dxr_opacity_hardware` fails in both presets with: ``` dxr_opacity rays=126 hits=94 shader_commits=42 misses=32 first_hit_rays=36 mismatches=43 committed_hit=43 committed_t_plus_tmin=43 ``` Every mismatch is a shader-committed hit, and the printed per-ray detail shows the recorded distance is the expected distance **plus 0.25** in each case (`expected ... distance=1` / `actual ... distance=1.25`, `2` / `2.25`, `3` / `3.25`) with a correct instance, geometry, primitive and `shader_commit_t`. **Control on the base commit.** The same test was rebuilt and run from a clean worktree of `b03f754`, the PR base, without any of this PR's changes: ``` dxr_opacity rays=126 hits=94 shader_commits=42 misses=32 first_hit_rays=36 mismatches=43 committed_hit=43 committed_t_plus_tmin=43 4/6 Test #45: dxr_opacity_hardware ... Failed ``` Identical counts, identical per-ray offsets. So this is pre-existing on RDNA 4, not introduced by `824f3d7`. It is the same deviation reported by @denn0x under #216 and accepted there as a documented hardware result (`CommittedRayT()` equals the true distance plus the ray's `TMin`). **One new data point:** #216 recorded driver `32.0.32015.7029`. This run is on **`32.0.32029.2010`**, a later driver, and the 43 cases reproduce unchanged. The driver update did not change this behaviour. ### Limits - This adapter is **DXR Tier 1.1**, so the five-ray `lib_6_3` path here runs on Tier 1.1 hardware. **DXR Tier 1.0 hardware limited to Shader Model 6.3 or 6.4 — the gap the PR body names — is still untested by this run.** - One machine, one adapter, no debug layer, in-box D3D12 only (no Agility 1.620.2 / WARP 1.0.22 staging). - The `dxr_opacity` failure above must be read as an independent reproduction, not as a verdict on this PR. _AI-assisted; runs executed locally._
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!635
No description provided.