tests: guard the compute done rule of pending_keys for slot 67 requests #2221

Merged
NiiRoZz merged 1 commit from upstream-pr/2229 into main 2026-11-25 06:32:59 +00:00
NiiRoZz commented 2026-11-25 06:28:47 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by NiiRoZz on 2026-11-25T06:28:47Z.


Change

Follow-up to #2223: the re-review there left one test gap open. In gfx2hlsl.pending_keys, a slot 67 compute request counts as done when its manifest and a non-empty <key>.cs.cso exist, but no check consulted that stage rule: the existing "done" assertion runs with X2W_FXC="" (manifest-only), where the stage list is not read, so changing the stage tuple from ('.cs.cso',) to ('.vs.cso',) survived.

This adds the missing assertions to tests/startup_compute_translate_check.py, with X2W_FXC unset. A compute request stays pending with:

  • a manifest alone;
  • a manifest plus graphics .vs.cso/.ps.cso;
  • a manifest plus an empty .cs.cso.

It becomes done with a manifest plus a non-empty .cs.cso.

Test only; no translator or runtime change. Refs #1412.

Verification

Commit f15bf807 on main 1d6381dc. Windows 11 build 26300.

ctest --preset dev --no-tests=error -R "^(startup_compute_translate_requests|startup_compute_request_offline|startup_tools_lint)$"
python -B tests/startup_compute_translate_check.py

3 of 3 passed, no skips; the pure-Python check passes on its own (it needs no Windows or D3D12 and is already in the Linux list).

Evidence and follow-up

Mutations, each run and then reverted:

  • stage tuple ('.cs.cso',) → ('.vs.cso',): the check fails with "graphics bytecode made a compute request done";
  • stage tuple → (): the check fails with "a manifest alone made the request done".

Follow-up: the runtime slot 67 slice described on #1412 (real PSO, dispatch through the shim, fenced UAV read-back) is in preparation; it needs the slot 14 handler and compute root state of #1974, #1803 and #1975.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed. (none changed)
  • I did not include game files, dumps, distribution links or secrets.

AI-assisted (Claude Code); the commands above were run locally.

🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6598652097 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2229). Originally posted by [NiiRoZz](https://github.com/NiiRoZz) on 2026-11-25T06:28:47Z. --- ## Change Follow-up to #2223: the re-review there left one test gap open. In `gfx2hlsl.pending_keys`, a slot 67 compute request counts as done when its manifest and a non-empty `<key>.cs.cso` exist, but no check consulted that stage rule: the existing "done" assertion runs with `X2W_FXC=""` (manifest-only), where the stage list is not read, so changing the stage tuple from `('.cs.cso',)` to `('.vs.cso',)` survived. This adds the missing assertions to `tests/startup_compute_translate_check.py`, with `X2W_FXC` unset. A compute request stays pending with: - a manifest alone; - a manifest plus graphics `.vs.cso`/`.ps.cso`; - a manifest plus an empty `.cs.cso`. It becomes done with a manifest plus a non-empty `.cs.cso`. Test only; no translator or runtime change. Refs #1412. ## Verification Commit f15bf807 on main 1d6381dc. Windows 11 build 26300. ``` ctest --preset dev --no-tests=error -R "^(startup_compute_translate_requests|startup_compute_request_offline|startup_tools_lint)$" python -B tests/startup_compute_translate_check.py ``` 3 of 3 passed, no skips; the pure-Python check passes on its own (it needs no Windows or D3D12 and is already in the Linux list). ## Evidence and follow-up Mutations, each run and then reverted: - stage tuple `('.cs.cso',)` → `('.vs.cso',)`: the check fails with "graphics bytecode made a compute request done"; - stage tuple → `()`: the check fails with "a manifest alone made the request done". Follow-up: the runtime slot 67 slice described on #1412 (real PSO, dispatch through the shim, fenced UAV read-back) is in preparation; it needs the slot 14 handler and compute root state of #1974, #1803 and #1975. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated README/docs when a capability or build requirement changed. (none changed) - [x] I did not include game files, dumps, distribution links or secrets. AI-assisted (Claude Code); the commands above were run locally. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
upstream-sync closed this pull request 2026-11-25 07:01:07 +00:00
tedin7 commented 2026-11-25 07:01:08 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T06:32:19Z.

Review: COMMENTED


Review of head f15bf80792 (tests-only, one Python file).

Result: 0 P1, 0 P2.

Logic check: the new assertions match pending_keys in tools/startup/gfx2hlsl.py. A c67 request needs <key>.txt plus a non-empty <key>.cs.cso. Graphics .vs.cso / .ps.cso files do not count, and an empty .cs.cso does not count. Each case is asserted separately.

Commands executed locally:

  • python3 tests/startup_compute_translate_check.py -> PASS
  • python3 tests/docs_links_check.py -> PASS (414 links)
  • python3 tests/bidi_controls_check.py -> PASS
  • git diff --check origin/main...HEAD -> clean
  • Mutation 1: c67 stages changed to ('.vs.cso', '.ps.cso') -> test FAILS ("graphics bytecode made a compute request done")
  • Mutation 2: done condition forced to True -> test FAILS ("a manifest alone made the request done")
  • Both mutations reverted.

Only a .py file is touched, so the pure-Python path applies.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6052877703 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2229#pullrequestreview-6052877703). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T06:32:19Z. **Review:** COMMENTED --- Review of head f15bf8079208982a5490308d9c739008adf0088c (tests-only, one Python file). Result: 0 P1, 0 P2. Logic check: the new assertions match `pending_keys` in tools/startup/gfx2hlsl.py. A `c67` request needs `<key>.txt` plus a non-empty `<key>.cs.cso`. Graphics `.vs.cso` / `.ps.cso` files do not count, and an empty `.cs.cso` does not count. Each case is asserted separately. Commands executed locally: - `python3 tests/startup_compute_translate_check.py` -> PASS - `python3 tests/docs_links_check.py` -> PASS (414 links) - `python3 tests/bidi_controls_check.py` -> PASS - `git diff --check origin/main...HEAD` -> clean - Mutation 1: c67 stages changed to `('.vs.cso', '.ps.cso')` -> test FAILS ("graphics bytecode made a compute request done") - Mutation 2: done condition forced to `True` -> test FAILS ("a manifest alone made the request done") - Both mutations reverted. Only a .py file is touched, so the pure-Python path applies. 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!2221
No description provided.