test: cover slot 35 table selection and invalidation at Dispatch #2866

Merged
chasegrindy merged 1 commit from upstream-pr/2874 into main 2026-11-27 08:02:37 +00:00
chasegrindy commented 2026-11-26 15:35:54 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chasegrindy on 2026-11-26T15:35:54Z.


Test-only port of NiiRoZz/Xbox2Windows#1 to main, as requested in #2470. The translated Dispatch path and recorder fix are already on main (#2532 and #2636).

  • Select the correct pair at descriptor index 2 rather than the swapped pair at the heap start. Binding the same heap again preserves the table; all 320 words must match the CPU reference.
  • Change the compute root and restore it, or switch ordinary view heaps. Reissue the constants without rebinding slot 35 and require the exact unbound-table refusal with all 320 sentinel words intact.
  • Require the requested fence value and a healthy device before readback. Only the initial capability probe can skip; an adapter/heap failure later is an error.

Release on b505c32b20fee62bafd51f86a87a26a6f48b5ecb: 23 passed, no failures or skips, including the focused Dispatch checks on RX 7900 XTX (driver 32.0.32015.7029) and WARP. Three separate fixture fault injections on WARP were caught by the corresponding readback oracle, and both focused checks passed again after restoring the fixture.

cmake --build --preset release --target startup_stream_consumer
$env:XBOX2WINDOWS_ADAPTER = 'AMD Radeon RX 7900 XTX'
ctest --preset release --no-tests=error -j 1 -R '^startup_compute_dispatch_(warp|hardware)$' -V

AI-assisted (Hermes Agent / OpenAI Codex).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5512905324 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2874). Originally posted by [chasegrindy](https://github.com/chasegrindy) on 2026-11-26T15:35:54Z. --- Test-only port of [NiiRoZz/Xbox2Windows#1](https://github.com/NiiRoZz/Xbox2Windows/pull/1) to `main`, as [requested in #2470](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7181977756). The translated Dispatch path and recorder fix are already on `main` (#2532 and #2636). - Select the correct pair at descriptor index 2 rather than the swapped pair at the heap start. Binding the same heap again preserves the table; all 320 words must match the CPU reference. - Change the compute root and restore it, or switch ordinary view heaps. Reissue the constants without rebinding slot 35 and require the exact unbound-table refusal with all 320 sentinel words intact. - Require the requested fence value and a healthy device before readback. Only the initial capability probe can skip; an adapter/heap failure later is an error. Release on `b505c32b20fee62bafd51f86a87a26a6f48b5ecb`: 23 passed, no failures or skips, including the focused Dispatch checks on RX 7900 XTX (driver `32.0.32015.7029`) and WARP. Three separate fixture fault injections on WARP were caught by the corresponding readback oracle, and both focused checks passed again after restoring the fixture. ```powershell cmake --build --preset release --target startup_stream_consumer $env:XBOX2WINDOWS_ADAPTER = 'AMD Radeon RX 7900 XTX' ctest --preset release --no-tests=error -j 1 -R '^startup_compute_dispatch_(warp|hardware)$' -V ``` AI-assisted (Hermes Agent / OpenAI Codex).
RonLogic commented 2026-11-26 16:39:29 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-26T16:39:29Z.


Independent Windows MSVC x64 Release verification at 491b214c1ad02ed225c80a5bba42ba6e830e9c04. The Slot 35 descriptor offset and same-heap rebind matched the complete 320-word CPU reference. The changed-root and changed-heap cases each reported exactly a table descriptor is not bound and preserved all 320 sentinel words. The focused Dispatch, live retry and slot-67 indirect suite passed 6/6 without skips on in-box WARP 10.0.26100.10068 and RTX 4070 32.0.16.2124 (Windows 26300.10075). D3D12 debug layer enabled. Built startup_stream_consumer and ran ctest --preset release --no-tests=error -j 1 -R '^startup_(compute_dispatch|compute_live_retry|slot67_indirect_dispatch)_(warp|hardware)$' -V.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7197930282 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2874#issuecomment-7197930282). Originally posted by [RonLogic](https://github.com/RonLogic) on 2026-11-26T16:39:29Z. --- Independent Windows MSVC x64 Release verification at `491b214c1ad02ed225c80a5bba42ba6e830e9c04`. The Slot 35 descriptor offset and same-heap rebind matched the complete 320-word CPU reference. The changed-root and changed-heap cases each reported exactly `a table descriptor is not bound` and preserved all 320 sentinel words. The focused Dispatch, live retry and slot-67 indirect suite passed 6/6 without skips on in-box WARP `10.0.26100.10068` and RTX 4070 `32.0.16.2124` (Windows `26300.10075`). D3D12 debug layer enabled. Built `startup_stream_consumer` and ran `ctest --preset release --no-tests=error -j 1 -R '^startup_(compute_dispatch|compute_live_retry|slot67_indirect_dispatch)_(warp|hardware)$' -V`.
KelboLive commented 2026-11-26 20:24:39 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-26T20:24:39Z.

Review: COMMENTED


test: cover slot 35 table selection and invalidation at Dispatch

Excellent test addition. The slot 35 descriptor table selection was under-tested, and this covers the critical cases:

  • Binding a wrong pair at the heap start with the correct pair at index 2
  • Changing the root or view heap after binding to trigger refusal at the table lookup (not an earlier check)
  • Preserving the table when the same heap is rebound

Observations

  • ✅ The test logic correctly constructs the descriptor arrays in "wrong" order and uses offsets to test lookup behavior
  • ✅ The improved error handling (checking stderr for device removed rather than relying on return code 77) is a good practice update
  • ✅ The consumer refactor (probe param on dispatch()) cleanly separates probe behavior from normal test runs
  • ✅ The startup_stream_consumer.cpp changes carefully reconstruct descriptor layouts for the new test modes

Comments

The single comment on this PR appears to be from a maintainer. If it contains review feedback, those changes should be addressed before merge.

Verdict: Solid test-only PR. Ready to merge once any maintainer feedback is incorporated.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6080120596 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2874#pullrequestreview-6080120596). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-26T20:24:39Z. **Review:** COMMENTED --- **test: cover slot 35 table selection and invalidation at Dispatch** Excellent test addition. The slot 35 descriptor table selection was under-tested, and this covers the critical cases: - Binding a wrong pair at the heap start with the correct pair at index 2 - Changing the root or view heap after binding to trigger refusal at the table lookup (not an earlier check) - Preserving the table when the same heap is rebound ### Observations - ✅ The test logic correctly constructs the descriptor arrays in "wrong" order and uses offsets to test lookup behavior - ✅ The improved error handling (checking stderr for `device removed` rather than relying on return code 77) is a good practice update - ✅ The consumer refactor (`probe` param on `dispatch()`) cleanly separates probe behavior from normal test runs - ✅ The `startup_stream_consumer.cpp` changes carefully reconstruct descriptor layouts for the new test modes ### Comments The single comment on this PR appears to be from a maintainer. If it contains review feedback, those changes should be addressed before merge. **Verdict:** Solid test-only PR. Ready to merge once any maintainer feedback is incorporated.
R0Y00 commented 2026-11-27 08:01:13 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T08:01:13Z.

Review: APPROVED


Reviewed 491b214c against main 22107932. This test-only patch exercises the nonzero table offset with an intentionally swapped pair at heap start, then changes the root or heap while restoring entry constants so the exact table-lookup refusal is observable. The fixture checks a healthy device and a completed fence before readback.

I rebuilt startup_stream_consumer and d3d12_xs_shim, then ran ctest --preset <dev|release> --no-tests=error -V -R '^startup_(compute_dispatch|compute_live_retry|slot67_indirect_dispatch)_(hardware|warp)$'. Each preset passed 6/6 without skips. Both adapters matched all 320 output words and preserved all 320 sentinels on the root and heap change refusals. Windows 11 26200.9974, WARP 10.0.26100.9818, RTX 4060 Laptop driver 32.0.16.1656, debug layer enabled for the focused Dispatch cases. Hosted Windows, Linux and gfx1013 checks are green. Local Release /O2 passed.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6085100647 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2874#pullrequestreview-6085100647). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-27T08:01:13Z. **Review:** APPROVED --- Reviewed `491b214c` against `main` `22107932`. This test-only patch exercises the nonzero table offset with an intentionally swapped pair at heap start, then changes the root or heap while restoring entry constants so the exact table-lookup refusal is observable. The fixture checks a healthy device and a completed fence before readback. I rebuilt `startup_stream_consumer` and `d3d12_xs_shim`, then ran `ctest --preset <dev|release> --no-tests=error -V -R '^startup_(compute_dispatch|compute_live_retry|slot67_indirect_dispatch)_(hardware|warp)$'`. Each preset passed 6/6 without skips. Both adapters matched all 320 output words and preserved all 320 sentinels on the root and heap change refusals. Windows 11 26200.9974, WARP 10.0.26100.9818, RTX 4060 Laptop driver 32.0.16.1656, debug layer enabled for the focused Dispatch cases. Hosted Windows, Linux and gfx1013 checks are green. Local Release `/O2` passed.
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!2866
No description provided.