Repository navigation
Conversation
Use validated BAHS binary record offsets to reject descriptor-shaped payload. Preserve the scan fallback for unknown layouts and share the record reader with variation pairing. Add synthetic regression and fallback coverage, regenerate the chain header, and document the game-specific evidence.
gino8080
force-pushed
the
fix/bahs-binary-record-entries
branch
from
November 17, 2026 17:20
18860b4 to
fa03c62
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Mario Kart World 1.8.0 contains BAHS payload that looks like a shader descriptor even though it is outside the binary record entry slots. The scan accepts it, pairs unrelated control and code, and sends a nonexistent shader to the translator. The existing exclusion for descriptors inside control sections does not cover this case.
Reuse the validated binary array already read for variation pairing to identify the real entry offsets. Filter the scan only when that array validates; keep the existing candidates for unrecognized or inconsistent arrays. The shared reader continues to supply variation pairs.
On the local 1.8.0 dump, this removes two false shader keys and leaves 11,601 shaders. The new synthetic regression fixture returns three candidates on upstream and the expected two with this fix. A second test checks that malformed array headers and record sizes retain the scan fallback.
Checked
Rebased onto
0bd40f9fe870d8f68a375e8765298c9b7e852e99to resolve a conflict in the generated shader-chain header after upstream's ordered-NE and half-FTZ updates. The header was regenerated from the combined source tree; neither side's old hash was retained. The BAHS implementation and its regression tests are byte-for-byte unchanged from the initial PR commit.After this rebase, all 124 split tests and 42 chain/header, documentation, native-tool and SPIRV-Cross pin tests pass. Pinned Python lint reports 305 existing findings, zero new findings and zero stale baseline entries. The full shader build and game run below are from the original validation base; they were not repeated for the rebased chain.
0afeb5b81bb4e8cd49f5f61750e2f1189db04574.python -m unittest discover -s dm/tools/tests -p 'test_split*.py': 124 tests passed.python -m unittest dm.tools.tests.test_docs: 6 tests passed.lint_python.py --against HEAD: 0 new findings and 0 stale baseline entries.d8de32bc61d8.2925d7afbase. Mario Kart World 1.8.0 (0400C3F00006E000) was installed and driven on an iPhone Duo running iOS 27.2.1, built with Xcode 27.2. This is previous device evidence, not a device test of the new base.regress.py checkon the original validation base: 11,601/11,601 shaders built on both sides, no changed MSL, no new shader or interface failures. The translated package was already split with the corrected parser; parser discovery itself is covered by the synthetic before/after test and the earlier full dump split.PASS; this is not a successful gameplay smoke test of that base.test_mesh_compiles_only_requested_targets, three target subcases):dmsh_rewriteis undefined in its isolated test namespace. The same test fails on unchanged toolchain sources at the base revision.make -C dm/gfx/tests ... run) was not run. Original-base gameplay validation is limited by the baseline driver crash above.Docs
The BAHS entry validation reference and the Mario Kart World 1.8.0 note describe the cause, fallback and validation limit.
docs_symptoms.pyrun.Regression report
regress.py check (full): PASS
Baseline
HEAD0afeb5b, candidateworktree0afeb5b (+ uncommitted changes); Apple M4 Pro, macOS 27.2.1, Xcode 27.2; 345.2 s0400C3F00006E000Mario Kart World
0400C3F00006E000: PASS