tests: report dispatch widths and first different subgroup compaction word #2406

Merged
RavenCurseBurg merged 1 commit from upstream-pr/2414 into main 2026-11-25 17:22:08 +00:00
RavenCurseBurg commented 2026-11-25 16:01:37 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T16:01:37Z.


Refs #768. When repeated dispatches differ, the fixture now reports the first differing word, its field, both hexadecimal values, both reported subgroup widths and the mismatch count. The bridge/direct comparison uses the same diagnostic. A repeat that returns a capability skip after a successful first readback remains a strict failure with a distinct message.

Each negative control now compares all 328 words against its mutated CPU reference at the width that control reported. A width change from the baseline still fails. The message distinguishes an exact control readback at a changed width from a control with incorrect data.

GPU verification. I ran the normal fixture three times each on Intel UHD 770 (32.0.101.5973, width 16), RTX 4060 (32.0.15.9579, width 32) and WARP (10.0.26100.9711, width 4). All nine runs passed. Both masks, both shader sources, all repeats and both negative controls matched their expected outcomes. DXC 1.9.2609.5, pinned SPIRV-Tools and patched SPIRV-Cross, Windows 11 26100.9711. The local debug layer was unavailable. Windows Server WARP with the debug layer passed the normal fixture and verified the changed-readback diagnostics using actual GPU words. Doc links and bidi checks passed.

Failure-path verification. I replayed intentionally paired GPU captures through the previous and current drivers. All nine failure cases still failed. The normal runs above were stable; the replay tests diagnostics and does not report a spontaneous width change.

Controlled pair New diagnostic
Two 16-lane GPU reads, original vs ballot mutation Word 65, ballot 00008421 → 00004812, 44 differing words
16-lane Intel and 32-lane NVIDIA reads Word 16, lane 00000000 → 00000010, 106 differing words
32-lane ballot control checked after a 16-lane baseline Width changed, all 328 words match the 32-lane mutated reference
32-lane write-index control supplied in place of the ballot control after a 16-lane baseline Genuine mutated-reference failure at word 65, both widths reported

The replay also covered a changed direct repeat, bridge/direct disagreement, a missing repeat, an incorrect control at the same width, and an invalid width field.

Reproduce the normal fixture with the pinned SPIR-V tools configured:

cmake --build --preset dev --target offscreen_check
ctest --preset dev --no-tests=error -V -R '^spirv_compaction_(hardware|warp)$'

AI assistance: Codex + GPT-6.2 Astra (xhigh).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6608489342 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2414). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T16:01:37Z. --- Refs #768. When repeated dispatches differ, the fixture now reports the first differing word, its field, both hexadecimal values, both reported subgroup widths and the mismatch count. The bridge/direct comparison uses the same diagnostic. A repeat that returns a capability skip after a successful first readback remains a strict failure with a distinct message. Each negative control now compares all 328 words against its mutated CPU reference at the width **that control** reported. A width change from the baseline still fails. The message distinguishes an exact control readback at a changed width from a control with incorrect data. **GPU verification.** I ran the normal fixture three times each on Intel UHD 770 (32.0.101.5973, width 16), RTX 4060 (32.0.15.9579, width 32) and WARP (10.0.26100.9711, width 4). All nine runs passed. Both masks, both shader sources, all repeats and both negative controls matched their expected outcomes. DXC 1.9.2609.5, pinned SPIRV-Tools and patched SPIRV-Cross, Windows 11 26100.9711. The local debug layer was unavailable. [Windows Server WARP with the debug layer](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45650258251) passed the normal fixture and verified the changed-readback diagnostics using actual GPU words. Doc links and bidi checks passed. **Failure-path verification.** I replayed intentionally paired GPU captures through the previous and current drivers. All nine failure cases still failed. The normal runs above were stable; the replay tests diagnostics and does not report a spontaneous width change. | Controlled pair | New diagnostic | | --- | --- | | Two 16-lane GPU reads, original vs ballot mutation | Word 65, ballot `00008421` → `00004812`, 44 differing words | | 16-lane Intel and 32-lane NVIDIA reads | Word 16, lane `00000000` → `00000010`, 106 differing words | | 32-lane ballot control checked after a 16-lane baseline | Width changed, all 328 words match the 32-lane mutated reference | | 32-lane write-index control supplied in place of the ballot control after a 16-lane baseline | Genuine mutated-reference failure at word 65, both widths reported | The replay also covered a changed direct repeat, bridge/direct disagreement, a missing repeat, an incorrect control at the same width, and an invalid width field. Reproduce the normal fixture with the pinned SPIR-V tools configured: ```powershell cmake --build --preset dev --target offscreen_check ctest --preset dev --no-tests=error -V -R '^spirv_compaction_(hardware|warp)$' ``` AI assistance: Codex + GPT-6.2 Astra (xhigh).
KelboLive commented 2026-11-25 16:05:26 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-25T16:04:01Z.


APPROVED: Test fixture improvement — reporting dispatch widths and first different subgroup compaction word. Testing-focused change.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7167562891 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2414#issuecomment-7167562891). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-25T16:04:01Z. --- APPROVED: Test fixture improvement — reporting dispatch widths and first different subgroup compaction word. Testing-focused change.
upstream-sync closed this pull request 2026-11-25 18:01:02 +00:00
MasterDomino commented 2026-11-25 18:01:03 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T17:22:05Z.

Review: APPROVED


Approved at head 4722d3ef. The change is test diagnostics plus a docs paragraph, in tests/spirv_window/compaction.py and docs/experiments.md. This adds an AMD adapter, at a fourth subgroup width, to the author's Intel, NVIDIA and WARP runs.

Environment

  • Windows 11 build 26300, --preset dev, offscreen_check built at 4722d3ef.
  • The pinned SPIR-V tools from tools/setup-spirv-tools.ps1, and DXC from SDK 10.0.26100.
  • D3D12 debug layer enabled.

Normal fixture

ctest --preset dev --no-tests=error -V -R '^spirv_compaction_(hardware|warp)$'
Adapter Width Result
AMD Radeon RX 9070 XT (1002:7550, driver 32.0.32029.2010) 64 (waves=1) pass. Both masks: bridge and direct compared=328 mismatches=0, repeats identical, bridge_equals_direct=true. Both negative controls status=caught, ballot_bit at word 65 (36 mismatches) and write_index at word 257 (17 mismatches), each mutated_reference=exact. debug_errors=0 debug_warnings=0.
WARP 10.0.26100.9818 4 (waves=16) pass

There were no skips. Width 64 is new next to 16 on the Intel UHD 770, 32 on the RTX 4060 and 4 on WARP.

New diagnostics

I drove compaction.main with real RX 9070 XT readbacks through a wrapper around run() that perturbs one readback. I left the fixture unmodified.

  • A changed readback before the first repeat comparison: bridge readback changed between identical dispatches (mask_a): first_mismatch=word=65 field=ballot first=84218421 repeat=00000040 first_width=64 repeat_width=64 mismatches=263.
  • The first repeat returning 77: bridge mask_a repeat skipped after first dispatch at width 64. That is the distinct strict failure the description promises, instead of a pass or skip.
  • The first negative control's readback relabelled as width 32: negative control ballot_bit differs from its mutated reference at word 32: baseline_width=64 control_width=32. The data is really width-64 data, so this is the "incorrect data" path, with both widths reported.

Other checks

  • docs_links_check passes.
  • The branch merges cleanly with current main (8e5dcb69).
  • Required CI passed at this head. The /O2 and coverage skips come from explicit workflow conditions. There are no review threads.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6061980662 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2414#pullrequestreview-6061980662). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-25T17:22:05Z. **Review:** APPROVED --- Approved at head `4722d3ef`. The change is test diagnostics plus a docs paragraph, in `tests/spirv_window/compaction.py` and `docs/experiments.md`. This adds an AMD adapter, at a fourth subgroup width, to the author's Intel, NVIDIA and WARP runs. ### Environment - Windows 11 build 26300, `--preset dev`, `offscreen_check` built at `4722d3ef`. - The pinned SPIR-V tools from `tools/setup-spirv-tools.ps1`, and DXC from SDK 10.0.26100. - D3D12 debug layer enabled. ### Normal fixture ```powershell ctest --preset dev --no-tests=error -V -R '^spirv_compaction_(hardware|warp)$' ``` | Adapter | Width | Result | |---|---|---| | **AMD Radeon RX 9070 XT** (1002:7550, driver 32.0.32029.2010) | **64** (`waves=1`) | pass. Both masks: bridge and direct `compared=328 mismatches=0`, repeats identical, `bridge_equals_direct=true`. Both negative controls `status=caught`, `ballot_bit` at word 65 (36 mismatches) and `write_index` at word 257 (17 mismatches), each `mutated_reference=exact`. `debug_errors=0 debug_warnings=0`. | | WARP 10.0.26100.9818 | 4 (`waves=16`) | pass | There were no skips. Width 64 is new next to 16 on the Intel UHD 770, 32 on the RTX 4060 and 4 on WARP. ### New diagnostics I drove `compaction.main` with real RX 9070 XT readbacks through a wrapper around `run()` that perturbs one readback. I left the fixture unmodified. - **A changed readback before the first repeat comparison:** `bridge readback changed between identical dispatches (mask_a): first_mismatch=word=65 field=ballot first=84218421 repeat=00000040 first_width=64 repeat_width=64 mismatches=263`. - **The first repeat returning 77:** `bridge mask_a repeat skipped after first dispatch at width 64`. That is the distinct strict failure the description promises, instead of a pass or skip. - **The first negative control's readback relabelled as width 32:** `negative control ballot_bit differs from its mutated reference at word 32: baseline_width=64 control_width=32`. The data is really width-64 data, so this is the "incorrect data" path, with both widths reported. ### Other checks - `docs_links_check` passes. - The branch merges cleanly with current `main` (`8e5dcb69`). - Required CI passed at this head. The `/O2` and coverage skips come from explicit workflow conditions. There are no review threads. AI-assisted; commands listed were executed locally.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!2406
No description provided.