Skip to content

Release the geometry hazard test program and check its Metal readback buffer - #959

Open
thehobbit85 wants to merge 1 commit into
seedds:mainfrom
thehobbit85:codex/geometry-hazard-fixture
Open

thehobbit85 wants to merge 1 commit into
seedds:mainfrom
thehobbit85:codex/geometry-hazard-fixture

Conversation

@thehobbit85

@thehobbit85 thehobbit85 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

The geometry hazard test passed a potentially nil readback buffer to Metal and left each synthetic program registered after its draw finished. On 1ae435d5, these triggered the same two clang-tidy findings in #829 and #896. Both PRs inherited the test unchanged from main.

The fixture now stops with a diagnostic if it cannot allocate the readback buffer. After checking the draw output, it verifies that the serial table still owns the expected program, releases the program through the renderer’s normal API, and verifies that the entry is gone.

Revision 884b50bbb60b2a32a726dad7ac5e694f0e2db405 includes main 65501fbbaf8526f7aab0a1edd028135888590f8e. Main’s geometry fixture still retains the Metal program and leaves the readback allocation unchecked.

Validation on 884b50bbb60b. python3 -m unittest dm.tools.tests.test_docs dm.tools.tests.test_gfx_tests_makefile — 16 tests passed.

The Metal geometry fixture passed 65 assertions in each of three command-cut configurations on the M2 Max with the Metal debug layer enabled.

GitHub checks for this revision

Original repair validation on 35a55ff9f6ad

  • Reproduced both warnings on the unmodified main fixture using LLVM 23.1.4. The final lint_c.py compdb and lint_c.py tidy --against 1ae435d5 run covered 215 sources and matched the existing 271-finding baseline exactly.
  • make -C dm/gfx/tests GAME=010015100B514000 check_t_geometry_hazards passed all 65 assertions in each of the three cut configurations with Metal API validation on an Apple M2 Max.
  • make -C dm/gfx/tests GAME=010015100B514000 -j4 run passed its executed tests using local Metal 32023.921.6. Six optional Super Mario Bros. Wonder reflection samples were unavailable.
  • The edit is confined to the synthetic test executable. It has no game runtime or shader-chain reach, so gameplay and per-game regressions were outside this check.

@thehobbit85
thehobbit85 force-pushed the codex/geometry-hazard-fixture branch from f59a14a to 884b50b Compare November 2, 2026 17:43
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.

2 participants