gpu: run BVH buffer operations at Shader Model 6.0 #613

Merged
Jess-Doit merged 1 commit from upstream-pr/619 into main 2026-11-22 18:32:07 +00:00
Jess-Doit commented 2026-11-22 16:11:02 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-22T16:11:02Z.


Change

Compile the five source-built BVH buffer-operation shaders at cs_6_0 and check that minimum in --buffer-ops. This enables bvh_buffer_ops_warp on Windows 10 in-box WARP, which reports SM 6.2. Both CTests retain exit 77 for a capability skip. The DXIL retarget probes use a dedicated SM 6.5 CopyBlocks build that matches the previous binary byte for byte.

Verification

Tested 9e95756 over 9b0df70 on Windows 10 22H2 build 19045.6456, MSVC 19.44.35230, SDK 10.0.26100.0 and DXC 1.9.2602.17. The GTX 1060 6 GB (32.0.15.6094) and in-box WARP (10.0.19041.5794) each matched 9,984 words across 26 cases, with zero debug-layer warnings and errors in Debug and Release. The upstream SM 6.5 build at e3946dd skipped the WARP fixture. DXIL metadata confirms all five outputs are SM 6.0 in both configurations.

. .\tools\dev.ps1
$env:XBOX2WINDOWS_ADAPTER = 'GTX 1060'
foreach ($preset in 'dev', 'release') {
  cmake --build --preset $preset --parallel 6 --target root_device_probe
  cmake --build --preset $preset --parallel 6 --target offscreen_check root_probe
  ctest --preset $preset --no-tests=error -V -R '^(bvh_(buffer_ops|reads|waves|hits|packed|numeric|atomics)_(warp|hardware)|bvh_wave64_hardware|compute_(root|tables)_warp|offscreen_invalid_operation_warp|dxil_retarget_(controls|probe(_hardware)?))$'
}

Each configuration reported 14 passes and seven capability skips. The GTX 1060 retarget probe accepted the signed SM 6.5 fixture and rejected the unsigned and tampered forms. Using the documented app-local Agility SDK 1.620.2 and WARP 1.0.22 setup, ctest --test-dir out/build/app-local --no-tests=error -V -R '^(bvh_(buffer_ops|reads)_warp|compute_root_warp)$' passed all three tests. python -B tests/docs_links_check.py and python -B tests/bidi_controls_check.py passed.

Evidence and follow-up

The existing MIT-licensed fixture still compares every output and sentinel word. In scratch builds, flipping cases.front().expected[0] before upload_words[case_count].fill(sentinel) produced exit 1 on both adapters in both presets. The first difference was word 0, expected cdfa1539, actual cdfa1538. Simulating an SM 5.1 capability result in Debug produced exit 77 and two CTest skips. Simulating E_INVALIDARG returned 77 and simulating E_FAIL returned 1. Restored the sources and reran the passing fixture.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the commands and results.
  • I included failure and capability controls.
  • I updated the README and experiment notes.
  • The patch contains only source and documentation.

AI-assisted implementation and verification.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6544635637 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/619). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-22T16:11:02Z. --- ## Change Compile the five source-built BVH buffer-operation shaders at `cs_6_0` and check that minimum in `--buffer-ops`. This enables `bvh_buffer_ops_warp` on Windows 10 in-box WARP, which reports SM 6.2. Both CTests retain exit 77 for a capability skip. The DXIL retarget probes use a dedicated SM 6.5 CopyBlocks build that matches the previous binary byte for byte. ## Verification Tested `9e95756` over `9b0df70` on Windows 10 22H2 build 19045.6456, MSVC 19.44.35230, SDK 10.0.26100.0 and DXC 1.9.2602.17. The GTX 1060 6 GB (32.0.15.6094) and in-box WARP (10.0.19041.5794) each matched 9,984 words across 26 cases, with zero debug-layer warnings and errors in Debug and Release. The upstream SM 6.5 build at `e3946dd` skipped the WARP fixture. DXIL metadata confirms all five outputs are SM 6.0 in both configurations. ```powershell . .\tools\dev.ps1 $env:XBOX2WINDOWS_ADAPTER = 'GTX 1060' foreach ($preset in 'dev', 'release') { cmake --build --preset $preset --parallel 6 --target root_device_probe cmake --build --preset $preset --parallel 6 --target offscreen_check root_probe ctest --preset $preset --no-tests=error -V -R '^(bvh_(buffer_ops|reads|waves|hits|packed|numeric|atomics)_(warp|hardware)|bvh_wave64_hardware|compute_(root|tables)_warp|offscreen_invalid_operation_warp|dxil_retarget_(controls|probe(_hardware)?))$' } ``` Each configuration reported 14 passes and seven capability skips. The GTX 1060 retarget probe accepted the signed SM 6.5 fixture and rejected the unsigned and tampered forms. Using the documented [app-local Agility SDK 1.620.2 and WARP 1.0.22 setup](https://github.com/R0Y00/Xbox2Windows/blob/9b0df70956653caa7551e5d541d15fdad3e3aad3/docs/experiments.md#windows-10-with-the-app-local-agility-sdk-and-warp), `ctest --test-dir out/build/app-local --no-tests=error -V -R '^(bvh_(buffer_ops|reads)_warp|compute_root_warp)$'` passed all three tests. `python -B tests/docs_links_check.py` and `python -B tests/bidi_controls_check.py` passed. ## Evidence and follow-up The existing MIT-licensed fixture still compares every output and sentinel word. In scratch builds, flipping `cases.front().expected[0]` before `upload_words[case_count].fill(sentinel)` produced exit 1 on both adapters in both presets. The first difference was word 0, expected `cdfa1539`, actual `cdfa1538`. Simulating an SM 5.1 capability result in Debug produced exit 77 and two CTest skips. Simulating E_INVALIDARG returned 77 and simulating E_FAIL returned 1. Restored the sources and reran the passing fixture. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the commands and results. - [x] I included failure and capability controls. - [x] I updated the README and experiment notes. - [x] The patch contains only source and documentation. AI-assisted implementation and verification.
upstream-sync closed this pull request 2026-11-24 06:43:59 +00:00
MarlomMedeiros commented 2026-11-24 06:43:59 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MarlomMedeiros on 2026-11-22T18:16:10Z.

Review: COMMENTED


Tested the full 21-test matrix on a second configuration: Windows 11 build 26300.10075, RTX 5070 (10de:2f04) driver 32.0.16.2135, in-box WARP 10.0.26100.10068, debug layer enabled.

Result: 20 passes, one capability skip (bvh_wave64_hardware, expected on a wave32 adapter). On the author's GTX 1060/Win10 run seven tests skipped; here only one does.

Key observations:

  • bvh_buffer_ops_warp now runs and passes on WARP (shader_model_capped_at_6_0=0x60, 26 cases x 384 words, mismatches=0, debug_errors=0).
  • bvh_buffer_ops_hardware passes on the RTX 5070 with the same word-exact result.
  • The floor probe is correct: D3D12_FEATURE_DATA_SHADER_MODEL seeded at 6.0 clamps the reported model to at most 6.0, so HighestShaderModel < 6.0 only fires below the floor, and E_INVALIDARG maps to the capability skip.
  • Verified the "byte for byte" claim independently: dxc -T cs_6_5 -E CopyBlocks -Vn CopyBlocks -Fh old.h -Fo old.cso produces c7e55006f862e75eedd3a5dd97cabedf6e9b0cb0d0a82bd0f3c3421ab85a1618, identical to the new CopyBlocksSM65.cso. The retarget probe keeps exercising a true SM 6.5 fixture; dxil_retarget_probe, dxil_retarget_probe_hardware and dxil_retarget_controls all pass.
  • CTest property bookkeeping is consistent: bvh_buffer_ops_{adapter} picked up SKIP_RETURN_CODE 77 in the loop, the stale hardware-only skip line was removed, and bvh_buffer_ops_warp correctly left the cs_6_5 skip group.

No blockers found.

AI-assisted: yes. All reported checks ran locally on the adapter and driver listed.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6013699413 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/619#pullrequestreview-6013699413). Originally posted by [MarlomMedeiros](https://github.com/MarlomMedeiros) on 2026-11-22T18:16:10Z. **Review:** COMMENTED --- Tested the full 21-test matrix on a second configuration: Windows 11 build 26300.10075, RTX 5070 (10de:2f04) driver 32.0.16.2135, in-box WARP 10.0.26100.10068, debug layer enabled. Result: 20 passes, one capability skip (`bvh_wave64_hardware`, expected on a wave32 adapter). On the author's GTX 1060/Win10 run seven tests skipped; here only one does. Key observations: - `bvh_buffer_ops_warp` now runs and passes on WARP (`shader_model_capped_at_6_0=0x60`, 26 cases x 384 words, mismatches=0, debug_errors=0). - `bvh_buffer_ops_hardware` passes on the RTX 5070 with the same word-exact result. - The floor probe is correct: `D3D12_FEATURE_DATA_SHADER_MODEL` seeded at 6.0 clamps the reported model to at most 6.0, so `HighestShaderModel < 6.0` only fires below the floor, and E_INVALIDARG maps to the capability skip. - Verified the "byte for byte" claim independently: `dxc -T cs_6_5 -E CopyBlocks -Vn CopyBlocks -Fh old.h -Fo old.cso` produces `c7e55006f862e75eedd3a5dd97cabedf6e9b0cb0d0a82bd0f3c3421ab85a1618`, identical to the new `CopyBlocksSM65.cso`. The retarget probe keeps exercising a true SM 6.5 fixture; `dxil_retarget_probe`, `dxil_retarget_probe_hardware` and `dxil_retarget_controls` all pass. - CTest property bookkeeping is consistent: `bvh_buffer_ops_{adapter}` picked up `SKIP_RETURN_CODE 77` in the loop, the stale hardware-only skip line was removed, and `bvh_buffer_ops_warp` correctly left the cs_6_5 skip group. No blockers found. AI-assisted: yes. All reported checks ran locally on the adapter and driver listed.
thepatrickworld commented 2026-11-24 06:48:35 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-22T16:56:24Z.


Independent AMD (RDNA4) result on 9e95756. Not a code change; measurements only.

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
  • Preset dev, XBOX2WINDOWS_ADAPTER='AMD Radeon RX 9070 XT'
  • debug_layer=unavailable (Tools.Graphics.DirectX is NotPresent on this machine), so this run says nothing about validation-layer warnings — same limitation as the report in the PR body.

Clean worktree of the PR head 9e95756 over 9b0df70.

Commands

cmake --preset dev
cmake --build --preset dev --parallel 12 --target root_device_probe
cmake --build --preset dev --parallel 12 --target offscreen_check
set XBOX2WINDOWS_ADAPTER=AMD Radeon RX 9070 XT
ctest --preset dev --no-tests=error -V -R "^bvh_buffer_ops_hardware$"

Observed — the test this PR enables

backend=hardware debug_layer=unavailable
adapter=AMD Radeon RX 9070 XT vendor=1002 device=7550
driver=32.0.32029.2010
shader_model_capped_at_6_0=0x60
buffer_cases=26 words_per_case=384 mismatches=0
1/1 Test #46: bvh_buffer_ops_hardware ... Passed  0.33 sec

Regression in the same build

ctest --preset dev --no-tests=error -R "^bvh_.*(hardware|warp)$" → 20 tests, 19 passed, 1 skipped.

All ten _hardware variants passed on this adapter: buffer_ops, root_roundtrip, reads, waves, wave64, hits, differential, atomics, numeric, packed.

The single skip is bvh_wave64_warp (capability, lane range), which also skips on main on this machine — reported separately, not counted as a pass.

Conclusion

The SM 6.0 retarget reproduces the same result on a vendor and architecture the original verification did not cover: 9,984 words over 26 cases, zero mismatches, and no regression across the rest of the BVH fixtures. The stated behaviour (exit 77 for a capability skip) is unchanged.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7082455595 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/619#issuecomment-7082455595). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-22T16:56:24Z. --- **Independent AMD (RDNA4) result on `9e95756`.** Not a code change; measurements only. ### 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** - Preset `dev`, `XBOX2WINDOWS_ADAPTER='AMD Radeon RX 9070 XT'` - `debug_layer=unavailable` (`Tools.Graphics.DirectX` is `NotPresent` on this machine), so this run says nothing about validation-layer warnings — same limitation as the report in the PR body. Clean worktree of the PR head `9e95756` over `9b0df70`. ### Commands ``` cmake --preset dev cmake --build --preset dev --parallel 12 --target root_device_probe cmake --build --preset dev --parallel 12 --target offscreen_check set XBOX2WINDOWS_ADAPTER=AMD Radeon RX 9070 XT ctest --preset dev --no-tests=error -V -R "^bvh_buffer_ops_hardware$" ``` ### Observed — the test this PR enables ``` backend=hardware debug_layer=unavailable adapter=AMD Radeon RX 9070 XT vendor=1002 device=7550 driver=32.0.32029.2010 shader_model_capped_at_6_0=0x60 buffer_cases=26 words_per_case=384 mismatches=0 1/1 Test #46: bvh_buffer_ops_hardware ... Passed 0.33 sec ``` ### Regression in the same build `ctest --preset dev --no-tests=error -R "^bvh_.*(hardware|warp)$"` → **20 tests, 19 passed, 1 skipped**. All ten `_hardware` variants passed on this adapter: `buffer_ops`, `root_roundtrip`, `reads`, `waves`, `wave64`, `hits`, `differential`, `atomics`, `numeric`, `packed`. The single skip is `bvh_wave64_warp` (capability, lane range), which also skips on `main` on this machine — reported separately, not counted as a pass. ### Conclusion The SM 6.0 retarget reproduces the same result on a vendor and architecture the original verification did not cover: 9,984 words over 26 cases, zero mismatches, and no regression across the rest of the BVH fixtures. The stated behaviour (exit 77 for a capability skip) is unchanged. _AI-assisted._
legacy-code-archaeologist commented 2026-11-24 06:48:37 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-22T18:15:05Z.


Verification of the current head 49fa6d2 on two adapters older than your GTX 1060. Both are in one laptop, on Windows 11 26100.9168 with MSVC 19.52.37029 and the dev preset, and the debug layer is not installed. The head merges cleanly with main.

I ran your filter once per adapter, with XBOX2WINDOWS_ADAPTER set to Quadro and then Intel. Each hardware log names the selected adapter:

ctest --preset dev --no-tests=error -V -R '^(bvh_(buffer_ops|reads|waves|hits|packed|numeric|atomics)_(warp|hardware)|bvh_wave64_hardware|compute_(root|tables)_warp|offscreen_invalid_operation_warp|dxil_retarget_(controls|probe(_hardware)?))$'
Adapter Driver Result
NVIDIA Quadro M1000M (Maxwell, 10de:13b1) 32.0.15.7371 20 passed, 1 capability skip (bvh_wave64_hardware, lanes 32..32)
Intel HD Graphics 530 (Gen9, 8086:191b) 31.0.101.2111 20 passed, 1 capability skip (bvh_wave64_hardware, lanes 16..16)

Both adapters report buffer_cases=26 words_per_case=384 mismatches=0 for bvh_buffer_ops_hardware. They also pass bvh_buffer_ops_warp, the numeric bounds (655360 words, mismatches=0) and dxil_retarget_probe_hardware. Both adapters already meet SM 6.5 (Quadro 6.6, Intel 6.5), so these runs show that the cs_6_0 builds still pass on older hardware. They do not exercise a device below the previous SM 6.5 floor; the Windows 10 WARP run in the description covers that.

AI-assisted: run and summarized with Claude Code; outputs copied from the local runs.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7083459323 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/619#issuecomment-7083459323). Originally posted by [legacy-code-archaeologist](https://github.com/legacy-code-archaeologist) on 2026-11-22T18:15:05Z. --- Verification of the current head `49fa6d2` on two adapters older than your GTX 1060. Both are in one laptop, on Windows 11 26100.9168 with MSVC 19.52.37029 and the `dev` preset, and the debug layer is not installed. The head merges cleanly with `main`. I ran your filter once per adapter, with `XBOX2WINDOWS_ADAPTER` set to `Quadro` and then `Intel`. Each hardware log names the selected adapter: ```text ctest --preset dev --no-tests=error -V -R '^(bvh_(buffer_ops|reads|waves|hits|packed|numeric|atomics)_(warp|hardware)|bvh_wave64_hardware|compute_(root|tables)_warp|offscreen_invalid_operation_warp|dxil_retarget_(controls|probe(_hardware)?))$' ``` | Adapter | Driver | Result | |---|---|---| | NVIDIA Quadro M1000M (Maxwell, `10de:13b1`) | 32.0.15.7371 | 20 passed, 1 capability skip (`bvh_wave64_hardware`, lanes 32..32) | | Intel HD Graphics 530 (Gen9, `8086:191b`) | 31.0.101.2111 | 20 passed, 1 capability skip (`bvh_wave64_hardware`, lanes 16..16) | Both adapters report `buffer_cases=26 words_per_case=384 mismatches=0` for `bvh_buffer_ops_hardware`. They also pass `bvh_buffer_ops_warp`, the numeric bounds (`655360 words, mismatches=0`) and `dxil_retarget_probe_hardware`. Both adapters already meet SM 6.5 (Quadro 6.6, Intel 6.5), so these runs show that the `cs_6_0` builds still pass on older hardware. They do not exercise a device below the previous SM 6.5 floor; the Windows 10 WARP run in the description covers that. AI-assisted: run and summarized with Claude Code; outputs copied from the local runs.
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!613
No description provided.