main()'s catch-all calls traceback.print_exc(), but the module never imported traceback. Any
exception a handler did not anticipate therefore raised NameError inside the except block, which
escaped main() and made Python exit 1: the code that means "the run completed and found a
mismatch". A calling script could not tell a crash from differing pixels.
tests/test_conformance_compare_crash.py makes a handler raise and checks both main()'s return
value and the exit status of the script (2, with the traceback and the "bug in compare.py" line,
and no NameError).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 9aece26a3e)
The shim reimplements D3D12 on Vulkan. runtime/test/ covers the device, resources,
views, copies, clears and barriers, but nothing checks that a *draw* produces the
same pixels as the host's D3D12. This adds the reference half of that check.
Seven deterministic scenes (clear, fullscreen, depth_order, scissor, blend, indexed),
each naming the exact pixels it must produce, so a mismatch is a coordinate rather
than 'the picture looks off'. tools/conformance/spec/scenes.h states the baseline
pipeline state every scene inherits - cull mode, topology, sample mask, viewport,
scissor convention, clip-space z range, row order - because two implementers
guessing differently produce two different images and neither is wrong on its own
terms.
native/ renders all seven with D3D12 and WIC, reads every pixel back from both the
GPU and the PNG on disk, and exits non-zero on any mismatch: 18 checks, 18 passes, on
an RTX 5070 Ti and on the AMD iGPU. compare.py (standard library only) checks a
render against the contract and diffs two renders with a heatmap.
The scenes are proven non-vacuous by scripts/negative-control.ps1: it disables the
depth test, the blend state and the scissor rect in a throwaway copy and requires
exactly depth_order, blend and scissor to fail at the pixels that name that state.
The script throws when a replacement stops matching, so a silenced edit cannot pass.
Against the shim at 2e5c0f2 the same scenes report clear OK and the five drawn scenes
BLOCKED at ID3D12Device::CreateRootSignature (E_NOTIMPL), which is the order the draw
path has to arrive in.
No game data is read, nothing is downloaded, and the harness is not part of CI: it
needs a D3D12 device, like root_signature_oracle_test.