Commit Graph

11 Commits

Author SHA1 Message Date
85149ce1a7 conformance: harden unexpected input and crash paths
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-29 10:24:27 +00:00
6068ed561a conformance expect: report unreadable images as input errors 2026-11-29 10:24:27 +00:00
6a296b98c2 Merge pull request #1327 from fin-github/codex/draft-259
conformance: validate PNG chunk structure before reading pixels (DRAFT-259)
2026-11-28 15:29:40 +01:00
a1373668f5 Merge pull request #1324 from fin-github/codex/draft-114
conformance: preserve traceback and exit 2 for unexpected exceptions (DRAFT-114)
2026-11-28 15:29:11 +01:00
2130199f1b conformance: reject diff heatmap path collisions 2026-11-26 23:04:27 +01:00
5543594a99 Reject non-letter PNG chunk types after review
(cherry picked from commit 48a5f2bd9b)
2026-11-24 16:54:59 -05:00
e7b24a6fe0 Reject invalid critical PNG chunk structure in conformance reads
(cherry picked from commit b14531aab3)
2026-11-24 16:54:59 -05:00
99468371e8 conformance/compare.py: import traceback, so an unexpected crash exits 2 and not the mismatch code 1
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)
2026-11-24 16:51:43 -05:00
6e44990c0d conformance: reject duplicate keys in renderer manifests (#6858)
Squash-merged after diff review of PR #6858 - conformance: reject duplicate keys in renderer manifests
2026-11-23 09:51:32 -06:00
6e0c2f2159 conformance: reject PNG transparency that would be silently ignored (#6342)
Squash-merged after review of PR #6342 - conformance: reject tRNS PNGs instead of silently comparing them as opaque
2026-11-23 08:06:28 -06:00
df6188194a tools: a native-D3D12 golden-image conformance harness for the Vulkan device
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.
2026-11-22 15:10:17 -05:00