Repository navigation
Super Mario Bros. Wonder: the recorded seed list, the Metal 4 path on iOS and its g18p/g19p archives - #651
Open
oliverames wants to merge 2 commits into
Open
Super Mario Bros. Wonder: the recorded seed list, the Metal 4 path on iOS and its g18p/g19p archives#651oliverames wants to merge 2 commits into
oliverames wants to merge 2 commits into
Conversation
oliverames
force-pushed
the
wonder-prewarm-manifest
branch
2 times, most recently
from
October 30, 2026 19:58
1573ed3 to
0bb5b0f
Compare
oliverames
force-pushed
the
wonder-prewarm-manifest
branch
from
October 31, 2026 12:19
0bb5b0f to
97aea9e
Compare
…on an iPhone 19,4) and the Metal 4 path for iOS with its g18p/g19p archives
oliverames
force-pushed
the
wonder-prewarm-manifest
branch
from
November 2, 2026 18:19
97aea9e to
6ed6349
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.
Depends on #653 for the
pso_gpuprofile key. Merge that PR first so the Wonder build includes both GPU archives.The Wonder profile gets its prewarm seed list. Three files change in
dm/games/010015100B514000/:pso_manifest.tsvgrows from the 2-line placeholder to 3 comment lines and 1,855 rows (966 shader S rows, 876 render-pipeline R rows, 13 compute C rows), byte-identical to the app's ownpso_user.tsvrecord;README.mdgains the prewarm bullet in the## Shaderssection;game.tsvadds a# ---- Graphics ----block withpso_mtl4 onand a new optional profile key rowpso_gpu g18p g19p.The symptom this answers measured on the record device: with the profile as it stands the app runs the
MTLDevicepath (no bases), so every pipeline no list names is compiled on the submit thread, inside the frame that draws it. In one 6.5-minute session 337 long frames carried 1,052 on-the-spot compiles (14.2 s of compile over 197 frames), the worst a single 1,014.6 ms frame with 142 pipelines; typical bursts 20–230 ms. The docs cover the machinery (The pipeline prewarm lists, Pipeline bases and the pipeline archive, The pipeline archive made offline); Breath of the Wild's note (Pipelines on a cold start) is the precedent.The seed list
The 1,855 rows were recorded by play on an iPhone 19,4 (a Duo foldable, the
applegpu_g19pGPU family, iOS 27.2) with update 1.2.1 on 2026-10-28 and -29. The record is the app's ownpso_user.tsv(one line per pipeline as built, first-use order), and the route covered is the boot, the title, a save load, and the courses played, the opening world's first courses among them. Everything was validated before writing: all 966 S keys resolve against the profile'sshader_map.tsv(16,269 keys); all 876 R rows were decoded (eachpso_skey's embedded vertex and fragment keys) and every key resolves; the 13 C keys resolve; 0 malformed and 0 duplicate rows. On the record device the app's log states the prepare step replayed 760 lines (391 shaders, 368 render pipelines, 1 compute) in 0.06 s on 6 workers before the first frame, with "shader keys not in the shader map (another game version) 0"; the shipped file is the grown 1,855-row one. That replay is the evidence behind the rows, not gameplay acceptance, and it covers the recorded route, not the whole game.The Metal 4 rows
pso_mtl4 onturns on, on iOS, what the Mac already runs by default: the pipeline archive made offline, the prepare step, the bases and the hybrid pipelines.pso_gpu g18p g19pnames the GPU families the offline archive compiles for — g18p, the iPhone 17 family's A19/A19 Pro, and g19p, the Duo's — through a genericpso_gpuprofile key that a companion pull request (branchprofile-pso-gpu) adds togame.py,build_ipa.shand the NSP script. Without that key change thepso_gpurow is inert and the archive builds for the script's default g18p; the profile branch alone is otherwise fully functional with today's main. As an archive probe on the Wonder shader build (this Mac, Apple M2 Pro, toolchain metalfe-32023.922),pso_offline.py --gpu g19pover the profile's pairs gives 3,698 pairs → 3,697 bases, 67 MB, 113 s, with planning 27.5 s; 1 pair is left to the device (layer write) and there are 0 function-constant pairs. Those numbers are Mac-side only;dm/games/README.md'spso_mtl4row gainspso_gpuin the companion PR.Tests
The branch is rebased onto
a662f29. The generated patch index now includes Wonder's Metal 4 setting, and the launcher and packaging tests expect its new default. Mario 3D World retains coverage of profiles with Metal 4 off. All 27 launcher-settings, profile-packing and documentation tests pass.game.pyloads the two rows. The S/R/C validation above covers the manifest's shader-table references.What this change does not claim
No device acceptance yet. On the Duo the archive must open (the stamp/coverage probe at start); the hybrids must hold in gameplay; the prepare step's cold first-start build needs its measurement (that is the fallback when the archive is unusable); the steady-state GPU cost of the Metal 4 path on Wonder is unmeasured; and the memory cost of the bases (Wonder's other windows reach 2.2 GB resident) sits against the increased memory limit. Until a device run says otherwise the current install stays as it is with the key off; with it on, a game whose archive fails to open falls back to the device's own prebuild exactly as the docs describe.
Files:
dm/games/010015100B514000/pso_manifest.tsv: 290 B → 782,541 Bdm/games/010015100B514000/README.md: +~930 Bdm/games/010015100B514000/game.tsv: +14 lines