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

Merged
JB2WIN merged 1 commit from upstream-pr/2928 into cpp-migration 2026-11-26 21:55:55 +00:00
JB2WIN commented 2026-11-26 21:37:13 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-26T21:37:13Z.


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

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5517473440 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2928). Originally posted by [JB2WIN](https://github.com/JB2WIN) on 2026-11-26T21:37:13Z. --- ## 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)
MasterDomino commented 2026-11-26 21:55:53 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T21:55:53Z.

Review: APPROVED


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6080908984 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2928#pullrequestreview-6080908984). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-26T21:55:53Z. **Review:** APPROVED --- 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.
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!2928
No description provided.