Skip to content

test: Shrink the example triangle to demonstrate the rendering comparison - #3

Closed
stephanmeesters wants to merge 2 commits into
mainfrom
demo/rendering-triangle-shrink
Closed

stephanmeesters wants to merge 2 commits into
mainfrom
demo/rendering-triangle-shrink

Conversation

@stephanmeesters

Copy link
Copy Markdown
Owner

Demo PR on the fork, not for merging. It shrinks the example triangle around its centroid, so the Triangle test still passes but triangle.png changes. The Rendering Check should report it as changed compared with the main commit and show the difference in the report.

🤖 Generated with Claude Code

…ompare them with the base commit

Add a RenderingTest fixture that creates a real D3D8 device with an offscreen
render target once for all rendering tests, and restores the default device
state before each test. Its helpers clear the target, draw colored triangles,
and capture the target as a PNG image with its pixels for checks. Each test
lives in a file of its own; the temporary Clear and Triangle examples show how
to write them. The CTest step of CI skips the RenderingTest suite;
instead the plain win32 build uploads the Google Test executables and the new
Rendering Check jobs in GenCI run them on a Windows runner under DXVK and Mesa
lavapipe. The DXVK, Mesa and Vulkan loader downloads are pinned, so the
rendering does not change with the runner image.

The rendering check also runs the tests of the base commit, downloaded from its
earlier GenCI run, under the same DXVK and Mesa. The base is the previous main
commit for a push and the merge base with main otherwise, falling back to the
nearest ancestor with a package. The check compares the PNG files and uploads
one unzipped HTML page with the base, new and difference images inline, which
opens in the browser. The message of the check and the job summary link to it.
A changed or missing image fails the
check of a pull request, so reviewers look at the report; on main it is a
warning, because main becomes the base of later changes. No reference images
are stored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ison

The triangle keeps its centroid, so the test still passes while its image changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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