shader: test depth occlusion through the SM 6.0 mesh fallback #813

Merged
Jess-Doit merged 1 commit from upstream-pr/819 into main 2026-11-23 08:48:45 +00:00
Jess-Doit commented 2026-11-23 08:27:14 +00:00 (Migrated from github.com)

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


Change

Reuse #639's two-triangle scene and CPU references in the SM 6.0 mesh fallback. Two compute dispatches export geometry into separate buffer ranges, then two vertex draws share one color target and depth buffer. The fallback uses the same depth-write and LESS settings as the native path.

Verification

Tested e860c8c on 6de5738, Windows 10 22H2 build 19045.6456 and Windows SDK 10.0.26100.0 DXC.

  • GTX 1060 6 GB (32.0.15.6094), in-box WARP (10.0.19041.5794), and app-local WARP 1.0.22 with Agility 1.620.2 matched all 256 export bytes and all 1,024 pixels in each of the color and depth targets for baseline, reversed order, and swapped depths.
  • Each stale reference changed only its own target: 190 color pixels or 172 depth pixels. Exports still matched. All fallback cases reported zero D3D12 debug warnings or errors.
  • Debug and Release each passed 13 checks with 22 expected native mesh capability skips. App-local WARP passed all 18 checks, including the native depth pair against the same CPU references. The capability table self-test verifies exit 77 below SM 6.0 and exit 2 for missing arguments.
$env:XBOX2WINDOWS_ADAPTER = 'GTX 1060'
$tests = '^((mesh_.+|compute_mesh_texture(_fallback)?|depth_mask_draw)_(hardware|warp)|offscreen_capability_table_self_test|offscreen_invalid_operation_warp|docs_links)$'
foreach ($preset in 'dev', 'release') {
    cmake --build "out/build/$preset" --parallel 4 --target offscreen_check
    ctest --test-dir "out/build/$preset" --no-tests=error -V -R $tests
}
# With app-local Agility and WARP configured
cmake --build out/build/app-local --parallel 4 --target offscreen_check
ctest --test-dir out/build/app-local --no-tests=error -V -R '^((mesh_.+|compute_mesh_texture(_fallback)?|depth_mask_draw)_warp|offscreen_capability_table_self_test|app_local_warp_toggle)$'

Evidence and follow-up

The MIT-licensed fixture builds its shaders from the existing mesh and pixel programs. The experiment notes document the fallback command and readback checks.

Checklist

  • Covers one reviewable behavior.
  • Includes test commands, results, and capability skips.
  • Includes independent stale-color and stale-depth controls.
  • Updates the experiment notes.
  • Uses source-built fixtures.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6555318346 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/819). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-23T08:27:14Z. --- ## Change Reuse #639's two-triangle scene and CPU references in the SM 6.0 mesh fallback. Two compute dispatches export geometry into separate buffer ranges, then two vertex draws share one color target and depth buffer. The fallback uses the same depth-write and LESS settings as the native path. ## Verification Tested `e860c8c` on `6de5738`, Windows 10 22H2 build 19045.6456 and Windows SDK 10.0.26100.0 DXC. - GTX 1060 6 GB (32.0.15.6094), in-box WARP (10.0.19041.5794), and app-local WARP 1.0.22 with Agility 1.620.2 matched all 256 export bytes and all 1,024 pixels in each of the color and depth targets for baseline, reversed order, and swapped depths. - Each stale reference changed only its own target: 190 color pixels or 172 depth pixels. Exports still matched. All fallback cases reported zero D3D12 debug warnings or errors. - Debug and Release each passed 13 checks with 22 expected native mesh capability skips. App-local WARP passed all 18 checks, including the native depth pair against the same CPU references. The capability table self-test verifies exit 77 below SM 6.0 and exit 2 for missing arguments. ```powershell $env:XBOX2WINDOWS_ADAPTER = 'GTX 1060' $tests = '^((mesh_.+|compute_mesh_texture(_fallback)?|depth_mask_draw)_(hardware|warp)|offscreen_capability_table_self_test|offscreen_invalid_operation_warp|docs_links)$' foreach ($preset in 'dev', 'release') { cmake --build "out/build/$preset" --parallel 4 --target offscreen_check ctest --test-dir "out/build/$preset" --no-tests=error -V -R $tests } # With app-local Agility and WARP configured cmake --build out/build/app-local --parallel 4 --target offscreen_check ctest --test-dir out/build/app-local --no-tests=error -V -R '^((mesh_.+|compute_mesh_texture(_fallback)?|depth_mask_draw)_warp|offscreen_capability_table_self_test|app_local_warp_toggle)$' ``` ## Evidence and follow-up The MIT-licensed fixture builds its shaders from the existing mesh and pixel programs. The experiment notes document the fallback command and readback checks. ## Checklist - [x] Covers one reviewable behavior. - [x] Includes test commands, results, and capability skips. - [x] Includes independent stale-color and stale-depth controls. - [x] Updates the experiment notes. - [x] Uses source-built fixtures. AI-assisted.
upstream-sync closed this pull request 2026-11-24 06:44:56 +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!813
No description provided.