tests: expect the decoder's refusal for the invalid word in native_wave_request #2928

Manually merged
github merged 1 commit from gh-pr/2928/head into gh-pr/2928/base 2026-11-27 01:29:17 +00:00
Owner

@⁠JB2WIN on GitHub · 2026-11-26 21:37 UTC · original
JB2WIN:tests/native-wave-request-refusal → cpp-migration · +3 −1 · 1 files · 1 commits · merged 2026-11-26 21:55 UTC

What

native_wave_request_hardware fails on cpp-migration for every adapter (reported on NVIDIA and AMD in #2915). The check feeds the invalid word 0xffffffff to compile_dxil and expects "unsupported instruction". That word is not a gfx1013 encoding, so the decoder (src/gfx1013_isa.cpp:128) refuses it before lowering with unknown gfx1013 instruction format at byte N.

The check now expects that message. It still asserts a non-zero exit and that no .cso is written, and it prints stderr on failure.

Refs #2915 (only the refusal-message part; the AMD access violations are tracked there separately).

How tested

cmake --preset dev
cmake --build --preset dev --target compile_dxil native_wave_request_gpu
ctest --preset dev --no-tests=error -R "^native_wave_request_hardware$"
  • With this change: 1/1 passed.
  • Without it (same build): 1/1 failed, at the refusal assertion.

Base cpp-migration ee76dfa8. NVIDIA GeForce RTX 3080 driver 32.0.16.2124, Windows 11 build 26200, MSVC toolset 14.51.36231, Windows SDK 10.0.26100 DXC, D3D12 debug layer not enabled.

AI-assisted.

🤖 Generated with Claude Code

**@⁠JB2WIN** on GitHub · 2026-11-26 21:37 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2928) `JB2WIN:tests/native-wave-request-refusal` → `cpp-migration` · +3 −1 · 1 files · 1 commits · merged 2026-11-26 21:55 UTC ## What `native_wave_request_hardware` fails on `cpp-migration` for every adapter (reported on NVIDIA and AMD in #2915). The check feeds the invalid word `0xffffffff` to `compile_dxil` and expects "unsupported instruction". That word is not a gfx1013 encoding, so the decoder (`src/gfx1013_isa.cpp:128`) refuses it before lowering with `unknown gfx1013 instruction format at byte N`. The check now expects that message. It still asserts a non-zero exit and that no `.cso` is written, and it prints stderr on failure. Refs #2915 (only the refusal-message part; the AMD access violations are tracked there separately). ## How tested ``` cmake --preset dev cmake --build --preset dev --target compile_dxil native_wave_request_gpu ctest --preset dev --no-tests=error -R "^native_wave_request_hardware$" ``` - With this change: 1/1 passed. - Without it (same build): 1/1 failed, at the refusal assertion. Base `cpp-migration` ee76dfa8. NVIDIA GeForce RTX 3080 driver 32.0.16.2124, Windows 11 build 26200, MSVC toolset 14.51.36231, Windows SDK 10.0.26100 DXC, D3D12 debug layer not enabled. AI-assisted. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The check feeds 0xffffffff to compile_dxil and expected "unsupported
instruction". The word is not a gfx1013 encoding, so the decoder now
refuses it first with "unknown gfx1013 instruction format at byte N".
The refusal and the missing .cso are still asserted; the expected
message is now the one the compiler prints (Refs #2915).

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:29:16 +00:00
github manually merged commit 1f0d39bdd8 into gh-pr/2928/base 2026-11-27 01:29:17 +00:00
Author
Owner

@⁠MasterDomino on GitHub · 2026-11-26 21:55 UTC · original · approved these changes

Review of head 1f0d39bd. I reported this failure in #2915.

Run: the PR's tests/native_wave_request_check.py, run directly against a release build of cpp-migration 7f951fd3. The PR changes only this file. Windows 11 build 26300.9974, AMD Radeon RX 9070 XT, driver 32.0.32029.2010, Windows SDK 10.0.26100 DXC, D3D12 debug layer not enabled.

  • It passes, exit 0. On this adapter the check had always stopped at the old refusal assertion, so this is the first time its GPU half ran here. native_wave_request_gpu completed its dispatches without the 0xC0000005 from #2915. The non-zero child exits in the run are the check's own refusals and controls: invalid-span, invalid-pair, indexed, and the global-stride 4 mismatch. That narrows #2915: not every native GPU path crashes on this driver.
  • The change is correct. 0xffffffff is not a gfx1013 encoding, src/gfx1013_isa.cpp:128 throws unknown gfx1013 instruction format at byte N before any lowering, and the check still requires a non-zero exit and no .cso.

Suggestion, not blocking: the old expectation pointed at a lowering refusal, and no native test covers one now.

  • unsupported instruction <name> <hex> (src/gfx1013_compute_native.cpp:230) and unsupported opcode <hex> (:357) are not asserted by any native test. The only tests that match those strings are the Python and CPU translator checks.
  • As a probe I swapped 0xffffffff in the same check for 0x64000501 (v_add_f16 v0, v1, v2, which decodes). compile_dxil then exits 1 with native compute +0x64: unsupported opcode 0x64000501u and writes no .cso.
  • A second rejected request like that, asserting unsupported opcode, would keep both the decoder refusal and the lowering refusal pinned. It can also go in a follow-up.

AI-assisted; the commands above were run locally.

**@⁠MasterDomino** on GitHub · 2026-11-26 21:55 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2928#pullrequestreview-6080908984) · **approved these changes** Review of head `1f0d39bd`. I reported this failure in #2915. **Run:** the PR's `tests/native_wave_request_check.py`, run directly against a release build of `cpp-migration` `7f951fd3`. The PR changes only this file. Windows 11 build 26300.9974, **AMD Radeon RX 9070 XT**, driver 32.0.32029.2010, Windows SDK 10.0.26100 DXC, D3D12 debug layer not enabled. - **It passes, exit 0.** On this adapter the check had always stopped at the old refusal assertion, so this is the first time its GPU half ran here. `native_wave_request_gpu` completed its dispatches without the `0xC0000005` from #2915. The non-zero child exits in the run are the check's own refusals and controls: `invalid-span`, `invalid-pair`, `indexed`, and the `global-stride 4` mismatch. That narrows #2915: not every native GPU path crashes on this driver. - The change is correct. `0xffffffff` is not a gfx1013 encoding, `src/gfx1013_isa.cpp:128` throws `unknown gfx1013 instruction format at byte N` before any lowering, and the check still requires a non-zero exit and no `.cso`. **Suggestion, not blocking:** the old expectation pointed at a lowering refusal, and no native test covers one now. - `unsupported instruction <name> <hex>` (`src/gfx1013_compute_native.cpp:230`) and `unsupported opcode <hex>` (`:357`) are not asserted by any native test. The only tests that match those strings are the Python and CPU translator checks. - As a probe I swapped `0xffffffff` in the same check for `0x64000501` (`v_add_f16 v0, v1, v2`, which decodes). `compile_dxil` then exits 1 with `native compute +0x64: unsupported opcode 0x64000501u` and writes no `.cso`. - A second rejected request like that, asserting `unsupported opcode`, would keep both the decoder refusal and the lowering refusal pinned. It can also go in a follow-up. AI-assisted; the commands above were run locally.
This discussion has been locked. Commenting is limited to contributors.
No description provided.