tests: run the pixel_aot comparison draws as their own CTest entry #825

Merged
roansystemlabs merged 1 commit from upstream-pr/831 into main 2026-11-23 09:42:28 +00:00
roansystemlabs commented 2026-11-23 09:31:15 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-23T09:31:15Z.


Change

pixel_aot_predicate_rounding_hardware is at or past its 60 s timeout on some adapters: in #448, an RTX 3080 with the debug layer passed in 56.4 s once and hit the timeout twice. Its cases already go through run_pixel_batch() since #697, but the mode has grown back to 80 renderer launches and 284 cases.

Measured on an idle RTX 3070 with the D3D12 debug layer (per-phase table in #448): each offscreen_check launch costs about 0.25 s of start-up and each case about 0.03 s, so about 20 s of the 31-33 s (≈64 %) is renderer start-up; DXC is under 10 % and Python under 0.5 s. draw-blend-scalar and draw-core have the same per-launch and per-case cost; this mode is just the largest of the three.

This PR moves the comparison and class draws into a new mode, draw-comparisons, registered as pixel_aot_comparisons_{hardware,warp}:

  • check_f16_compare_draws, check_class_draw, check_predicate_draws, check_int_predicate_draws, check_unsigned_less_than_draws, check_int16_predicate_draws and check_sdwa_predicate_draws are called from check_comparison_draws() instead of check_predicate_and_rounding_draws(). The helpers themselves are unchanged.
  • The new entries have the same 60 s timeout as the old one, skip code 77 when the renderer reports an unavailable adapter (as the newer entries such as pixel_aot_cmp64_* have) and their own FORM_COVERAGE_RECORD file.
  • docs/experiments.md names the new mode for the 16-bit comparison draws and records the measurement.

No case, expected value or mismatch control changes; only the CTest entry that runs them moves. A per-process pipeline cache or a multi-shader batch in the renderer would cut start-up for every mode, but changes the renderer and its batch format, so I left it for a separate follow-up.

Refs #448

Verification

Base 325fe1e, Windows 11 build 26200, MSVC 19.44, Windows SDK 10.0.26100 DXC, dev preset. RTX 3070 (10de:2484, driver 32.0.16.2101) and WARP (10.0.26100.9818), both debug_layer=enabled. Idle machine (CPU 7-15 % and GPU 3-7 % before each run), serial runs on the same build.

ctest --preset dev --no-tests=error -R '^pixel_aot_predicate_rounding_(hardware|warp)$' -V   # on 325fe1e
ctest --preset dev --no-tests=error -R '^pixel_aot_(predicate_rounding|comparisons)_(hardware|warp)$' -V   # on this branch
3 serial runs predicate_rounding hw comparisons hw predicate_rounding WARP comparisons WARP
main 325fe1e (one entry) 33.21 / 31.75 / 31.58 s — 9.58 / 9.61 / 12.36 s —
this branch 16.81 / 16.70 / 16.89 s 15.36 / 15.28 / 15.17 s 3.94 / 4.12 / 3.91 s 5.93 / 5.97 / 5.95 s

All runs passed, with no skips or timeouts, and debug_errors=0 debug_warnings=0 on every printed draw. The third WARP run on main (12.36 s) overlapped a short CPU spike to 60 % from another process; the hardware entry of that run was not affected. Each hardware entry goes from 53-55 % of its 60 s limit to 25-28 %.

Same work before and after: wrapping subprocess.run and hashing every .hlsl, .cso and .case argument, draw-predicate-rounding on 325fe1e and draw-predicate-rounding + draw-comparisons on this branch make the same 80 renderer calls (46 + 34) with identical shader and case bytes, exit codes and per-case pass/mismatch statuses (21 expected mismatches before, 6 + 15 after), and compile the same 84 HLSL sources (45 + 39), on both the RTX 3070 and WARP. The union of the two entries' FORM_COVERAGE_RECORD files equals the record of the single entry on 325fe1e (212 first words), on both adapters.

Also run on this branch:

  • ctest --preset dev --no-tests=error -R '^pixel_aot_': 72/72 passed in 322.10 s, no skips or timeouts. The largest hardware entries in that run: pixel_aot_compare_hardware 39.74 s, pixel_aot_hardware 28.03 s, pixel_aot_blend_scalar_hardware 25.77 s, pixel_aot_e64_hardware 21.98 s, pixel_aot_predicate_rounding_hardware 18.91 s, pixel_aot_comparisons_hardware 15.27 s.
  • python -B tests/pixel_aot_check.py (controls), tests/form_coverage_check.py and tests/docs_links_check.py: all exit 0.
  • git diff --check: clean.
  • git merge-tree against each of the 39 open pull requests that touch tests/pixel_aot_check.py, CMakeLists.txt or docs/experiments.md: none conflicts with this branch unless it already conflicts with main.

Evidence and follow-up

No new fixtures. The timings depend on the adapter, driver, debug layer and machine load. The split roughly halves the work in each entry; the adapters near the limit in #448 should land around half of their previous time, but I have not measured them.

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. (No new fixture; existing mismatch controls are unchanged and still run.)
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.

AI-assisted: yes.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6556288325 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/831). Originally posted by [roansystemlabs](https://github.com/roansystemlabs) on 2026-11-23T09:31:15Z. --- ## Change `pixel_aot_predicate_rounding_hardware` is at or past its 60 s timeout on some adapters: in #448, an RTX 3080 with the debug layer passed in 56.4 s once and hit the timeout twice. Its cases already go through `run_pixel_batch()` since #697, but the mode has grown back to 80 renderer launches and 284 cases. Measured on an idle RTX 3070 with the D3D12 debug layer (per-phase table in #448): each `offscreen_check` launch costs about 0.25 s of start-up and each case about 0.03 s, so about 20 s of the 31-33 s (≈64 %) is renderer start-up; DXC is under 10 % and Python under 0.5 s. `draw-blend-scalar` and `draw-core` have the same per-launch and per-case cost; this mode is just the largest of the three. This PR moves the comparison and class draws into a new mode, `draw-comparisons`, registered as `pixel_aot_comparisons_{hardware,warp}`: - `check_f16_compare_draws`, `check_class_draw`, `check_predicate_draws`, `check_int_predicate_draws`, `check_unsigned_less_than_draws`, `check_int16_predicate_draws` and `check_sdwa_predicate_draws` are called from `check_comparison_draws()` instead of `check_predicate_and_rounding_draws()`. The helpers themselves are unchanged. - The new entries have the same 60 s timeout as the old one, skip code 77 when the renderer reports an unavailable adapter (as the newer entries such as `pixel_aot_cmp64_*` have) and their own `FORM_COVERAGE_RECORD` file. - `docs/experiments.md` names the new mode for the 16-bit comparison draws and records the measurement. No case, expected value or mismatch control changes; only the CTest entry that runs them moves. A per-process pipeline cache or a multi-shader batch in the renderer would cut start-up for every mode, but changes the renderer and its batch format, so I left it for a separate follow-up. Refs #448 ## Verification Base `325fe1e`, Windows 11 build 26200, MSVC 19.44, Windows SDK 10.0.26100 DXC, `dev` preset. RTX 3070 (`10de:2484`, driver 32.0.16.2101) and WARP (10.0.26100.9818), both `debug_layer=enabled`. Idle machine (CPU 7-15 % and GPU 3-7 % before each run), serial runs on the same build. ```powershell ctest --preset dev --no-tests=error -R '^pixel_aot_predicate_rounding_(hardware|warp)$' -V # on 325fe1e ctest --preset dev --no-tests=error -R '^pixel_aot_(predicate_rounding|comparisons)_(hardware|warp)$' -V # on this branch ``` | 3 serial runs | predicate_rounding hw | comparisons hw | predicate_rounding WARP | comparisons WARP | |---|---:|---:|---:|---:| | `main` `325fe1e` (one entry) | 33.21 / 31.75 / 31.58 s | — | 9.58 / 9.61 / 12.36 s | — | | this branch | 16.81 / 16.70 / 16.89 s | 15.36 / 15.28 / 15.17 s | 3.94 / 4.12 / 3.91 s | 5.93 / 5.97 / 5.95 s | All runs passed, with no skips or timeouts, and `debug_errors=0 debug_warnings=0` on every printed draw. The third WARP run on `main` (12.36 s) overlapped a short CPU spike to 60 % from another process; the hardware entry of that run was not affected. Each hardware entry goes from 53-55 % of its 60 s limit to 25-28 %. Same work before and after: wrapping `subprocess.run` and hashing every `.hlsl`, `.cso` and `.case` argument, `draw-predicate-rounding` on `325fe1e` and `draw-predicate-rounding` + `draw-comparisons` on this branch make the same 80 renderer calls (46 + 34) with identical shader and case bytes, exit codes and per-case `pass`/`mismatch` statuses (21 expected mismatches before, 6 + 15 after), and compile the same 84 HLSL sources (45 + 39), on both the RTX 3070 and WARP. The union of the two entries' `FORM_COVERAGE_RECORD` files equals the record of the single entry on `325fe1e` (212 first words), on both adapters. Also run on this branch: - `ctest --preset dev --no-tests=error -R '^pixel_aot_'`: 72/72 passed in 322.10 s, no skips or timeouts. The largest hardware entries in that run: `pixel_aot_compare_hardware` 39.74 s, `pixel_aot_hardware` 28.03 s, `pixel_aot_blend_scalar_hardware` 25.77 s, `pixel_aot_e64_hardware` 21.98 s, `pixel_aot_predicate_rounding_hardware` 18.91 s, `pixel_aot_comparisons_hardware` 15.27 s. - `python -B tests/pixel_aot_check.py` (controls), `tests/form_coverage_check.py` and `tests/docs_links_check.py`: all exit 0. - `git diff --check`: clean. - `git merge-tree` against each of the 39 open pull requests that touch `tests/pixel_aot_check.py`, `CMakeLists.txt` or `docs/experiments.md`: none conflicts with this branch unless it already conflicts with `main`. ## Evidence and follow-up No new fixtures. The timings depend on the adapter, driver, debug layer and machine load. The split roughly halves the work in each entry; the adapters near the limit in #448 should land around half of their previous time, but I have not measured them. ## 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. (No new fixture; existing mismatch controls are unchanged and still run.) - [x] I updated README/docs when a capability or build requirement changed. - [x] I did not include game files, dumps, distribution links or secrets. AI-assisted: yes.
upstream-sync closed this pull request 2026-11-24 06:44:59 +00:00
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!825
No description provided.