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

Merged
RavenCurseBurg merged 1 commit from upstream-pr/2525 into main 2026-11-25 20:13:25 +00:00
RavenCurseBurg commented 2026-11-25 20:00:34 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T20:00:34Z.


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).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6612635067 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2525). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T20:00:34Z. --- ## 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`).
upstream-sync closed this pull request 2026-11-25 21:01:16 +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!2517
No description provided.