tests: batch heap-view load readbacks by shader #2627

Merged
RavenCurseBurg merged 2 commits from upstream-pr/2635 into main 2026-11-26 00:04:21 +00:00
RavenCurseBurg commented 2026-11-25 23:53:11 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T23:53:11Z.


Change

Refs #448. compute_store_aot_heap_view_load ran 77 renderer processes for two fixed shaders and fourteen independently recompiled mutations. It now runs the fixed references in one batch per shader and each mutation in its own process, for 16 launches. The 56 matching cases still cover one and two dispatch groups for every XY and XYZW view slot, including the selection past the table.

The summary now reports all seven wrong references. The previous run counted three zero-publication controls in its final message while it executed four. For each of those four, and the three intentionally incorrect addressing models, the test checks the index, expected value and actual value at the first differing word. Each diagnostic identifies the suffix, slot and case. The batch helper from #2615 now takes the fixture name so both callers identify themselves.

Verification

  • cmake --build --preset release --target offscreen_check and ctest --preset release -V --no-tests=error -R '^compute_(heap_view_controls|store_aot_(descriptor_load_format|heap_view_(load|store))_warp)$' exercise the CPU controls, both batch callers and the independent heap-view store fixture. Windows Server 2025 Release run, including alternating full-fixture timings
  • On Windows 11 build 26100.9711, I ran python -B tests/compute_heap_view_check.py draw <dxc.exe> <offscreen_check.exe> <adapter> with the same renderer for the original and candidate on RTX 4060 (32.0.15.9579), Intel UHD 770 (32.0.101.5973) and WARP (10.0.26100.9711). On each adapter I recorded the shader and input bytes, status, 320-word summary and first wrong word for every dispatch. All 77 records and all 16 HLSL/DXIL pairs matched, including duplicate records and the 14 shader mutations. The desktop debug layer was unavailable.

Evidence and follow-up

All four hosted CTests passed. On the same Windows Server runner with the debug layer, three interleaved WARP runs took 11.86, 11.46 and 11.51 s on the baseline and 7.87, 7.84 and 8.30 s on this branch. The median fell from 11.51 to 7.87 s (31.6%). On desktop WARP, after one warm-up per side, the median of three runs fell from 20.735 to 11.276 s (45.6%). How to run the fixture

On the same desktop, three timed pairs following one warm-up on each side gave median 38.189 → 17.113 s on RTX 4060 (55.2% lower) and 50.284 → 18.201 s on Intel UHD 770 (63.8% lower).

The test uses the existing source-generated shader and CPU reference. The changes affect the test runner and its documentation. AI-assisted with Codex (GPT-6.2 Astra, xhigh).

Checklist

  • One reviewable behavior.
  • Commands and results included.
  • Seven wrong references and fourteen shader mutations exercised.
  • Fixture documentation updated.
  • Public synthetic inputs only.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6616216710 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2635). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T23:53:11Z. --- ## Change Refs #448. `compute_store_aot_heap_view_load` ran 77 renderer processes for two fixed shaders and fourteen independently recompiled mutations. It now runs the fixed references in one batch per shader and each mutation in its own process, for 16 launches. The 56 matching cases still cover one and two dispatch groups for every XY and XYZW view slot, including the selection past the table. The summary now reports all seven wrong references. The previous run counted three zero-publication controls in its final message while it executed four. For each of those four, and the three intentionally incorrect addressing models, the test checks the index, expected value and actual value at the first differing word. Each diagnostic identifies the suffix, slot and case. The batch helper from #2615 now takes the fixture name so both callers identify themselves. ## Verification - `cmake --build --preset release --target offscreen_check` and `ctest --preset release -V --no-tests=error -R '^compute_(heap_view_controls|store_aot_(descriptor_load_format|heap_view_(load|store))_warp)$'` exercise the CPU controls, both batch callers and the independent heap-view store fixture. [Windows Server 2025 Release run, including alternating full-fixture timings](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45724010576) - On Windows 11 build 26100.9711, I ran `python -B tests/compute_heap_view_check.py draw <dxc.exe> <offscreen_check.exe> <adapter>` with the same renderer for the original and candidate on RTX 4060 (32.0.15.9579), Intel UHD 770 (32.0.101.5973) and WARP (10.0.26100.9711). On each adapter I recorded the shader and input bytes, status, 320-word summary and first wrong word for every dispatch. All 77 records and all 16 HLSL/DXIL pairs matched, including duplicate records and the 14 shader mutations. The desktop debug layer was unavailable. ## Evidence and follow-up All four hosted CTests passed. On the same Windows Server runner with the debug layer, three interleaved WARP runs took 11.86, 11.46 and 11.51 s on the baseline and 7.87, 7.84 and 8.30 s on this branch. The median fell from 11.51 to 7.87 s (31.6%). On desktop WARP, after one warm-up per side, the median of three runs fell from 20.735 to 11.276 s (45.6%). [How to run the fixture](https://github.com/RavenCurseBurg/Xbox2Windows/blob/76dd27e11ed85e29daaadabb3bdcf5216adf0478/docs/experiments.md#L6277) On the same desktop, three timed pairs following one warm-up on each side gave median 38.189 → 17.113 s on RTX 4060 (55.2% lower) and 50.284 → 18.201 s on Intel UHD 770 (63.8% lower). The test uses the existing source-generated shader and CPU reference. The changes affect the test runner and its documentation. AI-assisted with Codex (GPT-6.2 Astra, xhigh). ## Checklist - [x] One reviewable behavior. - [x] Commands and results included. - [x] Seven wrong references and fourteen shader mutations exercised. - [x] Fixture documentation updated. - [x] Public synthetic inputs only.
tedin7 commented 2026-11-26 00:01:08 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T23:57:57Z.

Review: COMMENTED


Review of head 76dd27e1 against main (comment only, no code changes).

What I checked:

  • check_references now takes the fixture name; both callers (compute_load_format_check.py:416, compute_heap_view_check.py:296) pass it. No other callers in tests/.
  • Fixed references are batched per shader (two batches). The seven wrong references (four zero-publication controls, three wrong addressing models) now go through the batch, and each carries a first-differing-word diagnostic that the batch checker requires in the output. A reference that equals the expected words is still rejected.
  • Mutated sources keep their own process each, so a mutation still has to fail with Compute readback differs.
  • The final summary count is computed from the cases, so it now reports 7 wrong references instead of the hard-coded 3 + len(WRONG).
  • Test-only change plus a short docs note. Real D3D12 WARP readback is unchanged, nothing is string-only.

Commands run locally on this head (Linux): syntax parse of both tests, python3 tests/docs_links_check.py (507 links ok), python3 tests/bidi_controls_check.py (clean), git diff --check origin/main...HEAD (clean). The WARP fixtures themselves run in the Windows receipt, which I post separately.

No blocking findings.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6066681340 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2635#pullrequestreview-6066681340). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T23:57:57Z. **Review:** COMMENTED --- Review of head 76dd27e1 against main (comment only, no code changes). What I checked: - `check_references` now takes the fixture name; both callers (`compute_load_format_check.py:416`, `compute_heap_view_check.py:296`) pass it. No other callers in tests/. - Fixed references are batched per shader (two batches). The seven wrong references (four zero-publication controls, three wrong addressing models) now go through the batch, and each carries a first-differing-word diagnostic that the batch checker requires in the output. A reference that equals the expected words is still rejected. - Mutated sources keep their own process each, so a mutation still has to fail with `Compute readback differs`. - The final summary count is computed from the cases, so it now reports 7 wrong references instead of the hard-coded 3 + len(WRONG). - Test-only change plus a short docs note. Real D3D12 WARP readback is unchanged, nothing is string-only. Commands run locally on this head (Linux): syntax parse of both tests, `python3 tests/docs_links_check.py` (507 links ok), `python3 tests/bidi_controls_check.py` (clean), `git diff --check origin/main...HEAD` (clean). The WARP fixtures themselves run in the Windows receipt, which I post separately. No blocking findings. AI-assisted; commands listed were executed locally.
upstream-sync closed this pull request 2026-11-26 01:01:58 +00:00
tedin7 commented 2026-11-26 01:02:09 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T00:04:16Z.


Win2025 WARP receipt for head 91a16f18 after updating with main. A first run with the build skipped used an out-of-date renderer and failed; the full-build rerun below passed.

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit 91a16f1864fbbf9d5e44c67675e59a098b8449bc:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev -- -j 2): 61.33s (configure 1.92s)
    • Test (ctest --preset dev -R '^compute_(heap_view_controls|store_aot_(descriptor_load_format|heap_view_(load|store))_warp)$' --parallel 6 --no-tests=error --output-on-failure): 4/4 passed (11.00s: compute_heap_view_controls 0.78s, compute_store_aot_heap_view_load_warp 3.93s, compute_store_aot_heap_view_store_warp 10.38s, compute_store_aot_descriptor_load_format_warp 10.86s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release -- -j 2): 74.85s (configure 0.00s)
    • Test (ctest --preset release -R '^compute_(heap_view_controls|store_aot_(descriptor_load_format|heap_view_(load|store))_warp)$' --parallel 6 --no-tests=error --output-on-failure): 4/4 passed (11.26s: compute_heap_view_controls 0.59s, compute_store_aot_heap_view_load_warp 3.14s, compute_store_aot_heap_view_store_warp 9.89s, compute_store_aot_descriptor_load_format_warp 11.13s)
  • Windows Python checks: tests/compute_heap_view_check.py ok (0.4s), tests/compute_load_format_check.py ok (0.5s)
  • sccache: 218/229 hits; wall 154.7s

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7178362140 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2635#issuecomment-7178362140). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T00:04:16Z. --- Win2025 WARP receipt for head 91a16f18 after updating with main. A first run with the build skipped used an out-of-date renderer and failed; the full-build rerun below passed. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `91a16f1864fbbf9d5e44c67675e59a098b8449bc`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev -- -j 2`): `61.33s` (configure `1.92s`) - Test (`ctest --preset dev -R '^compute_(heap_view_controls|store_aot_(descriptor_load_format|heap_view_(load|store))_warp)$' --parallel 6 --no-tests=error --output-on-failure`): **4/4 passed** (`11.00s`: `compute_heap_view_controls` `0.78s`, `compute_store_aot_heap_view_load_warp` `3.93s`, `compute_store_aot_heap_view_store_warp` `10.38s`, `compute_store_aot_descriptor_load_format_warp` `10.86s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release -- -j 2`): `74.85s` (configure `0.00s`) - Test (`ctest --preset release -R '^compute_(heap_view_controls|store_aot_(descriptor_load_format|heap_view_(load|store))_warp)$' --parallel 6 --no-tests=error --output-on-failure`): **4/4 passed** (`11.26s`: `compute_heap_view_controls` `0.59s`, `compute_store_aot_heap_view_load_warp` `3.14s`, `compute_store_aot_heap_view_store_warp` `9.89s`, `compute_store_aot_descriptor_load_format_warp` `11.13s`) - **Windows Python checks**: `tests/compute_heap_view_check.py` ok (`0.4s`), `tests/compute_load_format_check.py` ok (`0.5s`) - `sccache`: 218/229 hits; wall `154.7s` 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!2627
No description provided.