gpu: gate the SPIR-V ballot readback on SM 6.6 #763

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

@⁠lukaslw-lab on GitHub · 2026-11-23 01:25 UTC · original
lukaslw-lab:gpu/spirv-ballot-sm66-gate → main · +25 −1 · 2 files · 1 commits · merged 2026-11-23 01:46 UTC

AI-assisted: prepared with Claude Code; the commands and results below were run on the author's PC.

Change

spirv_ballot_extract_* now runs through a dedicated offscreen_check --spirv-ballot operation. Its kGateSm66Ballot gate checks SM 6.6 before PSO creation and exits 77 with skip: ballot fixture requires SM 6.6. The fixture still compiles cs_6_6, and the operation reuses the existing compute-store readback (run_compute_store_case), so passing runs are unchanged. The capability-table self-test runs the real --spirv-ballot entry with SM 6.5 caps and requires 77 and the skip reason, plus argument-count checks.

Fixes #751. Refs #656.

Hosted CI stays strict: tests/spirv_window/require_warp_results.py still requires spirv_ballot_extract_warp to run and pass.

tests/offscreen_check.cpp is also touched by open #606 and #713. Each adds its own entries to the gate and operation tables, so whichever lands second keeps both.

Verification

Commit b1e3615 (on 37ed46d) on Windows 10 22H2 (build 19045.7846), Visual Studio 2026 18.12.1 (MSVC 19.52.37029), Windows SDK 10.0.26100, CMake 4.3.1, Python 3.13.7, DXC 1.9.2609, SPIR-V tools from tools/setup-spirv-tools.ps1, GPU: NVIDIA GeForce RTX 3080 Ti, driver 32.0.16.1047. dev uses the in-box D3D12 runtime; w10 is dev with app-local Agility SDK 1.620.2 and WARP 1.0.22.

ctest --preset dev --no-tests=error -R '^(spirv_.*|offscreen_capability_table_self_test|compute_store.*)$'
Build Before (main at 67edabe, -R '^spirv_') After
dev 8 total: 2 passed, 4 skipped, 2 failed: spirv_ballot_extract_hardware and _warp (Shader must be cs_6_5, … / cs_6_2, …, Shader version provided: cs_6_6) 11 total: 5 passed, 6 skipped (the spirv_* tests that need SM 6.6), 0 failed
w10 8 total: 8 passed 11 total: 11 passed

The two controls from #751:

Build, adapter --spirv-ballot result
dev, RTX 3080 Ti (in-box runtime) 77: skip: ballot fixture requires SM 6.6
dev, in-box WARP 10.0.19041.7811 77: skip: ballot fixture requires SM 6.6
w10, RTX 3080 Ti (Agility) compared_words=320 mismatches=0; wrong reference mismatches=2
w10, WARP 1.0.22 (Agility) compared_words=320 mismatches=0; wrong reference mismatches=2

The full dev suite at b1e3615 is still running; I'll post its result as a comment.

Evidence and follow-up

  • No new fixture. The existing wrong-reference control in ballot.py (bits 31/32 swapped) reports exactly 2 mismatches on both Agility adapters.
  • The skip path is covered in hosted CI by offscreen_capability_table_self_test, which simulates a runtime capped at SM 6.5. The CI runners themselves support SM 6.6.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed. (No capability or requirement changed.)
  • I did not include game files, dumps, distribution links or secrets.

🤖 Generated with Claude Code

**@⁠lukaslw-lab** on GitHub · 2026-11-23 01:25 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/763) `lukaslw-lab:gpu/spirv-ballot-sm66-gate` → `main` · +25 −1 · 2 files · 1 commits · merged 2026-11-23 01:46 UTC _AI-assisted: prepared with Claude Code; the commands and results below were run on the author's PC._ ## Change `spirv_ballot_extract_*` now runs through a dedicated `offscreen_check --spirv-ballot` operation. Its `kGateSm66Ballot` gate checks SM 6.6 before PSO creation and exits 77 with `skip: ballot fixture requires SM 6.6`. The fixture still compiles `cs_6_6`, and the operation reuses the existing compute-store readback (`run_compute_store_case`), so passing runs are unchanged. The capability-table self-test runs the real `--spirv-ballot` entry with SM 6.5 caps and requires 77 and the skip reason, plus argument-count checks. Fixes #751. Refs #656. Hosted CI stays strict: `tests/spirv_window/require_warp_results.py` still requires `spirv_ballot_extract_warp` to run and pass. `tests/offscreen_check.cpp` is also touched by open #606 and #713. Each adds its own entries to the gate and operation tables, so whichever lands second keeps both. ## Verification Commit `b1e3615` (on `37ed46d`) on Windows 10 22H2 (build 19045.7846), Visual Studio 2026 18.12.1 (MSVC 19.52.37029), Windows SDK 10.0.26100, CMake 4.3.1, Python 3.13.7, DXC 1.9.2609, SPIR-V tools from `tools/setup-spirv-tools.ps1`, GPU: NVIDIA GeForce RTX 3080 Ti, driver 32.0.16.1047. `dev` uses the in-box D3D12 runtime; `w10` is `dev` with app-local Agility SDK 1.620.2 and WARP 1.0.22. ```powershell ctest --preset dev --no-tests=error -R '^(spirv_.*|offscreen_capability_table_self_test|compute_store.*)$' ``` | Build | Before (`main` at `67edabe`, `-R '^spirv_'`) | After | |---|---|---| | `dev` | 8 total: 2 passed, 4 skipped, 2 failed: `spirv_ballot_extract_hardware` and `_warp` (`Shader must be cs_6_5, …` / `cs_6_2, …`, `Shader version provided: cs_6_6`) | 11 total: 5 passed, 6 skipped (the `spirv_*` tests that need SM 6.6), 0 failed | | `w10` | 8 total: 8 passed | 11 total: 11 passed | The two controls from #751: | Build, adapter | `--spirv-ballot` result | |---|---| | `dev`, RTX 3080 Ti (in-box runtime) | 77: `skip: ballot fixture requires SM 6.6` | | `dev`, in-box WARP 10.0.19041.7811 | 77: `skip: ballot fixture requires SM 6.6` | | `w10`, RTX 3080 Ti (Agility) | `compared_words=320 mismatches=0`; wrong reference `mismatches=2` | | `w10`, WARP 1.0.22 (Agility) | `compared_words=320 mismatches=0`; wrong reference `mismatches=2` | The full `dev` suite at `b1e3615` is still running; I'll post its result as a comment. ## Evidence and follow-up - No new fixture. The existing wrong-reference control in `ballot.py` (bits 31/32 swapped) reports exactly 2 mismatches on both Agility adapters. - The skip path is covered in hosted CI by `offscreen_capability_table_self_test`, which simulates a runtime capped at SM 6.5. The CI runners themselves support SM 6.6. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated README/docs when a capability or build requirement changed. (No capability or requirement changed.) - [x] I did not include game files, dumps, distribution links or secrets. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
spirv_ballot_extract compiles cs_6_6 but ran through --compute-store-case,
which has no capability gate, so runtimes without SM 6.6 (the Windows 10
in-box runtime) failed PSO creation instead of skipping. Add a dedicated
--spirv-ballot operation with an SM 6.6 gate that reuses the compute-store
readback, and self-test that a runtime capped at SM 6.5 exits 77.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:16:41 +00:00
github manually merged commit b1e3615727 into gh-pr/763/base 2026-11-26 22:16:43 +00:00
Author
Owner

@⁠lukaslw-lab on GitHub · 2026-11-23 01:36 UTC · original

Full dev suite at b1e3615 (same environment as above, in-box D3D12 runtime and WARP 10.0.19041.7811):

ctest --preset dev --no-tests=error
331 total: 291 passed, 39 skipped (exit 77), 1 failed
  • spirv_ballot_extract_hardware and _warp now skip with skip: ballot fixture requires SM 6.6 (before this change they failed here).
  • The one failure is gpu_alias_lookup_writes_warp, already known on this in-box WARP (#332, #369). It's unrelated to this change.
  • The other 37 skips are capability skips on this runtime and CPU: no mesh shaders, DXR or wave64 on the in-box WARP (mesh_*_warp, dxr_*_warp, bvh_*_warp, wave_shuffle_warp, cpu_shim_chain_warp, compute_mesh_texture_warp); no SM 6.6 in the in-box runtime (spirv_address_window_*, spirv_compare_sampler_*); bvh_wave64_hardware and wave_shuffle_hardware need wave64; no ADX, SHA, CLFLUSHOPT or CLWB on this CPU (cpu_aot_adx, cpu_aot_crypto_sha, cpu_aot_fences_hints_clflushopt/_clwb, cpu_aot_x87_compare).
**@⁠lukaslw-lab** on GitHub · 2026-11-23 01:36 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/763#issuecomment-7089273547) Full `dev` suite at `b1e3615` (same environment as above, in-box D3D12 runtime and WARP `10.0.19041.7811`): ```powershell ctest --preset dev --no-tests=error ``` ```text 331 total: 291 passed, 39 skipped (exit 77), 1 failed ``` - `spirv_ballot_extract_hardware` and `_warp` now skip with `skip: ballot fixture requires SM 6.6` (before this change they failed here). - The one failure is `gpu_alias_lookup_writes_warp`, already known on this in-box WARP (#332, #369). It's unrelated to this change. - The other 37 skips are capability skips on this runtime and CPU: no mesh shaders, DXR or wave64 on the in-box WARP (`mesh_*_warp`, `dxr_*_warp`, `bvh_*_warp`, `wave_shuffle_warp`, `cpu_shim_chain_warp`, `compute_mesh_texture_warp`); no SM 6.6 in the in-box runtime (`spirv_address_window_*`, `spirv_compare_sampler_*`); `bvh_wave64_hardware` and `wave_shuffle_hardware` need wave64; no ADX, SHA, CLFLUSHOPT or CLWB on this CPU (`cpu_aot_adx`, `cpu_aot_crypto_sha`, `cpu_aot_fences_hints_clflushopt`/`_clwb`, `cpu_aot_x87_compare`).
This discussion has been locked. Commenting is limited to contributors.
No description provided.