Skip to content

Fix shader-tool lint and stale shader test fixtures - #2111

Closed
thehobbit85 wants to merge 1 commit into
seedds:mainfrom
thehobbit85:codex/fix-shared-shader-ci-20261110
Closed

thehobbit85 wants to merge 1 commit into
seedds:mainfrom
thehobbit85:codex/fix-shared-shader-ci-20261110

Conversation

@thehobbit85

@thehobbit85 thehobbit85 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Current main fails Python lint because hmma_bslots uses depth for both a parenthesis counter and its later lexical-depth helper. Rename only the counter, restoring the pinned lint ratchet to 336 existing findings with no new or stale entries. The production AST is otherwise identical.

Restore the real dmsh_fetch dependency in the extracted integer-output test fixture and update three Pokopia assertions for the translator's bounded uniform reads. The assertions still require the exact c3 words, binding-length guard, zero fallback, halfword shift, OR and selected half. No runtime workaround, suppression, skipped test or baseline increase is included.

dmsh_build.py is part of the shader chain, so the required header is regenerated to e82ac5d18f5e. Existing shader libraries need the normal rebuild for the new chain identifier even though this rename does not change shader output. The separate ABI-ratchet and C-lint issues already have #1981 and #2080; this PR does not duplicate them.

Validation on Apple Silicon macOS 26.6, Xcode 27.2, Python 3.14.6, Ruff 0.17.2 and Pyright 1.1.414, against main 6d9edb079b2edfa5e8a85753b1740ef4275b383a:

  • Before: three new Python findings; the 23 affected tests had six missing-dependency errors and three assertion failures. After: all 23 pass and full dm/tools/lint_python.py reports 336 baseline findings, zero new and zero stale.
  • All 133 tests pass across test_dmsh_hmma, test_dmsh_meshstage, test_dmsh_ampere_mem and test_nsp_chain, with the pinned offline translator enabled. This includes local Metal/GPU, Mac/iOS shader compilation and chain metadata checks.
  • Counter-renaming AST equivalence checked; deliberately incorrect bound, source word and shift were rejected. Independent review also rejected unguarded reads, wrong bank/halfword and nonzero fallback, and found no blocker.
  • The Super Mario Bros. Wonder Mac host rebuild passes. The committed-range impact report flags the broad NVN shader-chain rule because the chain identifier changes; this is not runtime game-validation evidence.

A full per-game shader rebuild and gameplay comparison were not available: regress.py check --games exits 2 because REGRESS_ROOT and REGRESS_GAMES are not configured. The intended focused games were Donkey Kong Bananza (HMMA), Pokemon Pokopia (halfword operations), Mario Kart World (integer stage outputs), and Yoshi and the Mysterious Book (guarded Ampere reads). No game, device, performance, complete graphics-suite or all-CI-green claim is made. No game data or agent artifacts are included.

@thehobbit85

Copy link
Copy Markdown
Contributor Author

Closing as superseded by current main (72ca2e09d565e8c144ad27f191948082e22464fa).

The hmma_bslots local rename is already in dmsh_rewrite.py; the entry-point fixtures now import the production dmsh_entry module, which supplies dmsh_fetch (80fc2ec and c398ff3). Fixed-offset uniform handling in e45694b also makes this PR’s guarded Pokopia expressions obsolete. Fresh checks on the main-identical shader sources passed 145 tests with one optional GPU skip; pinned Python lint has 321/321 findings, zero new or stale. No source or assertion change is needed.

The PR branch is preserved.

@thehobbit85
thehobbit85 deleted the codex/fix-shared-shader-ci-20261110 branch November 13, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) shader chain The shader translation chain (DMSH_CHAIN): a change rebuilds every game's shaders

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants