spirv_ballot_extract fails instead of skipping on runtimes without cs_6_6 #745

Closed
opened 2026-11-23 00:49:17 +00:00 by lukaslw-lab · 2 comments
lukaslw-lab commented 2026-11-23 00:49:17 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-23T00:49:17Z.


AI-assisted (Claude Code).

spirv_ballot_extract_hardware and spirv_ballot_extract_warp (from #656) fail instead of skipping where the D3D12 runtime doesn't accept cs_6_6. Windows 10 22H2 build 19045.7846, in-box D3D12 runtime, at 67edabe:

ctest --preset dev --no-tests=error -R '^spirv_(ballot_extract|address_window|compare_sampler)_(warp|hardware)$'
Test RTX 3080 Ti (32.0.16.1047) In-box WARP 10.0.19041.7811
spirv_ballot_extract_* fails fails
spirv_address_window_*, spirv_compare_sampler_* skip (77): "requires SM 6.6" skip (77): "requires SM 6.6"
D3D12 881: ID3D12Device::CreateComputeShader: Shader must be cs_6_5, cs_6_4, cs_6_3, cs_6_2, cs_6_1, cs_6_0, cs_5_1, cs_5_0, cs_4_1, cs_4_0. Shader version provided: cs_6_6.
Create compute pipeline failed (HRESULT 0x80070057)

(WARP lists up to cs_6_2.) With the Agility SDK 1.620.2 runtime and WARP 1.0.22, all eight spirv_* tests pass.

  • ballot.py compiles at cs_6_6 and runs through --compute-store-case, which has kNoGate. The siblings use --spirv-address-window and --spirv-compare-sampler, gated by kGateAddressWindow and kGateSm66CompareSampler.
  • Lowering the shader model is not a fix here. The SM 6.0 output has no wave operations, and cs_6_0 passes on the RTX 3080 Ti (0 mismatches, swapped-bit control 2). But the in-box WARP then crashes in its DXIL compiler on the bridge's indexed constant uint4, the same fault as #742.
  • Suggested fix: give the ballot readback the same SM 6.6 gate as its siblings (for example a --spirv-ballot operation with an SM 6.6 CapabilityGate), so it reports 77 on older runtimes.

Environment: MSVC 19.52.37029, Windows SDK 10.0.26100, DXC 1.9.2609, SPIR-V tools from tools/setup-spirv-tools.ps1 (SPIRV-Tools v2025.5, SPIRV-Cross 57e4efc), dev preset, debug layer enabled.

Refs #656, #742

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6550014015 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/751). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-23T00:49:17Z. --- _AI-assisted (Claude Code)._ `spirv_ballot_extract_hardware` and `spirv_ballot_extract_warp` (from #656) fail instead of skipping where the D3D12 runtime doesn't accept `cs_6_6`. Windows 10 22H2 build 19045.7846, in-box D3D12 runtime, at `67edabe`: ```powershell ctest --preset dev --no-tests=error -R '^spirv_(ballot_extract|address_window|compare_sampler)_(warp|hardware)$' ``` | Test | RTX 3080 Ti (32.0.16.1047) | In-box WARP 10.0.19041.7811 | |---|---|---| | `spirv_ballot_extract_*` | fails | fails | | `spirv_address_window_*`, `spirv_compare_sampler_*` | skip (77): "requires SM 6.6" | skip (77): "requires SM 6.6" | ```text D3D12 881: ID3D12Device::CreateComputeShader: Shader must be cs_6_5, cs_6_4, cs_6_3, cs_6_2, cs_6_1, cs_6_0, cs_5_1, cs_5_0, cs_4_1, cs_4_0. Shader version provided: cs_6_6. Create compute pipeline failed (HRESULT 0x80070057) ``` (WARP lists up to `cs_6_2`.) With the Agility SDK 1.620.2 runtime and WARP 1.0.22, all eight `spirv_*` tests pass. - `ballot.py` compiles at `cs_6_6` and runs through `--compute-store-case`, which has `kNoGate`. The siblings use `--spirv-address-window` and `--spirv-compare-sampler`, gated by `kGateAddressWindow` and `kGateSm66CompareSampler`. - Lowering the shader model is not a fix here. The SM 6.0 output has no wave operations, and `cs_6_0` passes on the RTX 3080 Ti (0 mismatches, swapped-bit control 2). But the in-box WARP then crashes in its DXIL compiler on the bridge's indexed constant `uint4`, the same fault as #742. - Suggested fix: give the ballot readback the same SM 6.6 gate as its siblings (for example a `--spirv-ballot` operation with an SM 6.6 `CapabilityGate`), so it reports 77 on older runtimes. Environment: MSVC 19.52.37029, Windows SDK 10.0.26100, DXC 1.9.2609, SPIR-V tools from `tools/setup-spirv-tools.ps1` (SPIRV-Tools v2025.5, SPIRV-Cross `57e4efc`), `dev` preset, debug layer enabled. Refs #656, #742
R0Y00 commented 2026-11-24 06:48:55 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T01:12:22Z.


The ballot fixture should keep compiling as cs_6_6. Please route it through a dedicated operation that checks SM 6.6 before PSO creation and returns 77 when that capability is absent. Keep hosted CI strict. A useful control is the same operation on the Windows 10 in-box runtime (77) and on Agility WARP (full readback and wrong-reference mismatch).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7088958610 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/751#issuecomment-7088958610). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T01:12:22Z. --- The ballot fixture should keep compiling as `cs_6_6`. Please route it through a dedicated operation that checks SM 6.6 before PSO creation and returns 77 when that capability is absent. Keep hosted CI strict. A useful control is the same operation on the Windows 10 in-box runtime (77) and on Agility WARP (full readback and wrong-reference mismatch).
Jess-Doit commented 2026-11-24 06:48:55 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-23T01:38:18Z.


#763 covers the requested SM 6.6 gate. I also tested scalar mask-word selection at cs_6_0 on Windows 10 22H2 build 19045.6456. The GTX 1060 (32.0.15.6094), in-box WARP (10.0.19041.5794), and Agility WARP 1.0.22 each matched all 128 result words and 192 guards. The swapped-bit control produced exactly two mismatches, with zero D3D12 debug warnings or errors on all three adapters.

Would a separate SM 6.0 compatibility follow-up be useful for keeping this readback runnable on older Windows runtimes?

AI-assisted. All measurements were run locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7089299377 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/751#issuecomment-7089299377). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-23T01:38:18Z. --- #763 covers the requested SM 6.6 gate. I also tested scalar mask-word selection at `cs_6_0` on Windows 10 22H2 build 19045.6456. The GTX 1060 (32.0.15.6094), in-box WARP (10.0.19041.5794), and Agility WARP 1.0.22 each matched all 128 result words and 192 guards. The swapped-bit control produced exactly two mismatches, with zero D3D12 debug warnings or errors on all three adapters. Would a separate SM 6.0 compatibility follow-up be useful for keeping this readback runnable on older Windows runtimes? _AI-assisted. All measurements were run locally._
Sign in to join this conversation.
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#745
No description provided.