tests: replay the compiled gfx2hlsl compute cases in the GPU check package #2720
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2728"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T04:09:52Z.
Part of #1 (the hardware coverage thread, same GPU check package) and #1723 (shader cases).
What this unblocks: someone with a real AMD, NVIDIA or Intel card can run one command and get a pass/fail result for 23 translated compute shaders and 22 deliberately broken variants on their own adapter, with no compiler and no game data.
What changed
tools/record_gpu_cases.py <dxc> <dir>: for every case and every mutation control oftests/startup_gfx2hlsl_compute_check.pyit writes the DXCcs_6_0object and the case file thatoffscreen_check <warp|hardware> --compute-store-casereads, plusmanifest.tsv(id, compiler, expect pass/fail, pinned first bad word). It calls the check's ownrun_case(), so the bytes are the ones the dispatch tests send. It never touches a GPU.tools/package-gpu-check.ps1records the cases intocases/of the ZIP. The package smoke test now requires every recorded case to pass on WARP.tools/gpu-check/Run-GpuCheck.ps1replays the manifest with the same adapter filter and 60 s timeout, as one more report sectiongfx2hlsl_shaders_<backend>with a line per case. A control passes when the adapter rejects the wrong shader (exit 1 and anexpected=diagnostic, the pinned first bad word when the check pins one); a control that reproduces the unmutated output is a failure. Exit 77 is a skip.-NoShadersskips the block.tools/hardware_reports.pyparses: the shader result is a single section, so the coverage cells are unchanged.tests/gpu_case_recorder_check.py(new,gpu_case_recorder): records all cases with the real DXC and checks the manifest, the DXBC containers, the case sizes, that every control compiled to a different shader than its base case, and the pinned diagnostics.tests/hardware_reports_check.py: a report with the shader section raises the pass count, lists the failure by name, and leaves the cells alone.Why it is correct
The replay runs the same runner mode with the same files as the existing
startup_gfx2hlsl_compute_{warp,hardware}and..._<control>_{warp,hardware}tests and applies the same pass rule (exit 0 with no diagnostics; controls exit 1 withexpected=). Only the compiler step moves to the build.What this does not prove
*_hardwaretests on our Windows hosts run on the Basic Render Driver, which is WARP, so the replay path is proven there but a real card is not. Real-card rows have to come from contributors.Run-GpuCheck.ps1could not be run on the authoring host; it is exercised by the package smoke test.Verification
Linux, executed locally:
python3 -I tests/hardware_reports_check.py: 17 tests OK.python3 -I tests/gpu_case_recorder_check.py <stand-in compiler>: 23 cases and 22 controls recorded; with a compiler that ignores the source the control check fails as intended. The real DXC run is part of the Windows tests.remote_pycheck.sh <worktree> --pattern 'startup_gfx2hlsl_*check.py' --compare origin/main112 pass, 2 fail, 0 differ from main;hardware_reports*check.py0 differ.91c9281090accd1846419726578e776964610ec1:--preset dev) and release (--preset release): 34/34 tests passed each, includinggpu_case_recorder,hardware_reports,gpu_report_formatand everystartup_gfx2hlsl_compute*test.tools\package-gpu-check.ps1on that head: the extracted ZIP replayedcases: 45 pass, 0 fail, 0 skip of 45in the report sectiongfx2hlsl_shaders_warp(23 cases + 22 controls).Amakes the run exit 1 withFAIL: exit 1 word=0 expected=ea74e389 actual=ea74e376(section FAIL); replacing the shader of controlswapped-axesby the unmutated shader makes it reportFAIL: control not rejected: exit 0(exit 1);-NoShadersruns with exit 0 and no shader section.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T04:54:06Z.
Review: APPROVED
I reproduced exit 0 with no shader section when the prior packaged manifest was missing. With this update the missing and empty cases each return exit 1 with a specific error, and the explicit NoShaders run still succeeds. I regenerated all cases with SDK DXC and ran the package runner with the Release offscreen harness on WARP: 45/45, no skips, including all 22 controls; hardware report parsing passed 17/17. RonLogic independently tested the prior replay path on RTX 4070. The new change only adds the manifest preflight and clarifies packaging Python setup.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T04:22:31Z.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
91c9281090accd1846419726578e776964610ec1:--preset dev):cmake --build --preset dev --target offscreen_check -- -j 2):29.86s(configure2.55s)ctest --preset dev -R '^(gpu_case_recorder|gpu_report_format|hardware_reports|startup_gfx2hlsl_compute)' --parallel 6 --no-tests=error --output-on-failure): 34/34 passed (2.86s:startup_gfx2hlsl_compute_swapped-axes_warp0.22s,startup_gfx2hlsl_compute_dropped-store_warp0.22s,startup_gfx2hlsl_compute_controls0.41s,startup_gfx2hlsl_compute_b-offset_warp0.22s,startup_gfx2hlsl_compute_c-unpredicated_warp0.22s,startup_gfx2hlsl_compute_mbcnt_warp0.50s,startup_gfx2hlsl_compute_f-peer_warp0.21s,startup_gfx2hlsl_compute_g-swapped-offsets_warp0.21s,startup_gfx2hlsl_compute_f-broadcast_warp0.22s,startup_gfx2hlsl_compute_g-overlap_warp0.22s,startup_gfx2hlsl_compute_j-scalar-dropped_warp0.22s,startup_gfx2hlsl_compute_h-inner-unpredicated_warp0.22s,startup_gfx2hlsl_compute_k-block-entered_warp0.22s,startup_gfx2hlsl_compute_m-else-unswitched_warp0.22s,startup_gfx2hlsl_compute_n-dropped-broadcast_warp0.21s,startup_gfx2hlsl_compute_swapped-axes_hardware0.21s,startup_gfx2hlsl_compute_dropped-store_hardware0.21s,startup_gfx2hlsl_compute_mbcnt_hardware0.48s,startup_gfx2hlsl_compute_b-offset_hardware0.22s,startup_gfx2hlsl_compute_c-unpredicated_hardware0.23s,startup_gfx2hlsl_compute_f-peer_hardware0.21s,startup_gfx2hlsl_compute_f-broadcast_hardware0.21s,startup_gfx2hlsl_compute_g-swapped-offsets_hardware0.21s,startup_gfx2hlsl_compute_warp1.78s,startup_gfx2hlsl_compute_g-overlap_hardware0.20s,startup_gfx2hlsl_compute_j-scalar-dropped_hardware0.21s,startup_gfx2hlsl_compute_h-inner-unpredicated_hardware0.21s,startup_gfx2hlsl_compute_k-block-entered_hardware0.21s,startup_gfx2hlsl_compute_m-else-unswitched_hardware0.21s,startup_gfx2hlsl_compute_n-dropped-broadcast_hardware0.20s,gpu_report_format0.16s,hardware_reports0.20s,startup_gfx2hlsl_compute_hardware1.73s,gpu_case_recorder2.75s)/O2(--preset release):cmake --build --preset release --target offscreen_check -- -j 2):29.46s(configure1.55s)ctest --preset release -R '^(gpu_case_recorder|gpu_report_format|hardware_reports|startup_gfx2hlsl_compute)' --parallel 6 --no-tests=error --output-on-failure): 34/34 passed (3.03s:startup_gfx2hlsl_compute_dropped-store_warp0.20s,startup_gfx2hlsl_compute_swapped-axes_warp0.21s,startup_gfx2hlsl_compute_controls0.37s,startup_gfx2hlsl_compute_b-offset_warp0.22s,startup_gfx2hlsl_compute_c-unpredicated_warp0.22s,startup_gfx2hlsl_compute_mbcnt_warp0.49s,startup_gfx2hlsl_compute_f-peer_warp0.22s,startup_gfx2hlsl_compute_f-broadcast_warp0.22s,startup_gfx2hlsl_compute_g-swapped-offsets_warp0.22s,startup_gfx2hlsl_compute_g-overlap_warp0.22s,startup_gfx2hlsl_compute_j-scalar-dropped_warp0.22s,startup_gfx2hlsl_compute_h-inner-unpredicated_warp0.22s,startup_gfx2hlsl_compute_k-block-entered_warp0.22s,startup_gfx2hlsl_compute_m-else-unswitched_warp0.22s,startup_gfx2hlsl_compute_n-dropped-broadcast_warp0.22s,startup_gfx2hlsl_compute_swapped-axes_hardware0.22s,startup_gfx2hlsl_compute_dropped-store_hardware0.22s,startup_gfx2hlsl_compute_b-offset_hardware0.23s,startup_gfx2hlsl_compute_mbcnt_hardware0.51s,startup_gfx2hlsl_compute_c-unpredicated_hardware0.23s,startup_gfx2hlsl_compute_f-broadcast_hardware0.21s,startup_gfx2hlsl_compute_f-peer_hardware0.22s,startup_gfx2hlsl_compute_g-swapped-offsets_hardware0.21s,startup_gfx2hlsl_compute_warp1.81s,startup_gfx2hlsl_compute_g-overlap_hardware0.22s,startup_gfx2hlsl_compute_j-scalar-dropped_hardware0.23s,startup_gfx2hlsl_compute_h-inner-unpredicated_hardware0.22s,startup_gfx2hlsl_compute_k-block-entered_hardware0.22s,startup_gfx2hlsl_compute_m-else-unswitched_hardware0.22s,startup_gfx2hlsl_compute_n-dropped-broadcast_hardware0.22s,gpu_report_format0.17s,hardware_reports0.22s,startup_gfx2hlsl_compute_hardware1.81s,gpu_case_recorder2.91s)tests/hardware_reports_check.pyok (0.3s)sccache: 0/4 hits; wall74.1sAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T04:22:37Z.
@MasterDomino #2728 is ready for review and merge.
91c9281090accd1846419726578e776964610ec1, CI green.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-26T04:22:56Z.
Independent Windows verification at
91c9281090accd1846419726578e776964610ec1. Built Releaseoffscreen_checkwith MSVC and the static CRT, recorded all cases with real DXC, then ran the unchangedRun-GpuCheck.ps1from the extracted ZIP.1414:008c, driver10.0.26100.10068bvh_wave64skipped10de:2786, driver32.0.16.2124bvh_wave64skippedBoth runs exited 0 with the D3D12 debug layer enabled.
gpu_case_recorder_check.pypassed with real DXC, andhardware_reports_check.pypassed 17/17. Removingcontrol-swapped-axes.csofrom the extracted copy changed the WARP report to 44 pass / 1 fail and exit 1, naming the missing shader. With-NoShaders, WARP returned 0 and omitted the replay section.Scope: the managed shell lost an empty injected Git config value when the packaging script entered the VS shell. I repeated its build, stage, archive and extract steps directly and ran the extracted package unchanged.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-26T04:22:50Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
91c9281ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.