Isolate WARP readback differences in a source-built subgroup compaction dispatch #762

Open
opened 2026-11-23 01:55:45 +00:00 by R0Y00 · 25 comments
R0Y00 commented 2026-11-23 01:55:45 +00:00 (Migrated from github.com)
Contributor

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


Why this advances the port

#656 verifies subgroup ballot-bit extraction, and #763 distinguishes adapters that lack SM 6.6. In a fixed-profile local compute replay, one record built a pipeline on both RTX and WARP. Its two controlled inputs matched the reference on RTX, while WARP returned different DWORDs. The cause remains open. A public subgroup compaction fixture would let contributors check the wave operations and the writeback separately.

Scope

Start from the optional SPIR-V bridge fixture and build one source-owned compute program. Give it a sparse per-lane predicate and disjoint output ranges per wave. Make the observed lane index and width, ballot mask, selected-lane rank and compacted writeback visible separately. Use the measured lane width when calculating the independent CPU reference. Keep the result independent of the scheduling order of workgroups or waves. Compare direct desktop HLSL and the SPIR-V-to-HLSL bridge under the same inputs where practical.

Acceptance

  • Run two deterministic input masks on WARP and one capable physical adapter. Compare all intermediate words, compacted values, counts and untouched guards against the CPU reference. Include lanes around the 31/32 boundary when supported and report the actual width and capability skips.
  • Show that a wrong ballot bit or write index gives a predicted first mismatch. If the public fixture passes both paths, record the narrowed scope and any remaining replay difference. If it diverges, identify the first divergent intermediate, with the source-build SHA and exact reproducer.
  • Register the public check in the bridge test suite. Record the OS, adapter, driver, debug-layer setting, tool versions and exact command. Keep the existing ballot capability gate and passing regressions.

To claim, say whether you will implement the source fixture or independently test it on another backend. Refs #656 and #763.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6550678730 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T01:55:45Z. --- ## Why this advances the port #656 verifies subgroup ballot-bit extraction, and #763 distinguishes adapters that lack SM 6.6. In a fixed-profile local compute replay, one record built a pipeline on both RTX and WARP. Its two controlled inputs matched the reference on RTX, while WARP returned different DWORDs. The cause remains open. A public subgroup compaction fixture would let contributors check the wave operations and the writeback separately. ## Scope Start from the optional SPIR-V bridge fixture and build one source-owned compute program. Give it a sparse per-lane predicate and disjoint output ranges per wave. Make the observed lane index and width, ballot mask, selected-lane rank and compacted writeback visible separately. Use the measured lane width when calculating the independent CPU reference. Keep the result independent of the scheduling order of workgroups or waves. Compare direct desktop HLSL and the SPIR-V-to-HLSL bridge under the same inputs where practical. ## Acceptance - Run two deterministic input masks on WARP and one capable physical adapter. Compare all intermediate words, compacted values, counts and untouched guards against the CPU reference. Include lanes around the 31/32 boundary when supported and report the actual width and capability skips. - Show that a wrong ballot bit or write index gives a predicted first mismatch. If the public fixture passes both paths, record the narrowed scope and any remaining replay difference. If it diverges, identify the first divergent intermediate, with the source-build SHA and exact reproducer. - Register the public check in the bridge test suite. Record the OS, adapter, driver, debug-layer setting, tool versions and exact command. Keep the existing ballot capability gate and passing regressions. To claim, say whether you will implement the source fixture or independently test it on another backend. Refs #656 and #763.
R0Y00 commented 2026-11-24 06:48:57 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T02:31:35Z.


#774 now gives a working source-built starting point in tests/spirv_window/check.py: a ballot bit controls an address-window store, and clearing that bit changes DWORD 11 on app-local WARP. Its mask is constant. For this issue, keep that test as the baseline and make the new predicate vary across lanes. Compare the ballot words and rank before the compacted store, so a mismatch can be placed before or after address calculation.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7090006897 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7090006897). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T02:31:35Z. --- #774 now gives a working source-built starting point in `tests/spirv_window/check.py`: a ballot bit controls an address-window store, and clearing that bit changes DWORD 11 on app-local WARP. Its mask is constant. For this issue, keep that test as the baseline and make the new predicate vary across lanes. Compare the ballot words and rank before the compacted store, so a mismatch can be placed before or after address calculation.
FZNull commented 2026-11-24 06:48:59 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by FZNull on 2026-11-23T03:41:49Z.


Built the fixture and ran it. The difference is isolated, and it is not a WARP arithmetic bug: it is the wave width.

Fixture (PR #791, tests/spirv_window/compaction.* plus --spirv-compaction): one 64-thread group, sparse predicate from a deterministic 64-bit mask, real OpGroupNonUniformBallot, with separate words for the observed lane index, observed width, ballot words per wave, first/count/last active lane, the selected lane's rank, the per-lane rank, and compacted payloads in wave-disjoint ranges, plus a guard tail that must stay 0xc5c5c5c5. The CPU reference is recomputed at the width the shader reports.

Result: both adapters match their width-aware CPU reference in all 328 words, two masks, bridge and direct-HLSL control: 0 mismatches, guards intact, repeated dispatches identical. The two negative controls (wrong ballot bit, shifted write index) are caught at the predicted first words 65 and 257 on both adapters.

The adapters differ first at word 4, the per-thread lane index: RTX 4060 0x00000004, WARP 0x00000000; 259/328 words differ with mask A and 260 with mask B. D3D12_OPTIONS1.WaveLaneCountMin/Max is 32/32 on the RTX 4060 and 4/4 on WARP, and WaveGetLaneCount() in the shader returns 32 and 4. A CPU model at width 32 gives the same first mismatch against the WARP readback. At its native 4-lane width WARP matches the independent model exactly, so there is no ballot, rank or writeback divergence there — a compaction kernel that assumes 32 lanes simply produces different DWORDs on WARP. That also fits #774 matching on WARP: constant-mask ballot-bit extraction is width-independent, a real ballot/compaction layout is not.

Caveat, stated because it matters: I cannot replay the original record (it is not in the public tree), so this isolates a reproducible difference of the same class rather than proving that replay used a 32-lane assumption. The next step is to run that record through this fixture, or log WaveGetLaneCount() in the replay and recompute its reference at the observed width.

Repro:

cmake --build --preset dev --target offscreen_check
ctest --preset dev --no-tests=error -R '^spirv_compaction_' -V
python -B tests/spirv_window/compaction.py <spirv-as> <spirv-val> <spirv-cross> <dxc> out/build/dev/offscreen_check.exe hardware

Environment: Windows 11 Pro build 26300.10075, debug layer unavailable; RTX 4060 driver 32.0.16.2124 (32..32); WARP 10.0.26100.10068 (4..4); MSVC 19.50.35726, SDK 10.0.26100, DXC 1.9.2609.5, SPIRV-Tools v2025.5 262bdab, SPIRV-Cross 57e4efc. No adapter here exposes a 64-lane wave, so the intra-wave 31/32 boundary is a capability skip; the 31/32 bit boundary is still covered across two 32-lane waves.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7090953087 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7090953087). Originally posted by [FZNull](https://github.com/FZNull) on 2026-11-23T03:41:49Z. --- Built the fixture and ran it. The difference is isolated, and it is not a WARP arithmetic bug: **it is the wave width**. Fixture (PR #791, `tests/spirv_window/compaction.*` plus `--spirv-compaction`): one 64-thread group, sparse predicate from a deterministic 64-bit mask, real `OpGroupNonUniformBallot`, with separate words for the observed lane index, observed width, ballot words per wave, first/count/last active lane, the selected lane's rank, the per-lane rank, and compacted payloads in wave-disjoint ranges, plus a guard tail that must stay `0xc5c5c5c5`. The CPU reference is recomputed at the width the shader reports. Result: **both adapters match their width-aware CPU reference in all 328 words**, two masks, bridge and direct-HLSL control: 0 mismatches, guards intact, repeated dispatches identical. The two negative controls (wrong ballot bit, shifted write index) are caught at the predicted first words 65 and 257 on both adapters. The adapters differ first at **word 4, the per-thread lane index: RTX 4060 `0x00000004`, WARP `0x00000000`**; 259/328 words differ with mask A and 260 with mask B. `D3D12_OPTIONS1.WaveLaneCountMin/Max` is 32/32 on the RTX 4060 and **4/4 on WARP**, and `WaveGetLaneCount()` in the shader returns 32 and 4. A CPU model at width 32 gives the same first mismatch against the WARP readback. At its native 4-lane width WARP matches the independent model exactly, so there is no ballot, rank or writeback divergence there — a compaction kernel that assumes 32 lanes simply produces different DWORDs on WARP. That also fits #774 matching on WARP: constant-mask ballot-bit extraction is width-independent, a real ballot/compaction layout is not. Caveat, stated because it matters: I cannot replay the original record (it is not in the public tree), so this isolates a reproducible difference of the same class rather than proving that replay used a 32-lane assumption. The next step is to run that record through this fixture, or log `WaveGetLaneCount()` in the replay and recompute its reference at the observed width. Repro: ```powershell cmake --build --preset dev --target offscreen_check ctest --preset dev --no-tests=error -R '^spirv_compaction_' -V python -B tests/spirv_window/compaction.py <spirv-as> <spirv-val> <spirv-cross> <dxc> out/build/dev/offscreen_check.exe hardware ``` Environment: Windows 11 Pro build 26300.10075, debug layer unavailable; RTX 4060 driver 32.0.16.2124 (32..32); WARP 10.0.26100.10068 (4..4); MSVC 19.50.35726, SDK 10.0.26100, DXC 1.9.2609.5, SPIRV-Tools v2025.5 `262bdab`, SPIRV-Cross `57e4efc`. No adapter here exposes a 64-lane wave, so the intra-wave 31/32 boundary is a capability skip; the 31/32 bit boundary is still covered across two 32-lane waves. _AI-assisted._
R0Y00 commented 2026-11-24 06:49:00 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T04:32:55Z.


#791 merged as 333562f. The public fixture matches all 328 words against the reference at the observed wave width on WARP and RTX 4060 for both masks and both backends. Recomputing at width 32 reproduces the first mismatch against the 4-lane WARP run. That establishes a source-built width-sensitive case. This issue stays open until the original replay records the shader’s observed width and checks the intermediate words against a reference at that width.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7091671732 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7091671732). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T04:32:55Z. --- #791 merged as `333562f`. The public fixture matches all 328 words against the reference at the observed wave width on WARP and RTX 4060 for both masks and both backends. Recomputing at width 32 reproduces the first mismatch against the 4-lane WARP run. That establishes a source-built width-sensitive case. This issue stays open until the original replay records the shader’s observed width and checks the intermediate words against a reference at that width.
R0Y00 commented 2026-11-24 06:49:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T09:13:53Z.


#821 landed as 16d2356. The source-built fixture now also runs with cs_6_0. The GTX 1060, Windows 10 in-box WARP and app-local WARP runs observed widths 32, 4 and 8 and matched all 328 words in both shader paths. The original replay stays open. Capture the observed lane count there and compare the per-wave ballot, rank and compacted payload against a reference for that same width.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7096381750 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7096381750). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T09:13:53Z. --- #821 landed as `16d2356`. The source-built fixture now also runs with `cs_6_0`. The GTX 1060, Windows 10 in-box WARP and app-local WARP runs observed widths 32, 4 and 8 and matched all 328 words in both shader paths. The original replay stays open. Capture the observed lane count there and compare the per-wave ballot, rank and compacted payload against a reference for that same width.
rasptum commented 2026-11-24 06:49:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by rasptum on 2026-11-23T16:16:14Z.


Independent Ampere run of the public compaction fixture (tests/spirv_window/compaction.*, --spirv-compaction). The original replay was not run, because it needs data that is not public.

Environment

  • Commit 2aa81a2629ca1d2364928461a0d6650fd77a52ac (current main, includes #791 and #821)
  • Windows 10 Pro 22H2, build 19045.6466
  • NVIDIA GeForce RTX 3060 12 GB (Ampere, 10de:2503), driver 32.0.15.9636 (596.36)
  • In-box WARP (Microsoft Basic Render Driver) 10.0.19041.5794, same machine, as the control
  • Debug layer: enabled on every dispatch (d3d12SDKLayers.dll 10.0.19041.5794 present)
  • MSVC 19.44.35207, Windows SDK 10.0.26100.0, DXC 1.7.2308.16 (SDK copy)
  • SPIR-V tools: Vulkan SDK copies instead of the pinned setup-spirv-tools.ps1 build: SPIRV-Tools v2026.4 (ef96ed76), SPIRV-Cross vulkan-sdk-1.4.357.0-39-gf11ba9f0
  • Other display adapters are installed on this box, so the hardware run was pinned with XBOX2WINDOWS_ADAPTER

Commands

. .\tools\dev.ps1
$env:XBOX2WINDOWS_ADAPTER = 'RTX 3060'
$env:X2W_REQUIRE_SPIRV_TOOLS = '1'
foreach ($preset in @('dev', 'release')) {
    cmake --preset $preset
    cmake --build --preset $preset --parallel 4 --target offscreen_check
    ctest --preset $preset --no-tests=error -V -R '^spirv_compaction_(hardware|warp)$'
}

Results (each cell covers dev and release, which gave identical output)

Adapter Observed width Mask Bridge (cs_6_0) Direct HLSL (cs_6_0) Repeat Bridge = direct
RTX 3060 32 (2 waves) mask_a 328/328 328/328 identical yes
RTX 3060 32 (2 waves) mask_b 328/328 328/328 identical yes
WARP 4 (16 waves) mask_a 328/328 328/328 identical yes
WARP 4 (16 waves) mask_b 328/328 328/328 identical yes

Negative controls, both masks, both presets. Each matched its mutated reference exactly and diverged from the original reference at the predicted word:

Adapter ballot_bit first mismatch write_index first mismatch
RTX 3060 65 (38 words) 257 (18 words)
WARP 65 (80 words) 257 (32 words)

ctest: dev 2/2 passed, release 2/2 passed, 0 failed, 0 capability skips, 0 timeouts. All 48 dispatches (24 per preset) reported debug_errors=0 debug_warnings=0.

Not covered

  • Debug layer off: offscreen_check has no switch for it. It enables the layer whenever SDK layers are present, so I did not run that variant.
  • Intra-wave 31/32 ballot-word boundary: the RTX 3060 reports 32 lanes, so this boundary still needs a 64-lane adapter. The 31/32 mask-bit boundary is exercised across the two 32-lane waves.
  • The fixture's own path is cs_6_0 for both bridge and direct. No separate SM 6.6 compaction path exists on current main.

Conclusion: Ampere (RTX 3060) runs at width 32 and matches the width-aware CPU reference in all 328 words, for both masks and both shader paths, in dev and release, with the debug layer on. Same-machine WARP matches at width 4.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7106873095 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7106873095). Originally posted by [rasptum](https://github.com/rasptum) on 2026-11-23T16:16:14Z. --- Independent Ampere run of the public compaction fixture (`tests/spirv_window/compaction.*`, `--spirv-compaction`). The original replay was not run, because it needs data that is not public. **Environment** - Commit `2aa81a2629ca1d2364928461a0d6650fd77a52ac` (current `main`, includes #791 and #821) - Windows 10 Pro 22H2, build 19045.6466 - NVIDIA GeForce RTX 3060 12 GB (Ampere, `10de:2503`), driver 32.0.15.9636 (596.36) - In-box WARP (Microsoft Basic Render Driver) 10.0.19041.5794, same machine, as the control - Debug layer: enabled on every dispatch (`d3d12SDKLayers.dll` 10.0.19041.5794 present) - MSVC 19.44.35207, Windows SDK 10.0.26100.0, DXC 1.7.2308.16 (SDK copy) - SPIR-V tools: Vulkan SDK copies instead of the pinned `setup-spirv-tools.ps1` build: SPIRV-Tools v2026.4 (`ef96ed76`), SPIRV-Cross `vulkan-sdk-1.4.357.0-39-gf11ba9f0` - Other display adapters are installed on this box, so the hardware run was pinned with `XBOX2WINDOWS_ADAPTER` **Commands** ```powershell . .\tools\dev.ps1 $env:XBOX2WINDOWS_ADAPTER = 'RTX 3060' $env:X2W_REQUIRE_SPIRV_TOOLS = '1' foreach ($preset in @('dev', 'release')) { cmake --preset $preset cmake --build --preset $preset --parallel 4 --target offscreen_check ctest --preset $preset --no-tests=error -V -R '^spirv_compaction_(hardware|warp)$' } ``` **Results** (each cell covers dev and release, which gave identical output) | Adapter | Observed width | Mask | Bridge (`cs_6_0`) | Direct HLSL (`cs_6_0`) | Repeat | Bridge = direct | | --- | ---: | --- | --- | --- | --- | --- | | RTX 3060 | 32 (2 waves) | mask_a | 328/328 | 328/328 | identical | yes | | RTX 3060 | 32 (2 waves) | mask_b | 328/328 | 328/328 | identical | yes | | WARP | 4 (16 waves) | mask_a | 328/328 | 328/328 | identical | yes | | WARP | 4 (16 waves) | mask_b | 328/328 | 328/328 | identical | yes | Negative controls, both masks, both presets. Each matched its mutated reference exactly and diverged from the original reference at the predicted word: | Adapter | `ballot_bit` first mismatch | `write_index` first mismatch | | --- | ---: | ---: | | RTX 3060 | 65 (38 words) | 257 (18 words) | | WARP | 65 (80 words) | 257 (32 words) | `ctest`: dev 2/2 passed, release 2/2 passed, 0 failed, 0 capability skips, 0 timeouts. All 48 dispatches (24 per preset) reported `debug_errors=0 debug_warnings=0`. **Not covered** - Debug layer off: `offscreen_check` has no switch for it. It enables the layer whenever SDK layers are present, so I did not run that variant. - Intra-wave 31/32 ballot-word boundary: the RTX 3060 reports 32 lanes, so this boundary still needs a 64-lane adapter. The 31/32 mask-bit boundary is exercised across the two 32-lane waves. - The fixture's own path is `cs_6_0` for both bridge and direct. No separate SM 6.6 compaction path exists on current `main`. **Conclusion:** Ampere (RTX 3060) runs at width 32 and matches the width-aware CPU reference in all 328 words, for both masks and both shader paths, in dev and release, with the debug layer on. Same-machine WARP matches at width 4. _AI-assisted._
R0Y00 commented 2026-11-24 06:49:16 +00:00 (Migrated from github.com)
Author
Contributor

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


Thanks. This Ampere result extends the public baseline to RTX 3060 width 32 and same-machine in-box WARP width 4, with both paths matching all 328 words. The mismatch at word 65 for the ballot mutation and 257 for the write-index mutation help distinguish those two failure modes.

The remaining public control is a width-64 run that crosses bit 31 to 32 within one wave. The original replay still needs its own observed width and the first differing ballot, rank or payload at that width. The two sets of evidence can be reported separately.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7107039121 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7107039121). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T16:22:37Z. --- Thanks. This Ampere result extends the public baseline to RTX 3060 width 32 and same-machine in-box WARP width 4, with both paths matching all 328 words. The mismatch at word 65 for the ballot mutation and 257 for the write-index mutation help distinguish those two failure modes. The remaining public control is a width-64 run that crosses bit 31 to 32 within one wave. The original replay still needs its own observed width and the first differing ballot, rank or payload at that width. The two sets of evidence can be reported separately.
lantiumBot commented 2026-11-24 06:49:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lantiumBot on 2026-11-23T19:27:45Z.


Width-64 run of the public compaction fixture (tests/spirv_window/compaction.*), unmodified tree: AMD Radeon RX 9060 XT observed one 64-lane wave, so the 31/32 ballot boundary is crossed inside a single wave. Data only, no fixture change. The original replay was not run; it needs data that is not public.

Results (each cell covers dev and release, which gave the same lines)

Adapter Observed width Mask Bridge (cs_6_0) Direct HLSL (cs_6_0) Repeat Bridge = direct
RX 9060 XT 64 (1 wave) mask_a 328/328 328/328 identical yes
RX 9060 XT 64 (1 wave) mask_b 328/328 328/328 identical yes
In-box WARP 4 (16 waves) mask_a 328/328 328/328 identical yes
In-box WARP 4 (16 waves) mask_b 328/328 328/328 identical yes

mask_a is (0x84218421, 0x18421842): bit 31 set, bit 32 clear. mask_b is (0x28421842, 0x84218421): bit 31 clear, bit 32 set. With width=64 waves=1 both ballot words belong to the same wave, and the width-aware CPU reference matched in all 328 words for both masks, including ballot, first, last, rank and the compacted payload.

Negative controls, both masks, both presets

Each matched its mutated reference exactly and diverged from the original reference at the predicted word.

Adapter ballot_bit first mismatch write_index first mismatch
RX 9060 XT 65 (36 words) 257 (17 words)
In-box WARP 65 (80 words) 257 (32 words)

On the Radeon the ballot mutation shows up in both ballot words of the single wave (words 65 and 66), for example with mask_a: word 65 cpu=84218421 gpu=48124812, word 66 cpu=18421842 gpu=24812481.

ctest: dev 2/2 passed, release 2/2 passed, 0 failed, 0 capability skips, 0 timeouts.

Environment

  • Commit: 0f0c3eb1f50f227ddc154ab7e081839628ff89b3, clean tree
  • Adapter: AMD Radeon RX 9060 XT (vendor=1002 device=7590), driver 32.0.32029.2010; the GPU check at this commit reports native lane range 32..64
  • WARP: Microsoft Basic Render Driver (1414:008c), in-box, driver 10.0.26100.10068
  • Windows build: 26300.10075
  • D3D12 debug layer: unavailable on every dispatch
  • MSVC 19.52.37029.0, Windows SDK 10.0.26100.0, DXC 1.9.2602.17 (21d28f727)
  • SPIR-V tools: repository-pinned SPIRV-Tools 262bdab, SPIRV-Headers b824a46, patched SPIRV-Cross 57e4efc, built with tools/setup-spirv-tools.ps1
.\tools\dev.ps1
.\tools\setup-spirv-tools.ps1
$env:X2W_REQUIRE_SPIRV_TOOLS = '1'
foreach ($preset in @('dev', 'release')) {
    cmake --preset $preset -DSPIRV_WINDOW_AS=<bin>/spirv-as.exe -DSPIRV_WINDOW_VAL=<bin>/spirv-val.exe -DSPIRV_WINDOW_CROSS=<bin>/spirv-cross.exe
    cmake --build --preset $preset --target offscreen_check
    ctest --preset $preset --no-tests=error -V -R '^spirv_compaction_(hardware|warp)$'
}

Not covered

  • Debug layer on: it is unavailable on this machine.
  • The fixture runs at cs_6_0, where the driver chose 64 lanes. A 32-lane run on this adapter was not attempted, so only the 64-lane layout is measured here.
  • One run per preset, one driver.
  • The original replay: its observed width and first differing ballot, rank or payload remain open.

AI-assisted (Claude Code - Fable 5.2 Medium); runs executed locally on the adapter above.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7111639090 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7111639090). Originally posted by [lantiumBot](https://github.com/lantiumBot) on 2026-11-23T19:27:45Z. --- Width-64 run of the public compaction fixture (`tests/spirv_window/compaction.*`), unmodified tree: AMD Radeon RX 9060 XT observed one 64-lane wave, so the 31/32 ballot boundary is crossed inside a single wave. Data only, no fixture change. The original replay was not run; it needs data that is not public. ### Results (each cell covers `dev` and `release`, which gave the same lines) | Adapter | Observed width | Mask | Bridge (cs_6_0) | Direct HLSL (cs_6_0) | Repeat | Bridge = direct | |---|---|---|---|---|---|---| | RX 9060 XT | 64 (1 wave) | mask_a | 328/328 | 328/328 | identical | yes | | RX 9060 XT | 64 (1 wave) | mask_b | 328/328 | 328/328 | identical | yes | | In-box WARP | 4 (16 waves) | mask_a | 328/328 | 328/328 | identical | yes | | In-box WARP | 4 (16 waves) | mask_b | 328/328 | 328/328 | identical | yes | `mask_a` is `(0x84218421, 0x18421842)`: bit 31 set, bit 32 clear. `mask_b` is `(0x28421842, 0x84218421)`: bit 31 clear, bit 32 set. With `width=64 waves=1` both ballot words belong to the same wave, and the width-aware CPU reference matched in all 328 words for both masks, including ballot, first, last, rank and the compacted payload. ### Negative controls, both masks, both presets Each matched its mutated reference exactly and diverged from the original reference at the predicted word. | Adapter | ballot_bit first mismatch | write_index first mismatch | |---|---|---| | RX 9060 XT | 65 (36 words) | 257 (17 words) | | In-box WARP | 65 (80 words) | 257 (32 words) | On the Radeon the ballot mutation shows up in both ballot words of the single wave (words 65 and 66), for example with mask_a: word 65 `cpu=84218421 gpu=48124812`, word 66 `cpu=18421842 gpu=24812481`. ctest: `dev` 2/2 passed, `release` 2/2 passed, 0 failed, 0 capability skips, 0 timeouts. ### Environment - Commit: `0f0c3eb1f50f227ddc154ab7e081839628ff89b3`, clean tree - Adapter: AMD Radeon RX 9060 XT (vendor=1002 device=7590), driver 32.0.32029.2010; the GPU check at this commit reports native lane range 32..64 - WARP: Microsoft Basic Render Driver (1414:008c), in-box, driver 10.0.26100.10068 - Windows build: 26300.10075 - D3D12 debug layer: unavailable on every dispatch - MSVC 19.52.37029.0, Windows SDK 10.0.26100.0, DXC 1.9.2602.17 (21d28f727) - SPIR-V tools: repository-pinned SPIRV-Tools `262bdab`, SPIRV-Headers `b824a46`, patched SPIRV-Cross `57e4efc`, built with `tools/setup-spirv-tools.ps1` ```powershell .\tools\dev.ps1 .\tools\setup-spirv-tools.ps1 $env:X2W_REQUIRE_SPIRV_TOOLS = '1' foreach ($preset in @('dev', 'release')) { cmake --preset $preset -DSPIRV_WINDOW_AS=<bin>/spirv-as.exe -DSPIRV_WINDOW_VAL=<bin>/spirv-val.exe -DSPIRV_WINDOW_CROSS=<bin>/spirv-cross.exe cmake --build --preset $preset --target offscreen_check ctest --preset $preset --no-tests=error -V -R '^spirv_compaction_(hardware|warp)$' } ``` ### Not covered - Debug layer on: it is unavailable on this machine. - The fixture runs at cs_6_0, where the driver chose 64 lanes. A 32-lane run on this adapter was not attempted, so only the 64-lane layout is measured here. - One run per preset, one driver. - The original replay: its observed width and first differing ballot, rank or payload remain open. AI-assisted (Claude Code - Fable 5.2 Medium); runs executed locally on the adapter above.
R0Y00 commented 2026-11-24 06:49:33 +00:00 (Migrated from github.com)
Author
Contributor

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


Thanks for the width-64 run. The RX 9060 XT exercised bits 31 and 32 in a single wave in both directions. Both masks matched the CPU reference for all 328 words, and the two controls separated ballot errors (word 65) from write-index errors (word 257). This completes the remaining public width-64 control alongside the width-32 RTX and width-4 WARP reports. Keep the original replay open for its observed width and first differing ballot, rank, or payload. We can compare those summaries without sharing the original input.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7111701365 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7111701365). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T19:30:22Z. --- Thanks for the width-64 run. The RX 9060 XT exercised bits 31 and 32 in a single wave in both directions. Both masks matched the CPU reference for all 328 words, and the two controls separated ballot errors (word 65) from write-index errors (word 257). This completes the remaining public width-64 control alongside the width-32 RTX and width-4 WARP reports. Keep the original replay open for its observed width and first differing ballot, rank, or payload. We can compare those summaries without sharing the original input.
ChazY11 commented 2026-11-24 06:50:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T01:13:34Z.


Independent test on a third adapter: the fixture passes on WARP and RTX 5080, and fails on Intel Arc 140T

Claiming as an independent tester, not as the fixture author: spirv_compaction_warp and
spirv_compaction_hardware already exist (refs #656, #763), and the ask in the issue is to run them on another
backend. I ran them on a hybrid laptop where the discrete and integrated adapters sit on the same Windows install, so
the comparison costs one environment.

Results

Build: source 110e186 (working tree 24d5a0c, docs-only diff), dev preset, -DSPIRV_WINDOW_AS/VAL/CROSS pointed at
tools/setup-spirv-tools.ps1 output.
Tools: SPIRV-Tools v2025.5 262bdab4, SPIRV-Cross 57e4efc+ with the MinLod patch, DXC 1.8.2502.11
(dxcompiler.dll from SDK 10.0.26100), MSVC 14.44.35207, Python 3.12.10.
OS: Windows 11 build 26300.9974, debug layer enabled in every run (debug_errors=0 debug_warnings=0).

adapter driver spirv_ballot_extract spirv_compaction bridge width direct width repeat of an identical dispatch
Microsoft Basic Render Driver (WARP) 10.0.26100.9818 pass pass 4, 16 waves 4 identical
NVIDIA RTX 5080 Laptop (10de:2c59) 32.0.15.8142 pass pass 32, 2 waves, 328/328 words, 0 mismatches 32, 0 mismatches identical
Intel Arc 140T (8086:7d51) 32.0.101.8132 pass FAIL 32, 2 waves, 328/328, 0 mismatches 16, 4 waves, 0 mismatches changed

Exact command, per adapter:

$env:XBOX2WINDOWS_ADAPTER = 'Intel'      # or 'NVIDIA'; unset for WARP
ctest --preset dev --no-tests=error -R '^spirv_compaction_(warp|hardware)$' -V

What fails on the Arc, exactly

The bridge path matches the CPU reference (mismatches=0 over 328 words, repeat identical). The direct desktop-HLSL
control
then reports a different observed width and a readback that is not stable between two identical dispatches:

source=bridge adapter=hardware mask=mask_a width=32 waves=2 compared=328 mismatches=0
source=bridge adapter=hardware mask=mask_a repeat=identical
source=direct adapter=hardware mask=mask_a width=16 waves=4 compared=328 mismatches=0
RuntimeError: direct readback changed between identical dispatches
  File "tests\spirv_window\compaction.py", line 271, in main

Two things are worth separating, and I am not claiming a cause for either:

  1. The two paths disagree on the width on this adapter (bridge 32, direct 16) on the same dispatch and the same
    mask, while RTX reports 32/32 and WARP 4/4. The fixture recomputes its CPU reference from the observed width, so
    the width difference alone does not fail it — but it does mean the Arc answers subgroup size differently for a
    SPIR-V-compiled module and a DXC-compiled one.
  2. The direct control is not reproducible on this adapter: same program, same inputs, two dispatches, different
    readback. That is the failure the test reports, and it is the one I cannot explain from the fixture side.

Repetition: spirv_compaction_hardware gave FAIL, FAIL, FAIL on the Arc and PASS, PASS, PASS on the RTX 5080,
so it is adapter-specific and stable on each adapter, not a flake in the harness. The 31/32 lane boundary that the two
masks exercise (mask_a sets bit 31 and clears 32, mask_b the reverse) is inside the 16-lane waves the direct path
reports, so those lanes were exercised, not skipped.

A third fixture fails on the same adapter and may or may not share the cause:
spirv_sampler_views_hardware → Split sampler readback mismatch (RTX and WARP pass). I will file it separately
unless you would rather keep it in this thread.

What I need to continue

  1. Is a 32/16 split between the bridge and direct paths on one adapter expected (a documented per-path width
    preference), or is it itself the defect?
  2. For the non-deterministic direct readback, which intermediate would you want captured first — the observed lane
    index/width words, the ballot, or the compacted slots? compaction.py already writes each to its own word, so I can
    dump the raw 328 words for both dispatches and put the diff in this thread.
  3. If the answer is "record it and move on", say what evidence form you accept for a non-deterministic readback, since
    the fixture currently raises rather than printing the two dumps.

I can run any follow-up on the same machine and paste the full log; I have no AMD adapter, so native 64-wide
subgroups remain uncovered here.

No game files, dumps or distribution links are involved: every input is generated by the repository's own fixture.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7118886927 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7118886927). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T01:13:34Z. --- ## Independent test on a third adapter: the fixture passes on WARP and RTX 5080, and fails on Intel Arc 140T Claiming as an **independent tester**, not as the fixture author: `spirv_compaction_warp` and `spirv_compaction_hardware` already exist (refs #656, #763), and the ask in the issue is to run them on another backend. I ran them on a hybrid laptop where the discrete and integrated adapters sit on the same Windows install, so the comparison costs one environment. ### Results Build: source `110e186` (working tree `24d5a0c`, docs-only diff), `dev` preset, `-DSPIRV_WINDOW_AS/VAL/CROSS` pointed at `tools/setup-spirv-tools.ps1` output. Tools: SPIRV-Tools v2025.5 `262bdab4`, SPIRV-Cross `57e4efc+` with the MinLod patch, DXC 1.8.2502.11 (`dxcompiler.dll` from SDK 10.0.26100), MSVC 14.44.35207, Python 3.12.10. OS: Windows 11 build 26300.9974, debug layer enabled in every run (`debug_errors=0 debug_warnings=0`). | adapter | driver | `spirv_ballot_extract` | `spirv_compaction` | bridge width | direct width | repeat of an identical dispatch | |---|---|---|---|---|---|---| | Microsoft Basic Render Driver (WARP) | 10.0.26100.9818 | pass | **pass** | 4, 16 waves | 4 | identical | | NVIDIA RTX 5080 Laptop (10de:2c59) | 32.0.15.8142 | pass | **pass** | 32, 2 waves, 328/328 words, 0 mismatches | 32, 0 mismatches | identical | | Intel Arc 140T (8086:7d51) | 32.0.101.8132 | pass | **FAIL** | 32, 2 waves, 328/328, 0 mismatches | **16, 4 waves**, 0 mismatches | **changed** | Exact command, per adapter: ```powershell $env:XBOX2WINDOWS_ADAPTER = 'Intel' # or 'NVIDIA'; unset for WARP ctest --preset dev --no-tests=error -R '^spirv_compaction_(warp|hardware)$' -V ``` ### What fails on the Arc, exactly The bridge path matches the CPU reference (`mismatches=0` over 328 words, repeat identical). The **direct desktop-HLSL control** then reports a different observed width and a readback that is not stable between two identical dispatches: ```text source=bridge adapter=hardware mask=mask_a width=32 waves=2 compared=328 mismatches=0 source=bridge adapter=hardware mask=mask_a repeat=identical source=direct adapter=hardware mask=mask_a width=16 waves=4 compared=328 mismatches=0 RuntimeError: direct readback changed between identical dispatches File "tests\spirv_window\compaction.py", line 271, in main ``` Two things are worth separating, and I am not claiming a cause for either: 1. **The two paths disagree on the width on this adapter** (bridge 32, direct 16) on the same dispatch and the same mask, while RTX reports 32/32 and WARP 4/4. The fixture recomputes its CPU reference from the observed width, so the width difference alone does not fail it — but it does mean the Arc answers `subgroup size` differently for a SPIR-V-compiled module and a DXC-compiled one. 2. **The direct control is not reproducible on this adapter**: same program, same inputs, two dispatches, different readback. That is the failure the test reports, and it is the one I cannot explain from the fixture side. Repetition: `spirv_compaction_hardware` gave **FAIL, FAIL, FAIL** on the Arc and **PASS, PASS, PASS** on the RTX 5080, so it is adapter-specific and stable on each adapter, not a flake in the harness. The 31/32 lane boundary that the two masks exercise (`mask_a` sets bit 31 and clears 32, `mask_b` the reverse) is inside the 16-lane waves the direct path reports, so those lanes were exercised, not skipped. A third fixture fails on the same adapter and may or may not share the cause: `spirv_sampler_views_hardware` → `Split sampler readback mismatch` (RTX and WARP pass). I will file it separately unless you would rather keep it in this thread. ### What I need to continue 1. Is a 32/16 split between the bridge and direct paths on one adapter expected (a documented per-path width preference), or is it itself the defect? 2. For the non-deterministic direct readback, which intermediate would you want captured first — the observed lane index/width words, the ballot, or the compacted slots? `compaction.py` already writes each to its own word, so I can dump the raw 328 words for both dispatches and put the diff in this thread. 3. If the answer is "record it and move on", say what evidence form you accept for a non-deterministic readback, since the fixture currently raises rather than printing the two dumps. I can run any follow-up on the same machine and paste the full log; I have no AMD adapter, so native 64-wide subgroups remain uncovered here. No game files, dumps or distribution links are involved: every input is generated by the repository's own fixture.
ChazY11 commented 2026-11-24 06:50:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T01:43:27Z.


The first dispatch of a freshly compiled module reports 16 lanes on this adapter; later dispatches report 32

I went after the "direct readback changed between identical dispatches" half of the Arc result, because the fixture
derives its CPU reference from the width the shader reports. A minimal probe — one group of 64 threads, no descriptors
in the data path, four words per thread — pins the intermediate that moves.

RWByteAddressBuffer results : register(u0);
static const uint MASK_LO = 0x84218421u;

[numthreads(64, 1, 1)]
void main(uint3 tid : SV_DispatchThreadID, uint local : SV_GroupIndex)
{
    const uint lane = WaveGetLaneIndex();
    const uint width = WaveGetLaneCount();
    const bool active = ((MASK_LO >> lane) & 1u) != 0u;
    const uint rank = WavePrefixCountBits(active);
    const uint ballot = WaveActiveBallot(active).x;
    const uint base = local * 16u;
    results.Store(base + 0u, lane);
    results.Store(base + 4u, width);
    results.Store(base + 8u, rank);
    results.Store(base + 12u, ballot);
}

Run through the repository's own raw dump helper, which fills unwritten words with a known pattern, so the comparison
is word for word:

$env:XBOX2WINDOWS_ADAPTER = 'Intel'
offscreen_check hardware --raw-uav-dump wave_probe.dxil 1 1024 run1.bin
offscreen_check hardware --raw-uav-dump wave_probe.dxil 1 1024 run2.bin

Two consecutive runs of the same module on the Intel Arc 140T (8086:7d51, driver 32.0.101.8132, Windows 11 build
26300.9974, DXC 1.8.2502.11, debug layer enabled, debug_errors=0 debug_warnings=0):

word  1 (thread 0, field 1)  run1=16          run2=32
word  3 (thread 0, field 3)  run1=0x00008421  run2=0x84218421
... 192 of 256 words differ, all of them fields 1 and 3

Field 1 is WaveGetLaneCount, field 3 is the low ballot word. Each ballot is correct for the width the shader
reported in that run
(16 lanes give 0x8421, 32 lanes give 0x84218421), so this is not a wrong ballot: the width
itself moved.

When 16 appears

Four separately compiled modules — the probe above plus three copies whose only difference is an unused mask
constant, which changes the bytecode and therefore the driver's cache key:

module first dispatch every later dispatch
probe 16 32
variant 1 32 32
variant 2 16 32
variant 3 16 32

Afterwards, 5 runs per module (each a fresh process): 32 in all 15. The RTX 5080 Laptop reported 32 on every run of
every module, and WARP reported 4, so only this adapter moves.

So the pattern is: the first dispatch of a module the driver has not compiled before often reports 16 lanes, and the
same module reports 32 from the second dispatch on.
I have not determined what makes variant 1 start at 32; 3 of 4
fresh modules started at 16.

Why this matches the fixture's symptom

The compaction fixture dispatches the direct module once, computes the CPU reference from the width that dispatch
reported, then dispatches it again and compares. If the first dispatch reports 16 and the repeat reports 32, the two
readbacks differ in exactly the words that depend on the width (the compacted slots and their ranks), and the fixture
reports direct readback changed between identical dispatches. That is also the shape of the width variance in the
standalone GPU check report (#1) on this adapter, and of the bridge width=32 / direct width=16 split I reported
earlier in this issue: the two shader sources are different modules, so they can land on different cache states.

What I would suggest, and what I need

  1. Recording the observed width in the fixture's output for every dispatch (not once per path) would make this
    visible instead of a mystery, and a width change between the two dispatches of a pair could be reported as a named
    skip rather than a mismatch — the device is not producing a different result for the same wave, it is producing a
    different wave.
  2. If you want the probe in the repository, it is one HLSL file plus one CTest entry over --raw-uav-dump; I can send
    that as its own PR under tests/spirv_window/. I have not added it without your word.

This is measurement only: no fixture, expectation or build change was made, and the Arc result still stands as a
failure. The clamp-rounding report stays in #809, as you asked.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7119383808 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7119383808). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T01:43:27Z. --- ## The first dispatch of a freshly compiled module reports 16 lanes on this adapter; later dispatches report 32 I went after the "direct readback changed between identical dispatches" half of the Arc result, because the fixture derives its CPU reference from the width the shader reports. A minimal probe — one group of 64 threads, no descriptors in the data path, four words per thread — pins the intermediate that moves. ```hlsl RWByteAddressBuffer results : register(u0); static const uint MASK_LO = 0x84218421u; [numthreads(64, 1, 1)] void main(uint3 tid : SV_DispatchThreadID, uint local : SV_GroupIndex) { const uint lane = WaveGetLaneIndex(); const uint width = WaveGetLaneCount(); const bool active = ((MASK_LO >> lane) & 1u) != 0u; const uint rank = WavePrefixCountBits(active); const uint ballot = WaveActiveBallot(active).x; const uint base = local * 16u; results.Store(base + 0u, lane); results.Store(base + 4u, width); results.Store(base + 8u, rank); results.Store(base + 12u, ballot); } ``` Run through the repository's own raw dump helper, which fills unwritten words with a known pattern, so the comparison is word for word: ```powershell $env:XBOX2WINDOWS_ADAPTER = 'Intel' offscreen_check hardware --raw-uav-dump wave_probe.dxil 1 1024 run1.bin offscreen_check hardware --raw-uav-dump wave_probe.dxil 1 1024 run2.bin ``` Two consecutive runs of the same module on the Intel Arc 140T (8086:7d51, driver 32.0.101.8132, Windows 11 build 26300.9974, DXC 1.8.2502.11, debug layer enabled, `debug_errors=0 debug_warnings=0`): ```text word 1 (thread 0, field 1) run1=16 run2=32 word 3 (thread 0, field 3) run1=0x00008421 run2=0x84218421 ... 192 of 256 words differ, all of them fields 1 and 3 ``` Field 1 is `WaveGetLaneCount`, field 3 is the low ballot word. Each ballot is correct **for the width the shader reported in that run** (16 lanes give `0x8421`, 32 lanes give `0x84218421`), so this is not a wrong ballot: the width itself moved. ### When 16 appears Four separately compiled modules — the probe above plus three copies whose only difference is an unused mask constant, which changes the bytecode and therefore the driver's cache key: | module | first dispatch | every later dispatch | |---|---|---| | probe | 16 | 32 | | variant 1 | 32 | 32 | | variant 2 | 16 | 32 | | variant 3 | 16 | 32 | Afterwards, 5 runs per module (each a fresh process): 32 in all 15. The RTX 5080 Laptop reported 32 on every run of every module, and WARP reported 4, so only this adapter moves. So the pattern is: **the first dispatch of a module the driver has not compiled before often reports 16 lanes, and the same module reports 32 from the second dispatch on.** I have not determined what makes variant 1 start at 32; 3 of 4 fresh modules started at 16. ### Why this matches the fixture's symptom The compaction fixture dispatches the direct module once, computes the CPU reference from the width that dispatch reported, then dispatches it again and compares. If the first dispatch reports 16 and the repeat reports 32, the two readbacks differ in exactly the words that depend on the width (the compacted slots and their ranks), and the fixture reports `direct readback changed between identical dispatches`. That is also the shape of the width variance in the standalone GPU check report (#1) on this adapter, and of the `bridge width=32 / direct width=16` split I reported earlier in this issue: the two shader sources are different modules, so they can land on different cache states. ### What I would suggest, and what I need 1. Recording the observed width in the fixture's output for **every** dispatch (not once per path) would make this visible instead of a mystery, and a width change between the two dispatches of a pair could be reported as a named skip rather than a mismatch — the device is not producing a different result for the same wave, it is producing a different wave. 2. If you want the probe in the repository, it is one HLSL file plus one CTest entry over `--raw-uav-dump`; I can send that as its own PR under `tests/spirv_window/`. I have not added it without your word. This is measurement only: no fixture, expectation or build change was made, and the Arc result still stands as a failure. The clamp-rounding report stays in #809, as you asked.
ChazY11 commented 2026-11-24 06:50:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T01:53:57Z.


Both deterministic masks on this adapter: 328/328 words, all four controls caught — with one anomalous attempt worth recording

The fixture stops on this adapter before the second mask, so I isolated the bridge path and reused the fixture's own
emit_bridge, run, reference, check_source and run_control, so these numbers are the ones the test prints.
Three consecutive full runs, same commit and tools, debug layer enabled, zero debug warnings and errors:

adapter mask_a mask_b controls
Intel Arc 140T (32.0.101.8132) 328 compared, 0 mismatches 328 compared, 0 mismatches ballot_bit → word 65, write_index → word 257, all caught, both masks
NVIDIA RTX 5080 Laptop (32.0.15.8142) 328 compared, 0 mismatches 328 compared, 0 mismatches same, all caught
WARP (10.0.26100.9818) 328 compared, 0 mismatches 328 compared, 0 mismatches same, all caught

width=32 waves=2 on the two adapters and width=4 waves=16 on WARP. So the acceptance item "two deterministic
masks on WARP and one capable physical adapter, compare all intermediate words" is satisfied for this adapter as far
as the ballot, first/last lane, rank, selected lane and compacted payload arithmetic go — including the 31/32 mask-bit
boundary, which the two masks place on either side of a wave split.

The one anomalous attempt

The very first attempt of this same driver, on the Arc, failed inside the mask_b write_index control with:

mismatch word=19 field=lane cpu=00000013 gpu=00000003
mismatch word=20 field=lane cpu=00000014 gpu=00000004
RuntimeError: negative control write_index differs from its mutated reference at word 16

That is the control's mutated readback disagreeing with its mutated reference at a lane index, not at a
compacted slot: the reference expects lane 19 where the GPU wrote 3, i.e. the low lane bits only. Three reruns of the
identical command then passed every mask and every control.

This is the same shape as the repeat failure and as my width probe (first dispatch of a freshly compiled module
reports 16 lanes, later dispatches report 32): a module compiled in that run produced a different lane mapping, and
because the control builds a fresh module too, it can hit the same window. I am recording the rate I observed — 1
failure in 4 attempts of this driver, with 3 clean reruns — rather than claiming it is fixed or deterministic.

What would make it falsifiable

Recording the observed width per dispatch (four numbers per run: width and lane range per label) would show this
directly instead of as a lane-word mismatch, and a run where two dispatches of one module disagree on width could be
reported as a named skip. That is the change I offered earlier; the current Arc result still stands as a failure, and
I have not altered any fixture or expectation.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7119560070 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7119560070). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T01:53:57Z. --- ## Both deterministic masks on this adapter: 328/328 words, all four controls caught — with one anomalous attempt worth recording The fixture stops on this adapter before the second mask, so I isolated the bridge path and reused the fixture's own `emit_bridge`, `run`, `reference`, `check_source` and `run_control`, so these numbers are the ones the test prints. Three consecutive full runs, same commit and tools, debug layer enabled, zero debug warnings and errors: | adapter | mask_a | mask_b | controls | |---|---|---|---| | Intel Arc 140T (32.0.101.8132) | 328 compared, 0 mismatches | 328 compared, 0 mismatches | ballot_bit → word 65, write_index → word 257, all caught, both masks | | NVIDIA RTX 5080 Laptop (32.0.15.8142) | 328 compared, 0 mismatches | 328 compared, 0 mismatches | same, all caught | | WARP (10.0.26100.9818) | 328 compared, 0 mismatches | 328 compared, 0 mismatches | same, all caught | `width=32 waves=2` on the two adapters and `width=4 waves=16` on WARP. So the acceptance item "two deterministic masks on WARP and one capable physical adapter, compare all intermediate words" is satisfied for this adapter as far as the ballot, first/last lane, rank, selected lane and compacted payload arithmetic go — including the 31/32 mask-bit boundary, which the two masks place on either side of a wave split. ### The one anomalous attempt The very first attempt of this same driver, on the Arc, failed inside the mask_b `write_index` control with: ```text mismatch word=19 field=lane cpu=00000013 gpu=00000003 mismatch word=20 field=lane cpu=00000014 gpu=00000004 RuntimeError: negative control write_index differs from its mutated reference at word 16 ``` That is the control's *mutated* readback disagreeing with its mutated reference at a **lane index**, not at a compacted slot: the reference expects lane 19 where the GPU wrote 3, i.e. the low lane bits only. Three reruns of the identical command then passed every mask and every control. This is the same shape as the repeat failure and as my width probe (first dispatch of a freshly compiled module reports 16 lanes, later dispatches report 32): a module compiled in that run produced a different lane mapping, and because the control builds a fresh module too, it can hit the same window. I am recording the rate I observed — 1 failure in 4 attempts of this driver, with 3 clean reruns — rather than claiming it is fixed or deterministic. ### What would make it falsifiable Recording the observed width per dispatch (four numbers per run: width and lane range per label) would show this directly instead of as a lane-word mismatch, and a run where two dispatches of one module disagree on width could be reported as a named skip. That is the change I offered earlier; the current Arc result still stands as a failure, and I have not altered any fixture or expectation.
archielcqp-a11y commented 2026-11-24 09:04:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by archielcqp-a11y on 2026-11-24T08:37:38Z.


Forced width-64 run of the public compaction fixture on app-local WARP 1.0.22. Data only, no fixture change. The original replay was not run; it needs data that is not public.

The fixture source is unchanged. A local wrapper ran tests/spirv_window/compaction.py with every DXC input copied to a temp file with [WaveSize(64)] inserted before [numthreads(64, 1, 1)], so WARP ran one 64-lane wave and bits 31 and 32 of the ballot fall inside that wave. Both the SPIR-V bridge HLSL and the direct HLSL went through the same insertion.

Results

Adapter Observed width Mask Bridge Direct HLSL Repeat Bridge = direct Ballot-bit control Write-index control
WARP 1.0.22, forced 64 64 (1 wave) mask_a 328/328 328/328 identical yes first mismatch 65 (predicted 65), 36 words first mismatch 257 (predicted 257), 17 words
WARP 1.0.22, forced 64 64 (1 wave) mask_b 328/328 328/328 identical yes first mismatch 65 (predicted 65), 36 words first mismatch 257 (predicted 257), 17 words

Unforced on the same machine, spirv_compaction_warp (WARP 1.0.22, width 8) and spirv_compaction_hardware (RTX 3080, width 32) pass. Forcing width 64 on the RTX 3080 is not possible: pipeline creation returns E_INVALIDARG (0x80070057), consistent with its 32..32 lane range.

Relation to #145

On this same WARP 1.0.22 at forced width 64, wave_shuffle_warp still misroutes 64 of 64 affine WaveReadLaneAt reads. Here, ballot, per-lane rank, first/last active lane and the compacted writeback are all correct at that width. So the WARP 1.0.22 forced-wave64 defect is not in ballot or subgroup bookkeeping; it is limited to lane reads whose source lies in another 8-lane block.

Environment

  • Commit d2ac41559f99fddbb5f42858776df7377f8bcc1c; the working tree had unrelated local changes, none in tests/spirv_window/compaction.*
  • Windows 10 build 19045.6466
  • WARP 1.0.22.0 (Microsoft.Direct3D.WARP 1.0.22) with Agility SDK 1.620.2, configured with OFFSCREEN_AGILITY_620_DIR and OFFSCREEN_WARP_DIR
  • NVIDIA GeForce RTX 3080 (10de:2216), driver 32.0.15.9174
  • Debug layer: enabled
  • MSVC 19.44.35230, DXC 1.9.2602.17 (Windows SDK 10.0.26100), SPIRV-Tools v2025.5 (262bdab4), SPIRV-Cross 57e4efc with the pinned MinLod patch (tools/setup-spirv-tools.ps1)

This report was prepared with AI assistance.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7126364606 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7126364606). Originally posted by [archielcqp-a11y](https://github.com/archielcqp-a11y) on 2026-11-24T08:37:38Z. --- Forced width-64 run of the public compaction fixture on app-local WARP 1.0.22. Data only, no fixture change. The original replay was not run; it needs data that is not public. The fixture source is unchanged. A local wrapper ran `tests/spirv_window/compaction.py` with every DXC input copied to a temp file with `[WaveSize(64)]` inserted before `[numthreads(64, 1, 1)]`, so WARP ran one 64-lane wave and bits 31 and 32 of the ballot fall inside that wave. Both the SPIR-V bridge HLSL and the direct HLSL went through the same insertion. ### Results | Adapter | Observed width | Mask | Bridge | Direct HLSL | Repeat | Bridge = direct | Ballot-bit control | Write-index control | |---|---|---|---|---|---|---|---|---| | WARP 1.0.22, forced 64 | 64 (1 wave) | mask_a | 328/328 | 328/328 | identical | yes | first mismatch 65 (predicted 65), 36 words | first mismatch 257 (predicted 257), 17 words | | WARP 1.0.22, forced 64 | 64 (1 wave) | mask_b | 328/328 | 328/328 | identical | yes | first mismatch 65 (predicted 65), 36 words | first mismatch 257 (predicted 257), 17 words | Unforced on the same machine, `spirv_compaction_warp` (WARP 1.0.22, width 8) and `spirv_compaction_hardware` (RTX 3080, width 32) pass. Forcing width 64 on the RTX 3080 is not possible: pipeline creation returns `E_INVALIDARG` (`0x80070057`), consistent with its 32..32 lane range. ### Relation to #145 On this same WARP 1.0.22 at forced width 64, `wave_shuffle_warp` still misroutes 64 of 64 affine `WaveReadLaneAt` reads. Here, ballot, per-lane rank, first/last active lane and the compacted writeback are all correct at that width. So the WARP 1.0.22 forced-wave64 defect is not in ballot or subgroup bookkeeping; it is limited to lane reads whose source lies in another 8-lane block. ### Environment - Commit `d2ac41559f99fddbb5f42858776df7377f8bcc1c`; the working tree had unrelated local changes, none in `tests/spirv_window/compaction.*` - Windows 10 build 19045.6466 - WARP 1.0.22.0 (Microsoft.Direct3D.WARP 1.0.22) with Agility SDK 1.620.2, configured with `OFFSCREEN_AGILITY_620_DIR` and `OFFSCREEN_WARP_DIR` - NVIDIA GeForce RTX 3080 (`10de:2216`), driver 32.0.15.9174 - Debug layer: enabled - MSVC 19.44.35230, DXC 1.9.2602.17 (Windows SDK 10.0.26100), SPIRV-Tools v2025.5 (`262bdab4`), SPIRV-Cross `57e4efc` with the pinned MinLod patch (`tools/setup-spirv-tools.ps1`) This report was prepared with AI assistance.
R0Y00 commented 2026-11-24 09:04:47 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T08:44:25Z.


Thanks for running both paths at forced width 64 and retaining the two mutation controls. This rules out a failure in the public compaction fixture on that WARP build. Please keep the independent WaveReadLaneAt result under #145, and keep the original mismatch open until a source-built variant reproduces it. If the original result can be shared as aggregate evidence, the useful comparison is the first divergent output word and whether it depends on a cross-block lane read.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7126502885 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7126502885). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T08:44:25Z. --- Thanks for running both paths at forced width 64 and retaining the two mutation controls. This rules out a failure in the public compaction fixture on that WARP build. Please keep the independent WaveReadLaneAt result under #145, and keep the original mismatch open until a source-built variant reproduces it. If the original result can be shared as aggregate evidence, the useful comparison is the first divergent output word and whether it depends on a cross-block lane read.
ChazY11 commented 2026-11-24 11:02:59 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T10:19:18Z.


Aggregate evidence: the first divergent word is a lane index, and it is not a cross-block read

Keeping the original mismatch open as you asked, and leaving the WaveReadLaneAt result to #145 — this is only the
comparison you named: first divergent output word, and whether it depends on a cross-block lane read.

Using the fixture's own direct module (compaction.emit_direct), six modules the driver had not compiled before,
each dispatched twice on the same adapter:

Intel Arc 140T, 8086:7d51, driver 32.0.101.8132, debug layer enabled, debug_errors=0 debug_warnings=0
  module 0: first width=16  second width=32  repeat_differing_words=106
  module 1: first width=16  second width=32  repeat_differing_words=105
  module 2: first width=16  second width=32  repeat_differing_words=106
  module 3: first width=16  second width=32  repeat_differing_words=105
  module 4: first width=16  second width=32  repeat_differing_words=106
  module 5: first width=16  second width=32  repeat_differing_words=105

  first_divergent_word=16 field=lane first=0x00000000 second=0x00000010
  lanes=32 rank=32 ballot=10

Word 16, field lane, 0x0 in the first dispatch and 0x10 in the second. Word 16 is thread 16's own
WaveGetLaneIndex, which is the first lane of the second wave. It reads 0 while the module runs at 16 lanes and 16
once it runs at 32. So the divergence does not depend on a cross-block lane read: no thread reads another block's
lane value. Each thread reports its own lane index, and the only thing that changed is how many lanes the wave has.
The 32 divergent lane words, 32 rank words and 10 ballot words are the downstream consequence: the second wave
restarts at lane 0, so its ranks and ballot words shift with it, and the compacted payloads follow.

The control is inside this result: re-running the identical six modules a second time gives first width=32, second width=32, repeat_differing_words=0, six times out of six. The flip needs bytecode the driver has not compiled before,
so the same bytes are stable once cached — which is why the public fixture usually passes on this adapter and why the
failure is intermittent rather than constant.

Reproduce on any adapter:

$env:XBOX2WINDOWS_ADAPTER = 'Intel'
python -B out/probe/fresh_width.py <spirv-as> <spirv-val> <spirv-cross> <dxc> <offscreen_check> hardware

The script only perturbs one mask bit per module so each run compiles new bytes; it does not assert anything and
writes nothing outside a temporary directory. The RTX 5080 Laptop on the same script reports first width=32 second width=32 for all six modules, so this is the adapter, not the module shape.

No fixture, expectation or skip behaviour changed by me here, and I have not touched #145.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7128616883 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7128616883). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T10:19:18Z. --- ## Aggregate evidence: the first divergent word is a lane index, and it is not a cross-block read Keeping the original mismatch open as you asked, and leaving the `WaveReadLaneAt` result to #145 — this is only the comparison you named: first divergent output word, and whether it depends on a cross-block lane read. Using the fixture's **own** direct module (`compaction.emit_direct`), six modules the driver had not compiled before, each dispatched twice on the same adapter: ```text Intel Arc 140T, 8086:7d51, driver 32.0.101.8132, debug layer enabled, debug_errors=0 debug_warnings=0 module 0: first width=16 second width=32 repeat_differing_words=106 module 1: first width=16 second width=32 repeat_differing_words=105 module 2: first width=16 second width=32 repeat_differing_words=106 module 3: first width=16 second width=32 repeat_differing_words=105 module 4: first width=16 second width=32 repeat_differing_words=106 module 5: first width=16 second width=32 repeat_differing_words=105 first_divergent_word=16 field=lane first=0x00000000 second=0x00000010 lanes=32 rank=32 ballot=10 ``` **Word 16, field `lane`, `0x0` in the first dispatch and `0x10` in the second.** Word 16 is thread 16's own `WaveGetLaneIndex`, which is the first lane of the second wave. It reads 0 while the module runs at 16 lanes and 16 once it runs at 32. So the divergence **does not depend on a cross-block lane read**: no thread reads another block's lane value. Each thread reports its own lane index, and the only thing that changed is how many lanes the wave has. The 32 divergent `lane` words, 32 `rank` words and 10 `ballot` words are the downstream consequence: the second wave restarts at lane 0, so its ranks and ballot words shift with it, and the compacted payloads follow. The control is inside this result: re-running the identical six modules a second time gives `first width=32, second width=32, repeat_differing_words=0`, six times out of six. The flip needs bytecode the driver has not compiled before, so the same bytes are stable once cached — which is why the public fixture usually passes on this adapter and why the failure is intermittent rather than constant. Reproduce on any adapter: ```powershell $env:XBOX2WINDOWS_ADAPTER = 'Intel' python -B out/probe/fresh_width.py <spirv-as> <spirv-val> <spirv-cross> <dxc> <offscreen_check> hardware ``` The script only perturbs one mask bit per module so each run compiles new bytes; it does not assert anything and writes nothing outside a temporary directory. The RTX 5080 Laptop on the same script reports `first width=32 second width=32` for all six modules, so this is the adapter, not the module shape. No fixture, expectation or skip behaviour changed by me here, and I have not touched #145.
ChazY11 commented 2026-11-24 11:03:00 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T10:31:24Z.


The reproduction I used, so you can run it without me

Since the original mismatch stays open until a source-built variant reproduces it, here is the exact probe behind my
last two comments. It is a script, not a fixture, and it only prints — no expectation is changed anywhere.

"""Dispatch a freshly compiled compaction module twice and report what moves.

Usage: fresh_width.py <spirv-as> <spirv-val> <spirv-cross> <dxc> <offscreen_check> <hardware|warp>
Place next to tests/spirv_window/ or adjust HERE.
"""
from pathlib import Path
import sys, tempfile, time
HERE = Path("tests/spirv_window").resolve()
sys.path.insert(0, str(HERE))
from compaction import (BALLOT, BALLOT_SLOTS, LANE, MASKS, RANK, WIDTH, WORD_COUNT,
                        emit_direct, field, run)

THREADS = 64

def main(asm, val, cross, dxc, renderer, adapter):
    tools = (asm, val, cross, dxc)
    base = MASKS["mask_a"]
    seed = int(time.time()) & 0xFFFF          # a new bytecode each run
    print(f"adapter={adapter} seed={seed}", flush=True)
    with tempfile.TemporaryDirectory() as tmp:
        for step in range(6):
            mask = (base[0] ^ ((seed + step) << 1), base[1] ^ (seed + step))
            dxil = emit_direct(Path(tmp), dxc, mask)
            code, first = run(renderer, adapter, dxil)
            code, second = run(renderer, adapter, dxil)
            differing = [i for i in range(WORD_COUNT) if first[i] != second[i]]
            if not differing:
                print(f"  module {step}: width {first[WIDTH]}->{second[WIDTH]} differing=0", flush=True)
                continue
            head = differing[0]
            print(f"  module {step}: width {first[WIDTH]}->{second[WIDTH]} "
                  f"differing={len(differing)} first_word={head} field={field(head)} "
                  f"first=0x{first[head]:08x} second=0x{second[head]:08x} "
                  f"lanes={sum(1 for i in differing if LANE <= i < LANE + THREADS)} "
                  f"rank={sum(1 for i in differing if RANK <= i < RANK + THREADS)} "
                  f"ballot={sum(1 for i in differing if BALLOT <= i < BALLOT + BALLOT_SLOTS)}",
                  flush=True)
    return 0

if __name__ == "__main__":
    sys.exit(main(*sys.argv[1:]))
$env:XBOX2WINDOWS_ADAPTER = 'Intel'
python -B fresh_width.py <spirv-as> <spirv-val> <spirv-cross> <dxc> out/build/dev/offscreen_check.exe hardware

Two things matter about the shape of it:

  • The seed matters. emit_direct output is byte-identical across runs for a fixed mask, so a second run of the
    same script re-uses modules the driver already compiled and reports differing=0 for all six. The seed perturbs one
    mask bit per module, which is what makes each module new to the driver. That is also the "control" I mentioned: same
    bytes, second dispatch, width 32, nothing moves.
  • It reuses your own module. emit_direct is the fixture's emitter, so this is the direct path's bytecode, not a
    synthetic shader; field() and run() are the fixture's own helpers, so the word indices match what the test
    prints.

On the Arc it reports six modules of width 16->32 with first_word=16 field=lane first=0x00000000 second=0x00000010, 32 lane words, 32 rank words and 10 ballot words differing. On the RTX 5080 Laptop all six report
width 32->32 differing=0.

If you want this to become a fixture that fails deterministically on an affected adapter, the change is in
compaction.py (per-dispatch width in the output, and a width change between the two dispatches reported as a named
skip instead of a mismatch); I have not touched it, and I will leave the probe here unless you say otherwise.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7128893379 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7128893379). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T10:31:24Z. --- ## The reproduction I used, so you can run it without me Since the original mismatch stays open until a source-built variant reproduces it, here is the exact probe behind my last two comments. It is a script, not a fixture, and it only prints — no expectation is changed anywhere. ```python """Dispatch a freshly compiled compaction module twice and report what moves. Usage: fresh_width.py <spirv-as> <spirv-val> <spirv-cross> <dxc> <offscreen_check> <hardware|warp> Place next to tests/spirv_window/ or adjust HERE. """ from pathlib import Path import sys, tempfile, time HERE = Path("tests/spirv_window").resolve() sys.path.insert(0, str(HERE)) from compaction import (BALLOT, BALLOT_SLOTS, LANE, MASKS, RANK, WIDTH, WORD_COUNT, emit_direct, field, run) THREADS = 64 def main(asm, val, cross, dxc, renderer, adapter): tools = (asm, val, cross, dxc) base = MASKS["mask_a"] seed = int(time.time()) & 0xFFFF # a new bytecode each run print(f"adapter={adapter} seed={seed}", flush=True) with tempfile.TemporaryDirectory() as tmp: for step in range(6): mask = (base[0] ^ ((seed + step) << 1), base[1] ^ (seed + step)) dxil = emit_direct(Path(tmp), dxc, mask) code, first = run(renderer, adapter, dxil) code, second = run(renderer, adapter, dxil) differing = [i for i in range(WORD_COUNT) if first[i] != second[i]] if not differing: print(f" module {step}: width {first[WIDTH]}->{second[WIDTH]} differing=0", flush=True) continue head = differing[0] print(f" module {step}: width {first[WIDTH]}->{second[WIDTH]} " f"differing={len(differing)} first_word={head} field={field(head)} " f"first=0x{first[head]:08x} second=0x{second[head]:08x} " f"lanes={sum(1 for i in differing if LANE <= i < LANE + THREADS)} " f"rank={sum(1 for i in differing if RANK <= i < RANK + THREADS)} " f"ballot={sum(1 for i in differing if BALLOT <= i < BALLOT + BALLOT_SLOTS)}", flush=True) return 0 if __name__ == "__main__": sys.exit(main(*sys.argv[1:])) ``` ```powershell $env:XBOX2WINDOWS_ADAPTER = 'Intel' python -B fresh_width.py <spirv-as> <spirv-val> <spirv-cross> <dxc> out/build/dev/offscreen_check.exe hardware ``` Two things matter about the shape of it: - **The seed matters.** `emit_direct` output is byte-identical across runs for a fixed mask, so a second run of the same script re-uses modules the driver already compiled and reports `differing=0` for all six. The seed perturbs one mask bit per module, which is what makes each module new to the driver. That is also the "control" I mentioned: same bytes, second dispatch, width 32, nothing moves. - **It reuses your own module.** `emit_direct` is the fixture's emitter, so this is the direct path's bytecode, not a synthetic shader; `field()` and `run()` are the fixture's own helpers, so the word indices match what the test prints. On the Arc it reports six modules of `width 16->32` with `first_word=16 field=lane first=0x00000000 second=0x00000010`, 32 lane words, 32 rank words and 10 ballot words differing. On the RTX 5080 Laptop all six report `width 32->32 differing=0`. If you want this to become a fixture that fails deterministically on an affected adapter, the change is in `compaction.py` (per-dispatch width in the output, and a width change between the two dispatches reported as a named skip instead of a mismatch); I have not touched it, and I will leave the probe here unless you say otherwise.
R0Y00 commented 2026-11-24 11:03:02 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T11:01:40Z.


Thanks for the fresh-versus-repeat control. This isolates a lane-width change on the Arc configuration independently of a cross-block read. Please keep it beside the original WARP case as separate evidence. The next useful WARP result would use the same source-built direct module and report the first divergent word, observed width and build for the first and repeated dispatches. Keep the existing strict checks.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7129558251 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7129558251). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T11:01:40Z. --- Thanks for the fresh-versus-repeat control. This isolates a lane-width change on the Arc configuration independently of a cross-block read. Please keep it beside the original WARP case as separate evidence. The next useful WARP result would use the same source-built direct module and report the first divergent word, observed width and build for the first and repeated dispatches. Keep the existing strict checks.
linusbrunotte-arch commented 2026-11-24 14:03:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by linusbrunotte-arch on 2026-11-24T13:13:13Z.


In-box WARP first-versus-repeat direct compaction check

Source: ca4a98302544117caa71d85cd8c7e89f3749457f (main at test start). Windows 11 x64 build 26300.9974, offscreen_check Release built with Clang 23.1.6 in MSVC mode, Windows SDK 10.0.26100, DXC 1.9.2609.5. D3D12 debug layer unavailable. Backend: Microsoft Basic Render Driver (1414:008c), in-box WARP 10.0.26100.9818.

Follow-up to the requested first/repeat check. I used the six-mask direct-HLSL probe with fixed seed 13037. Each mask was built with the fixture’s emit_direct into a distinct DXIL payload, then the same binary was passed to compaction.run(..., "warp", dxil) twice. All 12 launches exited 0.

Mask lo / hi First width Repeat width First divergent word
8421e1fb / 18422aaf 4 4 None
8421e1fd / 18422aac 4 4 None
8421e1ff / 18422aad 4 4 None
8421e1c1 / 18422ab2 4 4 None
8421e1c3 / 18422ab3 4 4 None
8421e1c5 / 18422ab0 4 4 None

Each pair matched all 328 words. This is the direct first/repeat comparison for the recorded WARP build. The original replay remains open and the strict fixture is unchanged.

Codex (GPT-6) assisted with test execution and reporting.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7132518061 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7132518061). Originally posted by [linusbrunotte-arch](https://github.com/linusbrunotte-arch) on 2026-11-24T13:13:13Z. --- ### In-box WARP first-versus-repeat direct compaction check Source: `ca4a98302544117caa71d85cd8c7e89f3749457f` (main at test start). Windows 11 x64 build 26300.9974, `offscreen_check` Release built with Clang 23.1.6 in MSVC mode, Windows SDK 10.0.26100, DXC 1.9.2609.5. D3D12 debug layer unavailable. Backend: Microsoft Basic Render Driver (`1414:008c`), in-box WARP `10.0.26100.9818`. Follow-up to the [requested first/repeat check](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7129558251). I used the [six-mask direct-HLSL probe](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7128893379) with fixed seed `13037`. Each mask was built with the fixture’s `emit_direct` into a distinct DXIL payload, then the same binary was passed to `compaction.run(..., "warp", dxil)` twice. All 12 launches exited 0. | Mask lo / hi | First width | Repeat width | First divergent word | |---|---:|---:|---| | `8421e1fb / 18422aaf` | 4 | 4 | None | | `8421e1fd / 18422aac` | 4 | 4 | None | | `8421e1ff / 18422aad` | 4 | 4 | None | | `8421e1c1 / 18422ab2` | 4 | 4 | None | | `8421e1c3 / 18422ab3` | 4 | 4 | None | | `8421e1c5 / 18422ab0` | 4 | 4 | None | Each pair matched all 328 words. This is the direct first/repeat comparison for the recorded WARP build. The original replay remains open and the strict fixture is unchanged. Codex (GPT-6) assisted with test execution and reporting.
R0Y00 commented 2026-11-24 14:03:24 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T13:22:51Z.


Thanks for running the requested first/repeat check. This establishes stable width 4 and identical 328-word output across all six repeat pairs on this WARP build. Please keep this alongside the earlier mismatch and Arc follow-up. The next useful comparison is the exact earlier failing input and module on this same build if they can be reproduced from the source-built fixture. The strict expectation stays in place.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7132747050 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7132747050). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T13:22:51Z. --- Thanks for running the requested first/repeat check. This establishes stable width 4 and identical 328-word output across all six repeat pairs on this WARP build. Please keep this alongside the earlier mismatch and Arc follow-up. The next useful comparison is the exact earlier failing input and module on this same build if they can be reproduced from the source-built fixture. The strict expectation stays in place.
linusbrunotte-arch commented 2026-11-24 14:03:25 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by linusbrunotte-arch on 2026-11-24T13:38:08Z.


Follow-up to the request for the exact earlier case. The original WARP replay input and module are not in the public fixture. I used the exact public mask_a from the Arc direct-HLSL repeat failure as the closest source-built comparison.

On the same local WARP setup as my previous report (in-box 10.0.26100.9818, Windows 26300.9974, debug layer unavailable, renderer commit ca4a98302544117caa71d85cd8c7e89f3749457f), I called compaction.emit_direct(directory, dxc, MASKS['mask_a']) with DXC 1.9.2609.5, then compaction.run(renderer, 'warp', dxil) twice on the same binary. Mask: 84218421 / 18421842. Local DXIL SHA-256: a4f520f124c48d0f6f4fe8205ec93901b0f23043015f26e3952d4684e3b65770.

Both dispatches exited 0, reported width 4, and each passed check_source at 0/328 mismatches. Word 16 was 00000000 both times. All 328 words were identical across the pair, so there was no first divergent word.

This is a matching public source/input comparison with a locally compiled module. The earlier Arc report used a different DXC, and the original WARP replay is still open. The strict fixture was unchanged. Codex (GPT-6) assisted with the run and report.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7133114038 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7133114038). Originally posted by [linusbrunotte-arch](https://github.com/linusbrunotte-arch) on 2026-11-24T13:38:08Z. --- Follow-up to [the request for the exact earlier case](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7132747050). The original WARP replay input and module are not in the public fixture. I used the exact public `mask_a` from the [Arc direct-HLSL repeat failure](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7118886927) as the closest source-built comparison. On the same local WARP setup as my previous report (in-box `10.0.26100.9818`, Windows `26300.9974`, debug layer unavailable, renderer commit `ca4a98302544117caa71d85cd8c7e89f3749457f`), I called `compaction.emit_direct(directory, dxc, MASKS['mask_a'])` with DXC `1.9.2609.5`, then `compaction.run(renderer, 'warp', dxil)` twice on the same binary. Mask: `84218421 / 18421842`. Local DXIL SHA-256: `a4f520f124c48d0f6f4fe8205ec93901b0f23043015f26e3952d4684e3b65770`. Both dispatches exited 0, reported width 4, and each passed `check_source` at 0/328 mismatches. Word 16 was `00000000` both times. All 328 words were identical across the pair, so there was no first divergent word. This is a matching public source/input comparison with a locally compiled module. The earlier Arc report used a different DXC, and the original WARP replay is still open. The strict fixture was unchanged. Codex (GPT-6) assisted with the run and report.
Lifither commented 2026-11-24 20:01:18 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Lifither on 2026-11-24T19:25:25Z.


Independent Polaris retest of the public SPIR-V compaction fixture.

Tested upstream 82749f0f84d9f8b571566fdf564d530e71f499aa on Windows 11 x64 build 26300.9974, Release, clang-cl 23.1.6 with /EHa, Windows SDK 10.0.26100, DXC 1.9.2609.5. Radeon RX 590 Series (1002:67df), driver 31.0.21923.1000. WARP: Microsoft Basic Render Driver (1414:008c), version 10.0.26100.9818. The D3D12 debug layer was unavailable on both adapters. SPIRV-Tools v2025.5 (262bdab4) and SPIRV-Cross 57e4efc with the project patch were selected from the pinned setup.

cmake --build <build> --target offscreen_check
$env:XBOX2WINDOWS_ADAPTER = 'RX 590'
$env:X2W_REQUIRE_SPIRV_TOOLS = '1'
ctest --test-dir <build> --no-tests=error -R '^spirv_compaction_(hardware|warp)$' -V

Both tests passed, with zero failures or skips. The RX 590 reported width 64 (one wave) for both the translated and direct shaders, on both masks. WARP reported width 4 (16 waves). Each path matched all 328 reference words per mask, repeats were identical, and bridge and direct outputs agreed for each adapter. Both negative controls were caught for both masks on both adapters at the predicted first indices (65 for ballot bit, 257 for write index).

Source-built fixtures only. Codex assisted with testing and reporting.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7142074589 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7142074589). Originally posted by [Lifither](https://github.com/Lifither) on 2026-11-24T19:25:25Z. --- Independent Polaris retest of the public SPIR-V compaction fixture. Tested upstream `82749f0f84d9f8b571566fdf564d530e71f499aa` on Windows 11 x64 build 26300.9974, Release, clang-cl 23.1.6 with `/EHa`, Windows SDK 10.0.26100, DXC 1.9.2609.5. Radeon RX 590 Series (1002:67df), driver 31.0.21923.1000. WARP: Microsoft Basic Render Driver (1414:008c), version 10.0.26100.9818. The D3D12 debug layer was unavailable on both adapters. SPIRV-Tools v2025.5 (`262bdab4`) and SPIRV-Cross `57e4efc` with the project patch were selected from the pinned setup. ```powershell cmake --build <build> --target offscreen_check $env:XBOX2WINDOWS_ADAPTER = 'RX 590' $env:X2W_REQUIRE_SPIRV_TOOLS = '1' ctest --test-dir <build> --no-tests=error -R '^spirv_compaction_(hardware|warp)$' -V ``` Both tests passed, with zero failures or skips. The RX 590 reported width 64 (one wave) for both the translated and direct shaders, on both masks. WARP reported width 4 (16 waves). Each path matched all 328 reference words per mask, repeats were identical, and bridge and direct outputs agreed for each adapter. Both negative controls were caught for both masks on both adapters at the predicted first indices (65 for ballot bit, 257 for write index). Source-built fixtures only. Codex assisted with testing and reporting.
cawnr912 commented 2026-11-24 20:01:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by cawnr912 on 2026-11-24T19:37:34Z.


Independent run of the public SPIR-V compaction fixture on in-box WARP, an AMD RDNA 2 integrated GPU (device 164e) and an RTX 5070, all on one Windows 11 build 26200 machine.

Environment

  • main at ddeaa5ebd11cfc03248c72e5d0dbbe7d005bd20b, clean tree, dev preset (Debug)
  • Windows 11 build 26200.9974
  • MSVC 19.44.35230 (toolset 14.44.35207), Windows SDK 10.0.26100, DXC 1.9.2602.17 (SDK-bundled)
  • SPIR-V tools from tools/setup-spirv-tools.ps1: SPIRV-Tools v2025.5 (262bdab4), SPIRV-Cross 57e4efc with the project MinLod patch
  • WARP, Microsoft Basic Render Driver (1414:008c), in-box 10.0.26100.9818
  • AMD Radeon(TM) Graphics (1002:164e), driver 31.0.24002.92
  • NVIDIA GeForce RTX 5070 (10de:2f04), driver 32.0.16.2124
  • D3D12 debug layer: unavailable on all three (Graphics Tools not installed)

Commands

.\tools\dev.ps1
$b = "$PWD/out/tools/spirv/bin".Replace('\', '/')
cmake --preset dev "-DSPIRV_WINDOW_AS=$b/spirv-as.exe" "-DSPIRV_WINDOW_VAL=$b/spirv-val.exe" "-DSPIRV_WINDOW_CROSS=$b/spirv-cross.exe"
$env:X2W_REQUIRE_SPIRV_TOOLS = '1'
ctest --preset dev --no-tests=error -R '^spirv_compaction_warp$' -V
$env:XBOX2WINDOWS_ADAPTER = 'Radeon'
ctest --preset dev --no-tests=error -R '^spirv_compaction_hardware$' -V
$env:XBOX2WINDOWS_ADAPTER = 'RTX 5070'
ctest --preset dev --no-tests=error -R '^spirv_compaction_hardware$' -V

Result

3 passes, 0 failures, 0 timeouts, 0 capability skips.

Adapter Test Width Waves Words compared per run Mismatches
WARP 10.0.26100.9818 spirv_compaction_warp 4 16 328 0
Radeon 164e spirv_compaction_hardware 32 2 328 0
RTX 5070 spirv_compaction_hardware 32 2 328 0

On every adapter, mask_a and mask_b each matched the CPU reference for the bridge and the direct shader, and each repeat was identical. The bridge output equalled the direct output (bridge_equals_direct=true) for both masks. The Radeon integrated GPU ran at wave width 32 in this fixture. The RX 590 report ran at 64.

Both negative controls caught their mismatch at the predicted word, for both masks, on all three adapters:

Control Predicted first mismatch WARP mismatches Radeon and RTX mismatches
ballot_bit word 65 80 38
write_index word 257 32 18

This is a source-built fixture result only. It does not reproduce or explain the original replay difference. The replay's input and module are not part of the public fixture.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7142363271 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7142363271). Originally posted by [cawnr912](https://github.com/cawnr912) on 2026-11-24T19:37:34Z. --- Independent run of the public SPIR-V compaction fixture on in-box WARP, an AMD RDNA 2 integrated GPU (device 164e) and an RTX 5070, all on one Windows 11 build 26200 machine. ## Environment - `main` at `ddeaa5ebd11cfc03248c72e5d0dbbe7d005bd20b`, clean tree, `dev` preset (Debug) - Windows 11 build 26200.9974 - MSVC 19.44.35230 (toolset 14.44.35207), Windows SDK 10.0.26100, DXC 1.9.2602.17 (SDK-bundled) - SPIR-V tools from `tools/setup-spirv-tools.ps1`: SPIRV-Tools v2025.5 (`262bdab4`), SPIRV-Cross `57e4efc` with the project MinLod patch - WARP, Microsoft Basic Render Driver (`1414:008c`), in-box 10.0.26100.9818 - AMD Radeon(TM) Graphics (`1002:164e`), driver 31.0.24002.92 - NVIDIA GeForce RTX 5070 (`10de:2f04`), driver 32.0.16.2124 - D3D12 debug layer: unavailable on all three (Graphics Tools not installed) ## Commands ```powershell .\tools\dev.ps1 $b = "$PWD/out/tools/spirv/bin".Replace('\', '/') cmake --preset dev "-DSPIRV_WINDOW_AS=$b/spirv-as.exe" "-DSPIRV_WINDOW_VAL=$b/spirv-val.exe" "-DSPIRV_WINDOW_CROSS=$b/spirv-cross.exe" $env:X2W_REQUIRE_SPIRV_TOOLS = '1' ctest --preset dev --no-tests=error -R '^spirv_compaction_warp$' -V $env:XBOX2WINDOWS_ADAPTER = 'Radeon' ctest --preset dev --no-tests=error -R '^spirv_compaction_hardware$' -V $env:XBOX2WINDOWS_ADAPTER = 'RTX 5070' ctest --preset dev --no-tests=error -R '^spirv_compaction_hardware$' -V ``` ## Result 3 passes, 0 failures, 0 timeouts, 0 capability skips. | Adapter | Test | Width | Waves | Words compared per run | Mismatches | | --- | --- | --- | --- | --- | --- | | WARP 10.0.26100.9818 | `spirv_compaction_warp` | 4 | 16 | 328 | 0 | | Radeon 164e | `spirv_compaction_hardware` | 32 | 2 | 328 | 0 | | RTX 5070 | `spirv_compaction_hardware` | 32 | 2 | 328 | 0 | On every adapter, `mask_a` and `mask_b` each matched the CPU reference for the bridge and the direct shader, and each repeat was identical. The bridge output equalled the direct output (`bridge_equals_direct=true`) for both masks. The Radeon integrated GPU ran at wave width 32 in this fixture. The RX 590 report ran at 64. Both negative controls caught their mismatch at the predicted word, for both masks, on all three adapters: | Control | Predicted first mismatch | WARP mismatches | Radeon and RTX mismatches | | --- | --- | --- | --- | | `ballot_bit` | word 65 | 80 | 38 | | `write_index` | word 257 | 32 | 18 | This is a source-built fixture result only. It does not reproduce or explain the original replay difference. The replay's input and module are not part of the public fixture.
RavenCurseBurg commented 2026-11-25 16:05:25 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T15:53:30Z.


I ran the stock fixture three times each on Intel UHD Graphics 770 (32.0.101.5973), RTX 4060 (32.0.15.9579) and in-box WARP (10.0.26100.9711). Both masks matched all 328 words in both shader paths. All repeats were identical; reported widths were 16, 32 and 4 respectively. The ballot and write-index controls first differed at the expected words 65 and 257 on every run. Windows 11 26100.9711, DXC 1.9.2609.5, pinned SPIR-V tools, debug layer unavailable.

I’ll take a diagnostic follow-up while keeping the strict comparison outcomes. A changed repeat currently exits without naming the first different word or either width. A negative control also builds its mutated reference using the previous shader's width. In a separate diagnostic exercise I captured both real mutated modules on all three adapters, then deliberately paired each readback with a different recorded width: the Intel and NVIDIA cases blamed lane word 16 and WARP blamed lane word 4, even though each matched all 328 words of its own-width mutated reference. That cross-adapter exercise tests the reporting path; the nine normal runs above were stable.

I’ll report the first differing word, field and both widths on a changed repeat, and distinguish a changed width from a wrong result in the negative-control diagnostics. The repeat, bridge/direct and control mismatch paths will stay strict.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7167404208 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7167404208). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T15:53:30Z. --- I ran the stock fixture three times each on Intel UHD Graphics 770 (32.0.101.5973), RTX 4060 (32.0.15.9579) and in-box WARP (10.0.26100.9711). Both masks matched all 328 words in both shader paths. All repeats were identical; reported widths were 16, 32 and 4 respectively. The ballot and write-index controls first differed at the expected words 65 and 257 on every run. Windows 11 26100.9711, DXC 1.9.2609.5, pinned SPIR-V tools, debug layer unavailable. I’ll take a diagnostic follow-up while keeping the strict comparison outcomes. A changed repeat currently exits without naming the first different word or either width. A negative control also builds its mutated reference using the previous shader's width. In a separate diagnostic exercise I captured both real mutated modules on all three adapters, then deliberately paired each readback with a different recorded width: the Intel and NVIDIA cases blamed lane word 16 and WARP blamed lane word 4, even though each matched all 328 words of its own-width mutated reference. That cross-adapter exercise tests the reporting path; the nine normal runs above were stable. I’ll report the first differing word, field and both widths on a changed repeat, and distinguish a changed width from a wrong result in the negative-control diagnostics. The repeat, bridge/direct and control mismatch paths will stay strict.
stan495 commented 2026-11-26 14:00:36 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-26T13:26:38Z.


AMD Radeon RX 7900 XTX (1002:744c, 64-wide) and in-box WARP (10.0.26100.9818, 4-wide) run of the source-built subgroup compaction fixture (174f963d).

This is a source-built fixture measurement only; it does not reproduce or explain the original private replay difference.

Environment

  • OS: Windows 10 Pro 25H2 (Build 10.0.26200.9974)
  • Commit / Preset: 174f963d (working tree has an unrelated pre-existing modification in tools/startup/debug_launch.py), preset release
  • Shader Toolchain: Windows SDK 10.0.26100.0 DXC (dxcompiler.dll 1.8.2502.11) and local out/tools/spirv/bin/spirv-{as,val,cross}.exe
  • Hardware ($env:XBOX2WINDOWS_ADAPTER = "7900"): AMD Radeon RX 7900 XTX (vendor=1002 device=744c), driver 32.0.32029.2010, debug_layer=enabled
  • WARP: Microsoft Basic Render Driver (vendor=1414 device=008c), driver 10.0.26100.9818, debug_layer=enabled

Commands

.\tools\dev.ps1
$env:XBOX2WINDOWS_ADAPTER = "7900"
ctest --preset release --no-tests=error -j 1 -R '^spirv_compaction_(hardware|warp)$' -V

Results

2 passed, 0 failed, 0 skipped (debug_errors=0 debug_warnings=0 on every dispatch).

Adapter Test Width Waves Words compared per run Mismatches (bridge / direct, mask_a & mask_b) repeat=identical bridge_equals_direct
AMD Radeon RX 7900 XTX (1002:744c) spirv_compaction_hardware 64 1 328 0 yes true
Microsoft Basic Render Driver (1414:008c) spirv_compaction_warp 4 16 328 0 yes true

Both negative controls were caught at their predicted first differing words for both mask_a and mask_b:

Control Predicted first mismatch RX 7900 XTX mismatches WARP mismatches
ballot_bit word 65 36 80
write_index word 257 17 32

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7193359183 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7193359183). Originally posted by [stan495](https://github.com/stan495) on 2026-11-26T13:26:38Z. --- **AMD Radeon RX 7900 XTX (`1002:744c`, 64-wide) and in-box WARP (`10.0.26100.9818`, 4-wide) run of the source-built subgroup compaction fixture (`174f963d`).** This is a source-built fixture measurement only; it does not reproduce or explain the original private replay difference. ### Environment - **OS:** Windows 10 Pro 25H2 (Build `10.0.26200.9974`) - **Commit / Preset:** `174f963d` (working tree has an unrelated pre-existing modification in `tools/startup/debug_launch.py`), preset `release` - **Shader Toolchain:** Windows SDK `10.0.26100.0` DXC (`dxcompiler.dll` `1.8.2502.11`) and local `out/tools/spirv/bin/spirv-{as,val,cross}.exe` - **Hardware (`$env:XBOX2WINDOWS_ADAPTER = "7900"`):** `AMD Radeon RX 7900 XTX` (`vendor=1002 device=744c`), driver `32.0.32029.2010`, `debug_layer=enabled` - **WARP:** `Microsoft Basic Render Driver` (`vendor=1414 device=008c`), driver `10.0.26100.9818`, `debug_layer=enabled` ### Commands ```powershell .\tools\dev.ps1 $env:XBOX2WINDOWS_ADAPTER = "7900" ctest --preset release --no-tests=error -j 1 -R '^spirv_compaction_(hardware|warp)$' -V ``` ### Results 2 passed, 0 failed, 0 skipped (`debug_errors=0 debug_warnings=0` on every dispatch). | Adapter | Test | Width | Waves | Words compared per run | Mismatches (`bridge` / `direct`, `mask_a` & `mask_b`) | `repeat=identical` | `bridge_equals_direct` | |---|---|---:|---:|---:|---|---|---| | `AMD Radeon RX 7900 XTX` (`1002:744c`) | `spirv_compaction_hardware` | 64 | 1 | 328 | `0` | yes | `true` | | `Microsoft Basic Render Driver` (`1414:008c`) | `spirv_compaction_warp` | 4 | 16 | 328 | `0` | yes | `true` | Both negative controls were caught at their predicted first differing words for both `mask_a` and `mask_b`: | Control | Predicted first mismatch | RX 7900 XTX mismatches | WARP mismatches | |---|---|---:|---:| | `ballot_bit` | word 65 | 36 | 80 | | `write_index` | word 257 | 17 | 32 | _AI-assisted; commands listed were executed locally._
Alexofbulgaria commented 2026-11-27 01:53:43 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Alexofbulgaria on 2026-11-27T01:53:43Z.


Intel Arc A770 subgroup-compaction comparison

Windows 26300.10075, Release at d3e3ea776e4fb32401f1eed3dc109fb477d9cbd8, DXC 1.9.2602.17 and pinned SPIR-V tools. A770 8086:56a0 / 32.0.101.9175 and WARP 10.0.26100.10068. The debug layer was enabled and reported zero errors and warnings throughout.

I ran the unmodified spirv_compaction_hardware and spirv_compaction_warp registrations three times each. A770 3/3 passed; WARP 3/3 passed; no skips. For both masks and both shader paths, each run matched all 328 words. First and repeated outputs were identical. Observed wave widths stayed at 16 on A770 and 4 on WARP. The ballot-bit and write-index controls detected the predicted first differences at words 65 and 257 on both backends. This covers the public stock fixture at this pin. Source-built fixtures only. AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7207662302 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7207662302). Originally posted by [Alexofbulgaria](https://github.com/Alexofbulgaria) on 2026-11-27T01:53:43Z. --- ### Intel Arc A770 subgroup-compaction comparison Windows `26300.10075`, Release at `d3e3ea776e4fb32401f1eed3dc109fb477d9cbd8`, DXC `1.9.2602.17` and pinned SPIR-V tools. A770 `8086:56a0` / `32.0.101.9175` and WARP `10.0.26100.10068`. The debug layer was enabled and reported zero errors and warnings throughout. I ran the unmodified `spirv_compaction_hardware` and `spirv_compaction_warp` registrations three times each. **A770 3/3 passed; WARP 3/3 passed; no skips.** For both masks and both shader paths, each run matched all 328 words. First and repeated outputs were identical. Observed wave widths stayed at 16 on A770 and 4 on WARP. The ballot-bit and write-index controls detected the predicted first differences at words 65 and 257 on both backends. This covers the public stock fixture at this pin. Source-built fixtures only. AI-assisted.
xiaoqi72665 commented 2026-11-27 03:23:09 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by xiaoqi72665 on 2026-11-27T03:23:09Z.


RX 7900 XT (RDNA3) / in-box WARP subgroup compaction

Source-built public fixtures at a4fae199517158fd443bfdd450f476b2c7b5f4c1, clean main, Debug (dev preset), Windows 10 build 19045.6466, Windows SDK 10.0.26100.0 DXC 1.8.2502.11. RX 7900 XT (1002:744c), driver 32.0.32029.2010; in-box WARP 10.0.19041.5794. D3D12 debug layer unavailable. SPIRV-Tools 262bdab4 / Headers b824a462, SPIRV-Cross 57e4efc with the repository MinLod patch.

Both registered spirv_compaction_(hardware|warp) cases passed. On each adapter, both deterministic masks and both shader paths matched all 328 CPU reference words. Repeated dispatches were identical; bridge/direct results were identical.

Backend Observed width Waves Ballot-bit control differences Write-index control differences
RX 7900 XT 64 1 36 17
WARP 4 16 80 32

Both masks on both backends detected the predicted first mismatch at word 65 (ballot bit) and 257 (write index). All mutated readbacks also matched their independent mutated references exactly.

$env:XBOX2WINDOWS_ADAPTER = 'RX 7900 XT'
ctest --preset dev --no-tests=error -j 1 -R '^spirv_compaction_(hardware|warp)$' -V

This covers the current source-built fixture only, not the original private replay.

Buhe (@xiaoqi72665). AI-assisted; tests executed on local hardware.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7208943816 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/768#issuecomment-7208943816). Originally posted by [xiaoqi72665](https://github.com/xiaoqi72665) on 2026-11-27T03:23:09Z. --- ### RX 7900 XT (RDNA3) / in-box WARP subgroup compaction Source-built public fixtures at `a4fae199517158fd443bfdd450f476b2c7b5f4c1`, clean `main`, Debug (`dev` preset), Windows 10 build 19045.6466, Windows SDK 10.0.26100.0 DXC 1.8.2502.11. RX 7900 XT (1002:744c), driver 32.0.32029.2010; in-box WARP 10.0.19041.5794. D3D12 debug layer unavailable. SPIRV-Tools `262bdab4` / Headers `b824a462`, SPIRV-Cross `57e4efc` with the repository MinLod patch. Both registered `spirv_compaction_(hardware|warp)` cases passed. On each adapter, both deterministic masks and both shader paths matched all 328 CPU reference words. Repeated dispatches were identical; bridge/direct results were identical. | Backend | Observed width | Waves | Ballot-bit control differences | Write-index control differences | |---|---:|---:|---:|---:| | RX 7900 XT | 64 | 1 | 36 | 17 | | WARP | 4 | 16 | 80 | 32 | Both masks on both backends detected the predicted first mismatch at word 65 (ballot bit) and 257 (write index). All mutated readbacks also matched their independent mutated references exactly. ```powershell $env:XBOX2WINDOWS_ADAPTER = 'RX 7900 XT' ctest --preset dev --no-tests=error -j 1 -R '^spirv_compaction_(hardware|warp)$' -V ``` This covers the current source-built fixture only, not the original private replay. Buhe (@xiaoqi72665). AI-assisted; tests executed on local hardware.
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#762
No description provided.