tests: run different pixel shaders on one device in offscreen_check #2525

Manually merged
github merged 1 commit from gh-pr/2525/head into gh-pr/2525/base 2026-11-27 00:59:29 +00:00
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-25 20:00 UTC · original
RavenCurseBurg:tests/multi-shader-pixel-batch → main · +96 −5 · 4 files · 1 commits · merged 2026-11-25 20:13 UTC

Change

Refs #448. The existing pixel batch creates one D3D12 device per compiled shader. The new opt-in operation accepts ordered shader/reference pairs and runs all pairs on one device.

offscreen_check <hardware|warp> --check-pixel-pairs <shader> <case> [<shader> <case> ...]

Each result carries its case index. On stderr the renderer names the case and shader before drawing, and the existing batch loop checks the debug queue and device state after each draw. The exit code is 1 if any draw mismatches or errors. An incomplete pair is rejected during CLI validation.

Verification

Tested commit 3ac087b05bddc78daa16783dfee318e41d841583. The new fixture compared four isolated draws with one mixed batch. Changing the shader for the second reference gave pass, mismatch, pass, pass. The matching pair-only run exited 0. With an absent middle shader, the statuses were pass, error, pass.

  • Windows Server 2025, Debug, WARP, D3D12 debug layer enabled. All four selected CTests passed, including the original case-local debug message and device removal controls. Windows run
  • Windows 11 26100.9711, debug layer unavailable. The new fixture passed on Intel UHD Graphics 770 (32.0.101.5973), GeForce RTX 4060 (32.0.15.9579) and WARP (10.0.26100.9711). DXC 1.9.2609.5. The standalone CLI self-test passed. The executable was built from the commit above using the dev preset and static Debug CRT.
ctest --preset dev -j 1 --no-tests=error -V -R '^(offscreen_capability_table_self_test|pixel_batch_(pairs|debug|removal)_warp)$'
python -B tests/pixel_batch_pairs_check.py $dxc $renderer hardware
python -B tests/pixel_batch_pairs_check.py $dxc $renderer warp
python -B tests/docs_links_check.py

The link check passed for 19 documents and 475 links. git diff --check passed.

Timing on existing draws

I replayed the eight compiled integer-predicate shader groups from check_int_predicate_draws against their original 33 references. Both paths produced 32 passes and the same expected mismatch on every run. The ordered shader/reference/expectation digest was identical on all three adapters. The table gives three warm serial repetitions with the order of the two paths alternated. It measures renderer time for these 33 draws and excludes compilation. Reproduction script

Adapter Eight existing single-shader batches (s) One mixed batch (s)
Intel UHD 770 2.76 / 2.98 / 3.01 0.63 / 0.59 / 0.71
RTX 4060 4.22 / 5.27 / 4.39 1.77 / 1.60 / 1.69
WARP 0.80 / 0.86 / 0.86 0.21 / 0.21 / 0.21

The production fixture migration can use this operation as the second part of #448. The four-CTest headroom comparison is tracked on the issue.

AI-assisted with Codex (session label GPT-6.2 Astra xhigh).

**@⁠RavenCurseBurg** on GitHub · 2026-11-25 20:00 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2525) `RavenCurseBurg:tests/multi-shader-pixel-batch` → `main` · +96 −5 · 4 files · 1 commits · merged 2026-11-25 20:13 UTC ## Change Refs #448. The existing pixel batch creates one D3D12 device per compiled shader. The new opt-in operation accepts ordered shader/reference pairs and runs all pairs on one device. ```text offscreen_check <hardware|warp> --check-pixel-pairs <shader> <case> [<shader> <case> ...] ``` Each result carries its case index. On stderr the renderer names the case and shader before drawing, and the existing batch loop checks the debug queue and device state after each draw. The exit code is 1 if any draw mismatches or errors. An incomplete pair is rejected during CLI validation. ## Verification Tested commit `3ac087b05bddc78daa16783dfee318e41d841583`. The new fixture compared four isolated draws with one mixed batch. Changing the shader for the second reference gave `pass, mismatch, pass, pass`. The matching pair-only run exited 0. With an absent middle shader, the statuses were `pass, error, pass`. - Windows Server 2025, Debug, WARP, D3D12 debug layer enabled. All four selected CTests passed, including the original case-local debug message and device removal controls. [Windows run](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45689770884) - Windows 11 26100.9711, debug layer unavailable. The new fixture passed on Intel UHD Graphics 770 (32.0.101.5973), GeForce RTX 4060 (32.0.15.9579) and WARP (10.0.26100.9711). DXC 1.9.2609.5. The standalone CLI self-test passed. The executable was built from the commit above using the dev preset and static Debug CRT. ```powershell ctest --preset dev -j 1 --no-tests=error -V -R '^(offscreen_capability_table_self_test|pixel_batch_(pairs|debug|removal)_warp)$' python -B tests/pixel_batch_pairs_check.py $dxc $renderer hardware python -B tests/pixel_batch_pairs_check.py $dxc $renderer warp python -B tests/docs_links_check.py ``` The link check passed for 19 documents and 475 links. `git diff --check` passed. ## Timing on existing draws I replayed the eight compiled integer-predicate shader groups from `check_int_predicate_draws` against their original 33 references. Both paths produced 32 passes and the same expected mismatch on every run. The ordered shader/reference/expectation digest was identical on all three adapters. The table gives three warm serial repetitions with the order of the two paths alternated. It measures renderer time for these 33 draws and excludes compilation. [Reproduction script](https://github.com/RavenCurseBurg/Xbox2Windows/blob/323fe555e767a47f124fe2e3bcc1efa7a25584c2/tests/measure_pixel_pairs.py) | Adapter | Eight existing single-shader batches (s) | One mixed batch (s) | | --- | --- | --- | | Intel UHD 770 | 2.76 / 2.98 / 3.01 | 0.63 / 0.59 / 0.71 | | RTX 4060 | 4.22 / 5.27 / 4.39 | 1.77 / 1.60 / 1.69 | | WARP | 0.80 / 0.86 / 0.86 | 0.21 / 0.21 / 0.21 | The production fixture migration can use this operation as the second part of #448. The four-CTest headroom comparison is tracked on the issue. AI-assisted with Codex (session label `GPT-6.2 Astra xhigh`).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:59:28 +00:00
github manually merged commit 3ac087b05b into gh-pr/2525/base 2026-11-27 00:59:29 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.