Repository navigation
Conversation
gino8080
force-pushed
the
fix/bahs-binary-record-entries
branch
from
November 17, 2026 17:20
18860b4 to
fa03c62
Compare
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.
2 tasks done
gino8080
force-pushed
the
fix/bahs-binary-record-entries
branch
from
November 18, 2026 08:11
fa03c62 to
456671e
Compare
seedds
added a commit
that referenced
this pull request
Nov 18, 2026
BAHS payload in Mario Kart World and Donkey Kong Bananza can pass the shader scan even though it occupies no binary record slot. Validate a nonempty binary array within the table region before filtering, share its offsets with variation pairing, and keep the scan fallback when the layout is inconsistent. Refresh the affected shader maps and shader chain header. Fresh splits removed two false keys from each tested build while preserving retained shader data and variation pairs. The full Mario Kart World 1.8.0 Mac regression passed with 11,601 shaders and 9,591 pipeline interfaces. The registered v0 Mario Kart World map removes the same agl_common key based on matching offsets, stages and keys. A full v0 resplit remains open. Co-authored-by: gino8080 <[email protected]>
Owner
|
Landed on The landed parser preserves scan candidates when the record array is empty or overlaps shader code. Fresh splits removed two false keys each from Mario Kart World 1.8.0 and Donkey Kong Bananza v458752. The full Mario Kart World Mac regression passed with identical manifests for all 11,601 shaders, 9,591 matching pipeline interfaces, and both revisions completing the Grand Prix route. A full repack of Mario Kart World v0 remains open. Its registered map was updated using the matching |
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 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.
Validation on the current base
Rebased onto
c379a903f47dd6d8cbdc4b2b36e67e7bb8ebc250on 2026-11-18. The only conflict was the generateddm/gfx/nvn/dmsh_chain.h; regenerating it from the combined sources producedb705e45154b2. The parser and its regression tests are byte-for-byte unchanged from the previous PR head.git diff --checkpassed.regress.py checkcompared the current base with456671e83876on Mario Kart World 1.8.0: 11,601/11,601 Mac shaders built on both sides, identical shader manifests, zero changed MSL, zero new shader/interface failures. All 9,591 checked pipeline interfaces matched; both pipeline prebuilds compiled 9,591 bases without failure.PASSbecause the candidate adds no regression to that failing baseline. This is not a successful gameplay test, and no performance claim is made.t_geometry.mcompile failure below. The broader tool suite was not repeated in full locally.Earlier device evidence: this same parser implementation built all 11,601 shaders for Mac and iOS on
2925d7af; Mario Kart World 1.8.0 was installed and played on an iPhone Duo with iOS 27.2.1 using Xcode 27.2. The current rebase has not been installed on the phone, and the iOS shader build was not repeated for this base.Existing failures on main
Verified against the exact base above on 2026-11-18:
t_geometry.m:478,488: undeclaredg_mdi_v, reproduced locally.test_shader_toolchain_cache.TargetSelection.test_mesh_compiles_only_requested_targets: undefineddmsh_rewritein all three target subcases, reproduced locally.t_audio_deviceunder TSan: race inmock_aogpd, reproduced locally.t_codec_video.c:111(vt_session_lifecycle); its tool-test job was cancelled.matchleak inhaptics_apple.m, and stale baseline entries. These files and the baseline are not changed by this PR.Docs
The BAHS entry-validation reference and Mario Kart World note describe the cause, fallback and validation limits.
Current-base full regression report
regress.py check (full): PASS
Baseline
main-20261118c379a90, candidateHEAD456671e; Apple M4 Pro, macOS 27.2.1, Xcode 27.2; 971.5 s0400C3F00006E000Mario Kart World
0400C3F00006E000: PASS