mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 17:58:38 +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.
29 lines
821 B
Batchfile
Executable File
29 lines
821 B
Batchfile
Executable File
@echo off
|
|
setlocal
|
|
set EXE=%~dp0..\build\Release\conform_native.exe
|
|
set ROOT=%~dp0..\out\failures
|
|
set LOG=%~dp0..\out\failures.log
|
|
if exist "%ROOT%" rmdir /s /q "%ROOT%"
|
|
mkdir "%ROOT%"
|
|
|
|
> "%LOG%" echo === output path is an existing file
|
|
echo not a directory> "%ROOT%\blocked"
|
|
"%EXE%" "%ROOT%\blocked">> "%LOG%" 2>&1
|
|
>> "%LOG%" echo EXITCODE %errorlevel%
|
|
del "%ROOT%\blocked"
|
|
|
|
>> "%LOG%" echo.
|
|
>> "%LOG%" echo === shader directory with no .cso files
|
|
mkdir "%ROOT%\no-shaders"
|
|
"%EXE%" "%ROOT%\shader-failure" --shaders "%ROOT%\no-shaders">> "%LOG%" 2>&1
|
|
>> "%LOG%" echo EXITCODE %errorlevel%
|
|
|
|
>> "%LOG%" echo.
|
|
>> "%LOG%" echo === PNG path occupied by a directory
|
|
mkdir "%ROOT%\png-blocked"
|
|
mkdir "%ROOT%\png-blocked\clear.png"
|
|
"%EXE%" "%ROOT%\png-blocked">> "%LOG%" 2>&1
|
|
>> "%LOG%" echo EXITCODE %errorlevel%
|
|
|
|
type "%LOG%"
|