shader: add dxil_retarget_probe_hardware test for GPU signing and dispatch #515
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/521"
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 alexander-src on 2026-11-22T08:53:24Z.
Change
Adds
dxil_retarget_probe_hardwareas a follow-up to@roansystemlabs's review note on #346 so contributors running CTest on physical GPUs automatically exercise re-signeddxil-ms-xb2pipeline creation and live compute dispatch on hardware (matching the repo's_hardwaretest pattern withSKIP_RETURN_CODE 77).tests/dxil_retarget_check.py: accept an optional 7th positional backend argument (warporhardware, defaulting towarpso existingdxil_retarget_probeinvocations stay unchanged). Onhardware, runroot_device_probe --compute-psowithout--warp-only, checkhardware_root/hardware_pso/hardware_shader_model, runoffscreen_check hardware --compute-root-file, and exit77whenroot_device_probeexits5(no compatible hardware adapter) oroffscreen_checkexits77.tests/dxil_retarget_check.py: add pure-Python mock controls verifying_probe_compute_psomaps exit5onhardwareto skip (None) while propagating exit5onwarpand non-adapter exit6onhardware.CMakeLists.txt,docs/experiments.md: registerdxil_retarget_probe_hardware(TIMEOUT 60,SKIP_RETURN_CODE 77) and document the hardware probe alongsidedxil_retarget_probe.Verification
Commit
7558bd2(Linux host, Python 3.13, no Windows GPU locally):python3 -B tests/dxil_retarget_check.py->pure-python dxil_retarget controls: okpython3 -B tests/docs_links_check.py->Checked 10 Markdown files and 102 links.python3 -B tests/bidi_controls_check.py->Checked 474 tracked source, script and build/CI files: no bidirectional controls.Windows CI exercises
dxil_retarget_controlsanddxil_retarget_probe(WARP) inbuild-and-test;dxil_retarget_probe_hardwareis excluded by CI's-E '_hardware$'filter and can be verified on a Windows GPU host withctest --preset dev --no-tests=error -R '^dxil_retarget_' -V.Evidence and follow-up
compute_root.csoandCopyBlocks.csofixtures (MIT license) and the same syntheticdxil-ms-xb2injection and negative controls as #346.CreateComputePipelineStateon the selected backend, thatoffscreen_check <backend> --compute-root-filerejects the unsigned container with exit1and"Create compute pipeline"in stderr, and that_probe_compute_psoonly turns exit5onhardwareinto a capability skip.Checklist
AI-assisted: yes.
Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-22T09:02:51Z.
Ran
dxil_retarget_probe_hardwareon a physical GPU, as the verification section asks.Environment. Windows 11 build 26200.9974, NVIDIA GeForce RTX 3070 (
10de:2484, Ampere), driver 32.0.16.2101, D3D12 debug layer enabled.devpreset (Debug, Ninja, MSVC Build Tools 2022, CMake/CTest 3.31.6), Python 3.12.10 withrequirements-dev.txt. Tested the PR head7558bd2merged locally onto currentmain(80a5dcc); the merge is clean andmainhas not touchedtests/dxil_retarget_check.py,tools/dxil_retarget.py,tools/root_device_probe.cpportests/offscreen_check.cppsince the PR's base.Result.
ctest --preset dev --no-tests=error -R '^dxil_retarget_' -V: 3/3 passed.The hardware path really runs on the GPU:
root_device_probe --compute-psoreportsadapter_id 10de:2484andhardware_shader_model 0x65, so theCopyBlocks.csoPSO checks are not skipped on this adapter. Theoffscreen_check hardwaredispatch printsadapter=NVIDIA GeForce RTX 3070,mismatches=0,debug_errors=0. With--repeat until-fail:10all three tests passed 10/10. Across all runs the hardware test took 3.6–4.0 s, well under itsTIMEOUT 60.Negative controls. I made two temporary local mutations to the test, then reverted them and checked that the tree matches the PR again:
hardware_pso 0x00000000hits the!= 0assertion). So the RTX 3070 driver itself rejects the 1-bit-tampered container, not only WARP.bad_rundispatch: the test fails (offscreen_check hardwareexits 0 withmismatches=0where exit 1 is expected). So the unsigned-container rejection on hardware is tested for real.I did not exercise the exit-77 skip path on a machine without a hardware adapter. It is covered only by the PR's mock controls, which pass.
Raw
ctest -Vlogs are available if useful.AI-assisted: run and prepared with the support of Roan System (AI-assisted development), reviewed before posting.
Imported from R0Y00/Xbox2Windows. Originally posted by alexander-src on 2026-11-22T09:08:08Z.
Thanks for verifying this on the RTX 3070 and running both negative-control mutations, @roansystemlabs. Good to confirm the NVIDIA driver itself rejects the 1-bit-tampered container and the unsigned dispatch path on hardware.