Skip to content

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

Merged
tedin7 merged 1 commit into
R0Y00:mainfrom
NiiRoZz:compute/pending-cso-guard
Nov 25, 2026
Merged

tedin7 merged 1 commit into
R0Y00:mainfrom
NiiRoZz:compute/pending-cso-guard

Conversation

@NiiRoZz

@NiiRoZz NiiRoZz commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

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 f15bf80 on main 1d6381d. 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

With compilation on, pending_keys keeps a compute request pending with a
manifest alone, with graphics .vs.cso/.ps.cso, or with an empty .cs.cso, and
treats it as done with a manifest and a non-empty .cs.cso. Changing the
compute stage tuple to ('.vs.cso',) or () now fails the check.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@tedin7 tedin7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of head f15bf80 (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.

@tedin7
tedin7 merged commit a7ecaaa into R0Y00:main Nov 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants