Skip to content

tools(conformance): fix the four review findings that merged after the first revision - #6360

Open
biglill wants to merge 1 commit into
ItsNotRexed:mainfrom
biglill:conformance-review-fixes
Open

biglill wants to merge 1 commit into
ItsNotRexed:mainfrom
biglill:conformance-review-fixes

Conversation

@biglill

@biglill biglill commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Four review findings were fixed after #3343 merged at its first revision, so main still carries them. This is the fix commit that was on the branch but not in the merge.

  • compare.py: called traceback.print_exc() without importing traceback, so an unexpected exception raised NameError inside the handler and exited 1 — the code for "the pixels differ". Now exits 2 with this is a bug in compare.py, not a pixel mismatch.
  • native/scripts/negative-control.ps1: configured its throwaway copy without -DCONFORM_SPEC_DIR, so CMake's default ../spec resolved to native/spec, which does not exist. The negative control could not run from this tree. It now passes the repository's spec directory and fails loudly if configure does not succeed.
  • native/scripts/verify.ps1: asserted this machine's adapter names, so it reported BROKEN anywhere else. They are parameters now and the checks are skipped when unset; the render checks still run.
  • spec/scenes.h: the indexed gap check sat at (128,240), below both triangles' vertical span, and was clear whether or not the index buffer was read. Moved to (128,200), inside the span: the indexed draw leaves it clear and drawing the vertex buffer in order fills it.
  • README.md: six scenes, not seven, and the status section no longer quotes a measurement taken before the shim's draw path landed.

Verification:

compare.py selftest                passed, exit 0
200,000-deep manifest, expect      exit 2, "this is a bug in compare.py, not a pixel mismatch"
(128,200) indexed gap, pixel-centre check:
    correct-index draw covers=False    unindexed draw covers=True

The native rebuild and the negative-control transcript are not in this description: the Windows machine used for them is offline. They will be added here when it is back.

…ath in the negative control, adapter assumptions, and a gap check that tested nothing

Five findings from review, four of them real defects:

1. compare.py called traceback.print_exc() without importing traceback, so an
   unexpected exception raised NameError inside the handler and exited 1 - the code
   for 'the pixels differ'. Verified: a 200000-deep nested manifest now exits 2 with
   'this is a bug in compare.py, not a pixel mismatch'.

2. negative-control.ps1 copied native/ into native/negative-control/ and configured
   it without -DCONFORM_SPEC_DIR, so CMake's default ../spec resolved inside native/
   where no spec exists. Configure would have failed and the script reported BUILD
   FAILED, meaning the negative-control evidence could not be reproduced from this
   tree at all. It now passes the repository's spec directory and checks the
   configure exit code.

3. verify.ps1 asserted this machine's adapter names (AMD Radeon, RTX 5070 Ti), so it
   failed on any other machine even when every pixel check passed. The names are now
   parameters; without them the two checks are skipped and the render checks still run.

4. The indexed gap check sat at (128,240), which is below both triangles' vertical
   span and is clear whether or not the index buffer is read - it proved nothing.
   Moved to (128,200), inside the span: the indexed draw leaves it clear, and drawing
   the six vertices in order fills it, so the check now catches an ignored index
   buffer. Confirmed against the contract geometry at pixel centres.

5. The status section claimed every drawn scene stops at CreateRootSignature. That is
   stale: main now parses RTS0 in CreateRootSignature and runtime/test/d3d12_draw_test.cpp
   already compares indexed-draw readback. The section now says what is actually
   missing - running these scenes through the shim - instead of quoting a measurement
   taken against an older commit.

Also: six scenes, not seven. The table listed six and the prose said seven.
@biglill

biglill commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Transcripts from 613897a0, built and run on the branch itself (not the pre-merge revision).

$ cmake --build tools/conformance/native/build --config Release
$ conform_native.exe tools/conformance/native/out/ci
adapter: NVIDIA GeForce RTX 5070 Ti
readback checks: 18 passed, 0 failed
png checks:      18 passed, 0 failed
RESULT: PASS
exit=0
$ compare.py selftest
selftest passed
exit=0

$ compare.py expect --manifest native/out/ci/manifest.json
6 scenes, 18 checks: 18 passed, 0 failed
exit=0
$ scripts/negative-control.ps1
FAIL png scene=blend (128,128) expected 105,25,45,255 actual 200,30,60,128  0.5*(200,30,60) + 0.5*(10,20,30) = (105,25,45)
FAIL png scene=blend (8,8) expected 105,25,45,255 actual 200,30,60,128  blending applies everywhere the triangle covers
readback checks: 11 passed, 7 failed
RESULT: FAIL
EXITCODE 1
NEGATIVE CONTROL PASSED: exactly blend, depth_order, scissor failed

The negative control now configures and runs; before this commit it stopped at CMake's FATAL_ERROR because the throwaway copy looked for native/spec. The indexed check moved to (128,200) is part of the same run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant