tests: report the depth-target debug-layer check as its own test #2184

Manually merged
github merged 2 commits from gh-pr/2184/head into gh-pr/2184/base 2026-11-27 00:03:51 +00:00
Owner

@⁠rasptum on GitHub · 2026-11-25 03:17 UTC · original
rasptum:startup/depth-target-debug-layer → main · +31 −16 · 3 files · 2 commits · merged 2026-11-25 03:44 UTC

Refs #1999. Follow-up to the non-blocking review notes on #2156.

Change

  • Debug-layer check. In startup_draw_depth_target, the bound case's debug-message check was skipped with only a printed note when the D3D12 debug layer is not installed. It is now its own test, startup_draw_depth_target_debug_{warp,hardware}. It requires the bound picture and no debug-layer message of any severity after the fence, and exits 77 (a capability skip that CTest reports) when the layer is missing. The check mode keeps every pixel, depth and counter check, so nothing is weakened; the missing-layer case simply becomes visible instead of passing with a note.
  • run_case comment. It now says why the unknown case is exempt from the -> drawn; check: the stand-in refuses the whole OMSetRenderTargets there, so no draw may be issued. "Nothing drawn" is checked through the read-back (clear colour, depth 1.0) and the refusal line.
  • CMake comment. It no longer says the drop control "must fail only its picture". The control passes only when it reads back the unbound picture.
  • docs/startup-runtime.md mentions the _debug test.

Verification

ctest --preset dev --no-tests=error -R '^startup_draw_depth_target_' -V
ctest --preset release --no-tests=error -R '^startup_draw_depth_target_' -V

Windows 10 19045, MSVC 19.44. WARP: Microsoft Basic Render Driver, driver 10.0.19041.5794. Hardware: NVIDIA GeForce RTX 3060, driver 32.0.15.9636. The D3D12 debug layer is installed on this machine.

  • Result: 6 of 6 passed, 0 skipped, in dev and release, on both backends:
    • startup_draw_depth_target_{warp,hardware};
    • _drop_control_{warp,hardware}: red in front, depth 1.0;
    • _debug_{warp,hardware}: "debug layer enabled, 0 debug-layer message(s) after the fence; bound picture matches".
  • Not exercised: the 77 path (no debug layer), because the layer is installed here. It is a direct return 77 on the existing debug layer: ... enabled check.

AI-assisted (Claude Code).
🤖 Generated with Claude Code

**@⁠rasptum** on GitHub · 2026-11-25 03:17 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2184) `rasptum:startup/depth-target-debug-layer` → `main` · +31 −16 · 3 files · 2 commits · merged 2026-11-25 03:44 UTC Refs #1999. Follow-up to the non-blocking review notes on #2156. ### Change - **Debug-layer check.** In `startup_draw_depth_target`, the bound case's debug-message check was skipped with only a printed note when the D3D12 debug layer is not installed. It is now its own test, `startup_draw_depth_target_debug_{warp,hardware}`. It requires the bound picture and no debug-layer message of any severity after the fence, and exits 77 (a capability skip that CTest reports) when the layer is missing. The check mode keeps every pixel, depth and counter check, so nothing is weakened; the missing-layer case simply becomes visible instead of passing with a note. - **`run_case` comment.** It now says why the `unknown` case is exempt from the `-> drawn;` check: the stand-in refuses the whole `OMSetRenderTargets` there, so no draw may be issued. "Nothing drawn" is checked through the read-back (clear colour, depth 1.0) and the refusal line. - **CMake comment.** It no longer says the drop control "must fail only its picture". The control passes only when it reads back the unbound picture. - `docs/startup-runtime.md` mentions the `_debug` test. ### Verification ``` ctest --preset dev --no-tests=error -R '^startup_draw_depth_target_' -V ctest --preset release --no-tests=error -R '^startup_draw_depth_target_' -V ``` Windows 10 19045, MSVC 19.44. WARP: Microsoft Basic Render Driver, driver 10.0.19041.5794. Hardware: NVIDIA GeForce RTX 3060, driver 32.0.15.9636. The D3D12 debug layer is installed on this machine. - **Result:** 6 of 6 passed, 0 skipped, in dev and release, on both backends: - `startup_draw_depth_target_{warp,hardware}`; - `_drop_control_{warp,hardware}`: red in front, depth 1.0; - `_debug_{warp,hardware}`: "debug layer enabled, 0 debug-layer message(s) after the fence; bound picture matches". - **Not exercised:** the 77 path (no debug layer), because the layer is installed here. It is a direct `return 77` on the existing `debug layer: ... enabled` check. AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Follow-up to #2156's review nits.

- The bound case's debug-message check was skipped with a printed note
  when the D3D12 debug layer is not installed. It is now its own test,
  startup_draw_depth_target_debug_{warp,hardware}: it requires the bound
  picture and no debug-layer message after the fence, and exits 77 (a
  capability skip CTest reports) when the layer is missing, instead of
  passing with a note. The check mode keeps every pixel, depth and
  counter check.
- run_case says why the unknown case is exempt from the "-> drawn;"
  check: the stand-in refuses the whole OMSetRenderTargets there, so no
  draw may be issued; nothing drawn is checked through the read-back
  and the refusal line.
- The CMakeLists comment no longer says the drop control "must fail
  only its picture": it passes only when it reads back the unbound
  picture.

Refs #1999

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	CMakeLists.txt
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:03:48 +00:00
github manually merged commit dd8cf6db4a into gh-pr/2184/base 2026-11-27 00:03:51 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 03:24 UTC · original · reviewed

Review of head c881a5c703 (tests-only: CMakeLists.txt, docs/startup-runtime.md, tests/startup_draw_depth_target_check.py).

Findings: 0 P1, 0 P2. Splitting the debug-layer assertion into its own _debug CTest that exits 77 when the layer is missing is correct: a missing layer is now reported as a skip instead of a silent pass inside the bound case. The new CMake test is added to the same SKIP_RETURN_CODE 77 / TIMEOUT 120 property list as its siblings, and the docs match the script. No overlapping open PR touches this check.

Linux, executed locally:

  • python3 -m py_compile tests/startup_draw_depth_target_check.py: ok
  • python3 tests/docs_links_check.py: pass (402 links)
  • python3 tests/bidi_controls_check.py: pass
  • git diff --check origin/main...HEAD: clean
  • Ran the checker against a local stand-in executable that emits the expected stdout/stderr: check rc 0, debug rc 0, debug without layer rc 77, debug with a debug-layer message rc 1.
  • Mutations (each reverted with git checkout -- .): dropping the not bound["debug"] condition lets the message case pass (rc 0 instead of 1); changing return 77 to return 0 turns the no-layer skip into a pass; inverting the bound-picture comparison makes the clean run fail (rc 1 instead of 0). All three change the outcome, so the new test is killed by each.

Windows: GitHub Build and test on Windows = SUCCESS. The local Win2025 WARP run (x2w_pipe.py win2025 2184, 3-slot pool) built startup_draw_depth_target.exe but twice reported "No tests were found": INTAKE_PYTHON was missing on slot 3, so the Python-driven tests were not registered. That is an infrastructure problem, not a result for this PR; the WARP _debug / _drop_control / _warp tests are therefore not locally confirmed.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 03:24 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2184#pullrequestreview-6051397372) · **reviewed** Review of head c881a5c703ca9cfa01aa32f55cf3cfcabe091f69 (tests-only: CMakeLists.txt, docs/startup-runtime.md, tests/startup_draw_depth_target_check.py). Findings: 0 P1, 0 P2. Splitting the debug-layer assertion into its own `_debug` CTest that exits 77 when the layer is missing is correct: a missing layer is now reported as a skip instead of a silent pass inside the `bound` case. The new CMake test is added to the same SKIP_RETURN_CODE 77 / TIMEOUT 120 property list as its siblings, and the docs match the script. No overlapping open PR touches this check. Linux, executed locally: - `python3 -m py_compile tests/startup_draw_depth_target_check.py`: ok - `python3 tests/docs_links_check.py`: pass (402 links) - `python3 tests/bidi_controls_check.py`: pass - `git diff --check origin/main...HEAD`: clean - Ran the checker against a local stand-in executable that emits the expected stdout/stderr: `check` rc 0, `debug` rc 0, `debug` without layer rc 77, `debug` with a debug-layer message rc 1. - Mutations (each reverted with `git checkout -- .`): dropping the `not bound["debug"]` condition lets the message case pass (rc 0 instead of 1); changing `return 77` to `return 0` turns the no-layer skip into a pass; inverting the bound-picture comparison makes the clean run fail (rc 1 instead of 0). All three change the outcome, so the new test is killed by each. Windows: GitHub `Build and test on Windows` = SUCCESS. The local Win2025 WARP run (`x2w_pipe.py win2025 2184`, 3-slot pool) built startup_draw_depth_target.exe but twice reported "No tests were found": INTAKE_PYTHON was missing on slot 3, so the Python-driven tests were not registered. That is an infrastructure problem, not a result for this PR; the WARP `_debug` / `_drop_control` / `_warp` tests are therefore not locally confirmed. AI-assisted; commands listed were executed locally.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 03:43 UTC · original · reviewed

Review of head dd8cf6db4a (files: CMakeLists.txt, docs/startup-runtime.md, tests/startup_draw_depth_target_check.py).

Findings: 0 P1, 0 P2.

What it does: the debug-layer message check moves out of check into a new debug mode (startup_draw_depth_target_debug_{warp,hardware}). The mode exits 77 when the layer is absent, so CTest reports a skip instead of a silent pass. SKIP_RETURN_CODE 77 is set for the new test. The docs describe the split accurately. Sibling tests (check, drop_control) are unchanged in behavior.

Commands executed locally:

  • python3 tests/docs_links_check.py -> 18 files, 405 links OK
  • python3 tests/bidi_controls_check.py -> OK
  • git diff --check origin/main...HEAD -> clean
  • Mutation (harness drives main() in debug mode with canned run results): clean/no layer/with messages -> 0/77/1. Mutant removing not bound["debug"] from the return -> the with-messages case returns 0 instead of 1 (killed).
  • Win2025 WARP, dev and release /O2: ctest -R '^startup_draw_depth_target_(warp|drop_control_warp|debug_warp)$' --no-tests=error: 3/3 completed, warp and drop_control_warp Passed, debug_warp Skipped (the Windows VM has no D3D12 debug layer, so the message check did not run there; a skip, not a pass).
  • CI Build and test on Windows = SUCCESS, Linux Python checks = SUCCESS.

Note: the debug-message assertion is therefore only exercised on hosts with the debug layer installed. This is by design and now reported as a skip.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 03:43 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2184#pullrequestreview-6051546652) · **reviewed** Review of head dd8cf6db4a3fd0be6c71f1b8bc9eb0447331693d (files: CMakeLists.txt, docs/startup-runtime.md, tests/startup_draw_depth_target_check.py). Findings: 0 P1, 0 P2. What it does: the debug-layer message check moves out of `check` into a new `debug` mode (`startup_draw_depth_target_debug_{warp,hardware}`). The mode exits 77 when the layer is absent, so CTest reports a skip instead of a silent pass. SKIP_RETURN_CODE 77 is set for the new test. The docs describe the split accurately. Sibling tests (`check`, `drop_control`) are unchanged in behavior. Commands executed locally: - `python3 tests/docs_links_check.py` -> 18 files, 405 links OK - `python3 tests/bidi_controls_check.py` -> OK - `git diff --check origin/main...HEAD` -> clean - Mutation (harness drives `main()` in `debug` mode with canned run results): clean/no layer/with messages -> 0/77/1. Mutant removing `not bound["debug"]` from the return -> the with-messages case returns 0 instead of 1 (killed). - Win2025 WARP, dev and release /O2: `ctest -R '^startup_draw_depth_target_(warp|drop_control_warp|debug_warp)$' --no-tests=error`: 3/3 completed, `warp` and `drop_control_warp` Passed, `debug_warp` Skipped (the Windows VM has no D3D12 debug layer, so the message check did not run there; a skip, not a pass). - CI `Build and test on Windows` = SUCCESS, Linux Python checks = SUCCESS. Note: the debug-message assertion is therefore only exercised on hosts with the debug layer installed. This is by design and now reported as a skip. AI-assisted; commands listed were executed locally.
This discussion has been locked. Commenting is limited to contributors.
No description provided.