Skip to content

ci(test): Add rendering unit tests for DX8 and bgfx - #4

Closed
stephanmeesters wants to merge 1 commit into
bobtista-trunkfrom
ci/rendering-tests-bgfx
Closed

stephanmeesters wants to merge 1 commit into
bobtista-trunkfrom
ci/rendering-tests-bgfx

Conversation

@stephanmeesters

Copy link
Copy Markdown
Owner

Runs the rendering tests from ci/rendering-tests on bobtista's trunk for four backends and shows their images side by side: DX8, and bgfx with Direct3D 11, Direct3D 12 and Vulkan.

The base branch bobtista-trunk is a copy of bobtista/topic/trunk at e7e111c. trunk has no googletest setup, so this adds only what the rendering tests need instead of squashing the upstream commits it is missing.

  • Tests: the fixture now goes through the render backend instead of raw D3D8. It clears with IRenderBackend::Clear, draws the triangle with Render2DClass, and reads the image back with Capture_Back_Buffer_Image on DX8 or bgfx's own screenshot.
  • Workflow: check-rendering.yml runs on pull requests. It builds z_googletest three times (x86: DX8, bgfx dx11, bgfx vulkan); Direct3D 12 runs the dx11 build, because bgfx gives both the same shaders. It runs DX8 on DXVK and lavapipe, Vulkan on lavapipe, and Direct3D 11 and 12 on WARP.
  • Report: one row per test and one column per backend, with each bgfx image's difference from DX8. The check fails when a backend's tests fail; differences alone don't fail it.

Found while running it locally under Wine (to be confirmed here on Windows):

  • bgfx ignores the clear color on the back buffer and clears to black, so the Clear test and the backgrounds of the blending, texture and text tests differ.
  • The laser and the particles render nothing on bgfx until an earlier frame drew a textured 2D quad.
  • bgfx draws the 2D shapes one pixel off from DX8.

🤖 Generated with Claude Code

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