Skip to content

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

Merged
R0Y00 merged 1 commit into
R0Y00:mainfrom
lukaslw-lab:gpu/spirv-ballot-sm66-gate
Nov 23, 2026
Merged

R0Y00 merged 1 commit into
R0Y00:mainfrom
lukaslw-lab:gpu/spirv-ballot-sm66-gate

Conversation

@lukaslw-lab

Copy link
Copy Markdown
Contributor

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

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 <noreply@anthropic.com>
@lukaslw-lab

Copy link
Copy Markdown
Contributor Author

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 (gpu: skip the title-address write fixture where array atomics are inexact #332, gpu_alias_lookup_writes_hardware: array atomics probe reads 256 per buffer on RX 9070 XT #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).

@R0Y00
R0Y00 merged commit f714d2f into R0Y00:main Nov 23, 2026
5 checks passed
@lukaslw-lab
lukaslw-lab deleted the gpu/spirv-ballot-sm66-gate branch November 23, 2026 01:49
lukaslw-lab added a commit to lukaslw-lab/Xbox2Windows that referenced this pull request Nov 23, 2026
The SPIR-V MinLod fixtures compile ps_6_6. On a runtime capped at SM 6.5,
such as the Windows 10 in-box runtime, pipeline creation failed instead
of reporting a skip. Route the existing quad-LOD draw through a gated
--spirv-minlod-quad-lod operation and gate --check-pixel-mip-clamp and
--check-pixel-mip-blend the same way, as R0Y00#763 did for the ballot fixture.
The self-test checks that each operation exits 77 below SM 6.6.

Refs R0Y00#809

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spirv_ballot_extract fails instead of skipping on runtimes without cs_6_6

2 participants