tests: read the gfx1013 wave index in the wave64 readfirstlane fixture #3922

Manually merged
github merged 1 commit from github-bot/gh-3920 into gh-pr/3920/base 2026-12-03 11:15:08 +00:00 AGit
Owner

@⁠timbot103 on GitHub · 2026-12-03 10:34 UTC · original
timbot103:shader/native-wave64-empty-readfirstlane → main · +25 −14 · 3 files · 1 commits · merged 2026-12-03 11:12 UTC

Refs #3226. Fixture regression from #3798.

Change

Use the gfx1013 TG_SIZE[11:6] wave index in the source-built empty-EXEC fixture. The old extraction returned zero for both virtual waves, skipping the writes in the 128-thread case. On d2e6a4ed, both RTX 5080 and app-local WARP retained 0x69696969 at word 264, where the model expected 0x00004005. The 64-thread case passed on both adapters.

Register the same guarded readback for WARP. The 128-thread request without the packed state still refuses with multi-wave64 exchange requires converged group control flow. The negative readback control still distinguishes the upper half's lane 32 value.

Verification

Windows 11 26200.9974, NVIDIA GeForce RTX 5080 driver 32.0.16.2140 (621.40), Microsoft Basic Render Driver with app-local WARP 1.0.22.0.20261027.1, DXC 1.9.2602.17 (21d28f727). The native replay does not enable the D3D12 debug layer.

After configuring dev and release with the project Python environment and placing app-local WARP beside each build's executables:

$env:XBOX2WINDOWS_ADAPTER = 'NVIDIA GeForce RTX 5080'
cmake --build out/build/dev -- -j 6
cmake --build out/build/release --target compile_dxil native_store_replay native_wave_request_gpu -- -j 6
cmake --build out/build/release --target offscreen_check -- -j 6
ctest --preset dev --no-tests=error -j 1 -R '^native_(wave64_readfirstlane_empty_|compute_tg_size_|virtual_wave_latch$)' -V
ctest --preset release --no-tests=error -j 1 -R '^native_(wave64_readfirstlane_empty_|compute_tg_size_|virtual_wave_latch$)' -V
ctest --preset pr --no-tests=error -j 1 -R '^native_wave64_readfirstlane_empty_controls$' -V
python -B tests/bidi_controls_check.py
python -B tests/docs_links_check.py
git diff --check origin/main...HEAD
  • Debug and Release each passed 7 tests, with zero failures or skips. The fixture compared all 2,064 words per request on each adapter, including guards.
  • The PR preset control passed. Full Debug build, documentation, bidirectional-control, and diff checks passed.

🤖 Generated with Claude Code

**@⁠timbot103** on GitHub · 2026-12-03 10:34 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3920) `timbot103:shader/native-wave64-empty-readfirstlane` → `main` · +25 −14 · 3 files · 1 commits · merged 2026-12-03 11:12 UTC Refs #3226. Fixture regression from #3798. ## Change Use the gfx1013 `TG_SIZE[11:6]` wave index in the source-built empty-EXEC fixture. The old extraction returned zero for both virtual waves, skipping the writes in the 128-thread case. On `d2e6a4ed`, both RTX 5080 and app-local WARP retained `0x69696969` at word 264, where the model expected `0x00004005`. The 64-thread case passed on both adapters. Register the same guarded readback for WARP. The 128-thread request without the packed state still refuses with `multi-wave64 exchange requires converged group control flow`. The negative readback control still distinguishes the upper half's lane 32 value. ## Verification Windows 11 26200.9974, NVIDIA GeForce RTX 5080 driver 32.0.16.2140 (621.40), Microsoft Basic Render Driver with app-local WARP 1.0.22.0.20261027.1, DXC 1.9.2602.17 (21d28f727). The native replay does not enable the D3D12 debug layer. After configuring `dev` and `release` with the project Python environment and placing app-local WARP beside each build's executables: ```powershell $env:XBOX2WINDOWS_ADAPTER = 'NVIDIA GeForce RTX 5080' cmake --build out/build/dev -- -j 6 cmake --build out/build/release --target compile_dxil native_store_replay native_wave_request_gpu -- -j 6 cmake --build out/build/release --target offscreen_check -- -j 6 ctest --preset dev --no-tests=error -j 1 -R '^native_(wave64_readfirstlane_empty_|compute_tg_size_|virtual_wave_latch$)' -V ctest --preset release --no-tests=error -j 1 -R '^native_(wave64_readfirstlane_empty_|compute_tg_size_|virtual_wave_latch$)' -V ctest --preset pr --no-tests=error -j 1 -R '^native_wave64_readfirstlane_empty_controls$' -V python -B tests/bidi_controls_check.py python -B tests/docs_links_check.py git diff --check origin/main...HEAD ``` - Debug and Release each passed 7 tests, with zero failures or skips. The fixture compared all 2,064 words per request on each adapter, including guards. - The PR preset control passed. Full Debug build, documentation, bidirectional-control, and diff checks passed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Refs #3224. The outdated fixture used the wave-index encoding from before #3796.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 10:35:27 +00:00
github-bot changed target branch from main to gh-pr/3920/base 2026-12-03 11:15:07 +00:00
github manually merged commit ad446f24d5 into gh-pr/3920/base 2026-12-03 11:15:08 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-03 11:12 UTC · original · approved these changes

Reviewed ad446f24. The fixture now shifts TG_SIZE by six and masks the six-bit wave index, while the group wave count still comes from the low six bits. With MSVC Debug and SDK DXC on Windows 11 build 26300, the offline compiler/refusal controls passed. RTX 4060 Laptop driver 32.0.16.1656 matched all 2,064 words in both the 64-thread and 128-thread runs, and both lane-32 negative expectations differed. Reverting only the shift reproduced the old 128-thread mismatch at word 264 (0x69696969 vs 0x00004005) while 64 threads still passed. Inbox WARP returned capability skip 77. The replay fixture does not enable the D3D12 debug layer.

**@⁠R0Y00** on GitHub · 2026-12-03 11:12 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3920#pullrequestreview-6168605570) · **approved these changes** Reviewed ad446f24. The fixture now shifts TG_SIZE by six and masks the six-bit wave index, while the group wave count still comes from the low six bits. With MSVC Debug and SDK DXC on Windows 11 build 26300, the offline compiler/refusal controls passed. RTX 4060 Laptop driver 32.0.16.1656 matched all 2,064 words in both the 64-thread and 128-thread runs, and both lane-32 negative expectations differed. Reverting only the shift reproduced the old 128-thread mismatch at word 264 (0x69696969 vs 0x00004005) while 64 threads still passed. Inbox WARP returned capability skip 77. The replay fixture does not enable the D3D12 debug layer.
Author
Owner

@⁠JohnConnorNPC on GitHub · 2026-12-03 11:27 UTC · original

Follow-up notes on ad446f24d5f7 (merged while this review was running). The fixture fix itself checks out. No MUST or SHOULD, three NITs.

  1. NIT: the readback comment says the adapter is named even ahead of a capability skip, but under --direct-warp nothing prints it (report_adapter is only called in the non-WARP branch of tests/native_store_replay.cpp).
  2. NIT (docs/experiments/native-wave64-readfirstlane-empty.md): no passing result is recorded for the corrected fixture.
  3. NIT (same doc): the Limits heading was dropped, along with the sentence saying a non-empty EXEC with a zero low word still takes the old path.

Outside this change, read but not run: tests/native_wave_request_check.py still extracts the wave index with s_bfe_u32 s13, s8, 0x50014 (bit 20), so native_wave_request_hardware probably fails on main since #3798.

AI-assisted review.

**@⁠JohnConnorNPC** on GitHub · 2026-12-03 11:27 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3920#issuecomment-7376727885) Follow-up notes on `ad446f24d5f7` (merged while this review was running). The fixture fix itself checks out. **No MUST or SHOULD, three NITs.** 1. **NIT**: the readback comment says the adapter is named even ahead of a capability skip, but under `--direct-warp` nothing prints it (`report_adapter` is only called in the non-WARP branch of `tests/native_store_replay.cpp`). 2. **NIT** (`docs/experiments/native-wave64-readfirstlane-empty.md`): no passing result is recorded for the corrected fixture. 3. **NIT** (same doc): the Limits heading was dropped, along with the sentence saying a non-empty EXEC with a zero low word still takes the old path. Outside this change, read but not run: `tests/native_wave_request_check.py` still extracts the wave index with `s_bfe_u32 s13, s8, 0x50014` (bit 20), so `native_wave_request_hardware` probably fails on main since #3798. AI-assisted review.
This discussion has been locked. Commenting is limited to contributors.
No description provided.