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

Merged
lukaslw-lab merged 1 commit from upstream-pr/763 into main 2026-11-23 01:46:21 +00:00
lukaslw-lab commented 2026-11-23 01:25:53 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-23T01:25:53Z.


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

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6550375972 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/763). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-23T01:25:53Z. --- _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)
upstream-sync closed this pull request 2026-11-24 06:44:40 +00:00
lukaslw-lab commented 2026-11-24 06:48:55 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-23T01:36:31Z.


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).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7089273547 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/763#issuecomment-7089273547). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-23T01:36:31Z. --- 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`).
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!757
No description provided.