mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 20:38:37 +00:00
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.
13 lines
483 B
PowerShell
13 lines
483 B
PowerShell
param(
|
|
[string]$Output = '',
|
|
[string[]]$Extra = @()
|
|
)
|
|
# Renders every scene into $Output (default: <repo>/tools/conformance/native/out/run1).
|
|
$ErrorActionPreference = 'Continue'
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
if ([string]::IsNullOrEmpty($Output)) { $Output = Join-Path $root 'out/run1' }
|
|
$exe = Join-Path $root 'build/Release/conform_native.exe'
|
|
if (Test-Path $Output) { Remove-Item $Output -Recurse -Force }
|
|
& $exe $Output @Extra
|
|
Write-Output "EXITCODE $LASTEXITCODE"
|