Skip to content

Ocarina of Time: experimental Mac playability and performance checkpoint - #1663

Draft
bmjask wants to merge 6 commits into
seedds:mainfrom
bmjask:codex/ocarina-playability
Draft

bmjask wants to merge 6 commits into
seedds:mainfrom
bmjask:codex/ocarina-playability

Conversation

@bmjask

@bmjask bmjask commented Nov 7, 2026 •

Copy link
Copy Markdown

This draft preserves the combined playable branch codex/ocarina-playability at 26748913090b705421f0719b35a0d17426c22485. It remains an integration checkpoint; changes are being extracted into independently reviewable PRs against current main. The installed Mac app is not replaced by these branch operations.

Independent review PRs

All four split PRs (#1887, #1888, #1890 and #1891) are ready for review. Full regression on the extracted current-main versions remains pending. Their descriptions distinguish historical combined-branch A/B evidence from tests run on the extracted commits. No current-main performance gain is claimed from historical measurements alone.

The save editor is excluded from this PR-splitting effort. It remains in the historical combined branch; no separate save-editor PR is being submitted.

Remaining extraction

Experimental high-FPS timing is now extracted in #1890 with contract 2 at +0x44 and fresh focused tests; gameplay validation of that adaptation remains pending. #1891 extracts the conservative shader passes, not the integration branch's broader pointer-site cache ABI, mesh grouping or every GPU experiment. Those remaining changes still need overlap/dependency review and independent validation.

Guest-clock timestamp projection is already upstream (267ef2d3, PR #1676), as are several archive, rendering and shader fixes. Those should not be duplicated in new PRs.

Historical evidence

The following report describes an older checkpoint, not the current branch tip or the newly extracted PRs. It is retained for provenance. The older chain ID, validation counts, exclusions and packaging requirements below apply only to that checkpoint.

Historical checkpoint report (64a54c9 / ff5c23c)

Ocarina of Time (0400486024DEC000) needs host-service, rendering and shader-translation changes to run on the Mac. This draft checkpoints the playability branch, including its game profile, performance caches, experimental save editor, focused tests and recorded validation limits.

The current checkpoint is 64a54c97 (runtime checkpoint ff5c23c8 plus fractional-clock tests). It includes the measured mesh/compute grouped-load improvements, restored mesh-pair coverage, guest-clock projection fixes, and experimental build-gated fractional timing used by the separate HighFPS package. Build shaders and host together for chain ad4eab41ef63; rewrite the supported game module for the fractional timing contract. High-rate mode is opt-in through DM_FPS_TARGET=120; the normal target remains unchanged.

Measured behavior

Two short 60 FPS forest comparisons showed 5.8% and 5.5% lower median GPU time from the ordinary-compute grouped-load extension, following the earlier mesh improvement. A separate combined timing/compute run averaged 93.7 FPS under a 120 FPS request. An instrumented short forest run measured simulation speed within 0.06% of the 60 FPS reference. These are route-specific results, not stable 120 FPS, whole-game playability, or broad audio/movie validation. The game note records conditions and limitations.

Validation

  • Matching Mac host rebuild passed. Local checks passed: 264 NVN checks, 84 frame-step checks, six ARM64 stub execution tests, 17 shader-chain tests, 11 documentation tests, six grouped-load tests and 34 mesh-wrapper tests. Later local checks also passed five dynamic-helper and 20 reflection tests.
  • The current static regression comparison against ad2b936b has 42,850/42,850 successful shaders in both revisions, no added or newly failing shaders, no increased loss annotations, and no interface failures across 34,474 checks. Expected changes: 2,649 MSL sources, 2,234 reflection records and 1,406 variant records.
  • Full scripts/regress.py check completed with CHANGED, exit 0, for runtime checkpoint ff5c23c8 against ad2b936b. Both revisions reached the route frame gate, with zero new REDs, zero pipeline-prebuild failures and no new shader/interface failures. Both measured 59.5 FPS at the 60 FPS request and 18.0 ms frame p99. Candidate preparation took 14.29 s versus 10.87 s; this stayed within the harness tolerance. The subsequent 64a54c97 change adds tests only. This validates the short forest route, not the whole game or 120 FPS.
  • Ocarina is the only locally available game. The general NVN changes can reach other games, which remain unchecked. iOS full-game/device validation is also pending.
  • The separate experimental HighFPS package passed signature verification and a copied-save startup test. Existing installed-app and personal-save hashes were preserved.

Work not included

Constant-metadata address spaces, fused task/mesh initialization, upstream extended multiplication (#1741), archive-period rollover, and task/mesh render-pass ordering remain isolated experiments. They are not part of this pushed checkpoint. The installed HighFPS app is not automatically replaced by branch pushes.

Front-ends: recognize title 0400486024DEC000; rebuild shaders and host together for the declared chain, rewrite supported modules when enabling the fractional timing contract, and retain the normal per-title save directory. Treat the 120 FPS request as experimental, not a guaranteed frame rate.

Full local regression report

Ocarina was selected because it is the only locally available game and directly exercises the changed NVN/mesh/compute paths. CHANGED is expected from the grouped-load and restored shader-coverage changes. Candidate screenshots at 70 and 78 seconds were inspected: the forest, Link and HUD render intact; animation differences remain, so this is not pixel-identical rendering proof. The baseline was repeated after a startup covered-window event; the accepted retry had no covered-window event.

regress.py check (full): CHANGED

Baseline ad2b936ba83ca03ab924b845326bf2012b458b37 ad2b936, candidate ff5c23c8e8983708fe09efc48e7cd9f3b8d396f6 ff5c23c; Apple M4 Max, macOS 27.2, Xcode 27.2; 4083.3 s

game status shaders (base → cand) newly failing newly building changed MSL interface (new / known) boot fps p50 frame p99 ms peak MB prepare s new RED
OcarinaOfTime 0400486024DEC000 CHANGED 42850/42850 → 42850/42850 0 0 2649 0 / 0 ok 59.5 → 59.5 18.0 → 18.0 9975 → 9917 10.87 → 14.29 0

OcarinaOfTime 0400486024DEC000: CHANGED

  • CHANGED: 2649 shaders changed (MSL 2649, reflection 2234, variants 1406)
    • changed shaders: 001ef25305e1bd7e, 001f62d77a5447e6, 0031f9442b11b682, 00359b6009aed142, 003f7645f98dae69, 003fa45149288240, 0041cb1d10d87b8c, 005abfb28692a48c, 00ac145f91deb2c7, 00b0635ae2b9613b, 00bb2a1e99a98106, 00fa422e4f968603, 012ad2c75b59f3d9, 01780967ff13361f, 0193bf98ac2101db, 0195afef02530406, 01b4c2e8ffdf5893, 01cee45f33ef14ad, 01d03d59b3855728, 01eaf34a114e432f, 0207d3440d0e8dda, 020fdeffc388ba6d, 023f5bbaaeeff52f, 026942f6f9659042, 028fdf520010c667, 02a33fe918156109, 02f639fd402d35ba, 0308e88978d44ed3, 0316d96ea530cf26, 0342ab5e045200ee, 039de553a54efefc, 03a0adf10e22ddc9, 03a2a106a130e659, 03b4b2bd24119d23, 03e1d6d1364b6f66, 03eac1c8abe5bd7b, 04033d299ca5cfe1, 040bde5e6e671e68, 0414ac23d09a0d71, 04344d0b3b6c2846 …
    • screenshots (s: dHash bits / RGB diff / baseline noise): 70: 4/2.09/0, 78: 4/1.67/0
    • baseline: exit None, first frame 12.8 s, max frame 4598, reached True, prepare 10.87 s, prebuild 573.5 s (30515 built, 0 failed), fps 59.5, p50/p99 16.64/18.0 ms, peak 9975 MB
    • candidate: exit None, first frame 17.3 s, max frame 4329, reached True, prepare 14.29 s, prebuild 688.3 s (30515 built, 0 failed), fps 59.5, p50/p99 16.64/18.0 ms, peak 9917 MB
    • time: chain 183.2 s, smoke 3899.7 s

@github-actions github-actions Bot added host The Horizon host: SVCs, services, threads, memory (dm/host) nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers ios The iPhone and iPad app (dm/ios) mac The Mac front end and app (dm/mac, front_mac.m) tools Tools and scripts (dm/tools, scripts) docs Documentation shader chain The shader translation chain (DMSH_CHAIN): a change rebuilds every game's shaders game: 0400486024DEC000 A game labels Nov 7, 2026
Include the game profile, general host and graphics fixes, shader translation work, focused tests, and documented validation limits. Regenerate the shader-chain header for the published source. This experimental checkpoint is newer than the installed b0080664dbb1 app and requires a matching full shader and host build.

Validation: 50 focused documentation, shader-chain, handle-expression and widening tests passed; staged whitespace check passed. Full rebuild and gameplay validation of this final checkpoint remain open.

Front-ends: recognize title 0400486024DEC000 and rebuild shader libraries and host together for chain 52c623609245; retain the normal per-title save directory.
…ave editor

Preserve local campaign work before rebasing onto upstream main. HID tests: 162 checks; save editor: 9 tests; documentation: 11 tests. GPU validation and remaining gameplay limitations are recorded in the game note. Save edits are export-only and not yet validated in game.

Front-ends: rebuild host and matching shaders for the declared chain; the optional save editor exports copies and adds no runtime settings.
Keep dynamic raw-memory tables and range caches; rebuild the merged translator. Integrate upstream incremental pool tables and counted resource ownership, retaining CPU package sharing and targeted alias invalidation.

Validation: host build; 19 renderer fixtures; 363 shader tests (6 skipped); HID, editor, documentation, chain and AnyCPU checks. Full shader library and gameplay validation pending; installed app unchanged.

Front-ends: rebuild shader libraries and host together for the new chain; do not reuse the installed app library stamp.
@bmjask
bmjask force-pushed the codex/ocarina-playability branch from 98e401f to ad2b936 Compare November 7, 2026 14:06
m-gnr pushed a commit to m-gnr/kid-with-sword-remake that referenced this pull request Nov 7, 2026
- Reconcile upstream PRs (seedds#1455, seedds#1447, seedds#1394, seedds#1439, seedds#1489, seedds#1590, seedds#1663) and commits (ffebfd5, e5f1ade) against local fork
- Confirm PRs seedds#1455, seedds#1447, seedds#1394, and seedds#1439 are already implemented in ad99858
- Establish that host-only renderer optimizations require zero shader rebuilds and reuse the 42,854-entry b-dc815e0f38ca.img library
- Establish that native subword stores (ffebfd5) affect only 515 shaders and leverage cas.db compilation caching
- Rank candidates for base M3 Normal + Handheld (>=40 FPS target, ideal 60 FPS) and identify the top three candidates
- Recommend the smallest independently verifiable first optimization (host-only PSO archive epoch separation from PR seedds#1590)
- Update documentation index, plan, changelog, and known issues
…te timing

Preserve pointer-site and quad-load shader improvements, restored mesh pairs, guest-clock projection fixes, and the build-gated fractional timing used by the separate HighFPS package. Add synthetic coverage and a fixed-save smoke route.

Validation: host rebuild; 264 NVN checks; 78 frame-step checks; 6 ARM64 stub tests; 17 chain, 11 documentation, 6 quad and 34 mesh-wrapper tests. Prior short camera measurements reached 93.7 FPS at a 120 request. Full combined regression, broad gameplay and audio validation remain pending; only Ocarina assets are local.

Front-ends: rebuild shaders and host together for chain ad4eab41ef63 and rewrite the supported Ocarina module to use the fractional contract. High-rate mode remains experimental and requires DM_FPS_TARGET=120; preserve the normal per-title save directory.
@github-actions github-actions Bot added rewriter The NSO rewriter and per-build patches ci Continuous integration and repository settings (.github) labels Nov 8, 2026
@Anatharias

Copy link
Copy Markdown

there seems to be a problem with shader tables :

[RED] the split shader tables differ from game profile 0400486024DEC000's: shader_map.tsv: 4,710 row(s) only in the profile, 4,707 only in the split profile: ps_lib.bin 0 pixel 269e3cb1372760f6 /Lib/Terrain/tera_resource.Nin_Ounce_NVN2.release.sarc.zs/tera_common.sharcb#BAHS@0x10038 split: ps_lib.bin 0 pixel 4ad910dcbc2de272 /Lib/Terrain/tera_resource.Nin_Ounce_NVN2.release.sarc.zs/tera_common.sharcb#BAHS@0x101d0 pso_pairs.tsv: 0 row(s) only in the profile, 175 only in the split split: 06f14fa278dddec5 00cbadd92d5092f3 Either these game files are not the versions the profile registers, or shader_split.py now reads them differently and the profile's tables were not split again (the split's tables: /Users/xxxx/Games/SWITCH2/0400486024DEC000_build/shader/pkg.partial/tables)

Preserve indirect conversion reuse, native RED translation, pass-local ordering,
GPU visibility predication and bounded compute dependencies. Integrate upstream
mist signed-zero and extended-multiply shader fixes plus pipeline archive overflow
handling, image preparation and render-target heap recycling.

Keep the experimental high-rate clock and existing image quality. Include focused
fixtures and document measured results and remaining validation limits.

Validation: docs (11), chain (17), shader rewrites (8), Ampere translator (125)
checks pass. The completed shader build has 42,850 successful records. Latest
archive/stall/recycling GPU fixtures passed before packaging; packaged host builds,
signs and launches. Prior full Ocarina regression reports are documented; final
upstream integrations have not had a new full multi-game gameplay regression.

Front-ends: rebuild shader libraries for chain 46d6a538d141 before rebuilding the
host; GPU predication and bounded compute ordering remain opt-in.
Know-It-All-Brother added a commit to Know-It-All-Brother/nxnative that referenced this pull request Nov 9, 2026
d1e8bb0

Conflicts resolved against the earlier port of the PR; 1663's fractional frame
step stays opt-in (DM_OOT_FRACTIONAL=1 at rewrite) behind main's frame step and
dynamic-resolution stub. Translator binaries and chain header are rebuilt later.
Know-It-All-Brother added a commit to Know-It-All-Brother/nxnative that referenced this pull request Nov 9, 2026
…te per logical queue, and the SDK 26 headers lack MetalFX content offsets (local guard)
Know-It-All-Brother added a commit to Know-It-All-Brother/nxnative that referenced this pull request Nov 9, 2026
…changed value); main-program float adds keep seedds#1663's flush-to-zero loop; PRAGMATA's note (from the PR's base) left out
Know-It-All-Brother added a commit to Know-It-All-Brother/nxnative that referenced this pull request Nov 9, 2026
…ument, dynamic table count, hint words 6/7): loads through one pointer at constant offsets resolve their pool once; main's 64/128-bit vector loads keep their helper; a resolved range whose end wraps past 2^64 takes entry 0 (the per-access path)
Know-It-All-Brother added a commit to Know-It-All-Brother/nxnative that referenced this pull request Nov 9, 2026
…the list keeps seedds#1663's rows it lacks, its native mesh (M) rows among them
Know-It-All-Brother added a commit to Know-It-All-Brother/nxnative that referenced this pull request Nov 9, 2026
…ites is rewritten too (the value keeps its flush; the add is Metal's); raw-load tests follow seedds#1663's table (count in entry 0, hint words 6 and 7, pointer site argument), and the seedds#1752 GPU test adds a run whose end wraps past 2^64
Know-It-All-Brother added a commit to Know-It-All-Brother/nxnative that referenced this pull request Nov 10, 2026
…eedds#1663 with PR seedds#1752 ported onto them (pointer sites, dynamic table counts, 128-bit raw loads as one vector load), BarrierExits (a compute thread that returns before a barrier keeps arriving at the later ones), float atomic adds and the other Ryujinx changes this branch carries; dmsh_xlate rebuilt from these sources and dmsh_chain.lock updated
Know-It-All-Brother added a commit to Know-It-All-Brother/nxnative that referenced this pull request Nov 10, 2026
…eedds#1663 with PR seedds#1752 ported onto them (pointer sites, dynamic table counts, 128-bit raw loads as one vector load), BarrierExits (a compute thread that returns before a barrier keeps arriving at the later ones), float atomic adds and the other Ryujinx changes this branch carries; dmsh_xlate rebuilt from these sources and dmsh_chain.lock updated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous integration and repository settings (.github) docs Documentation game: 0400486024DEC000 A game host The Horizon host: SVCs, services, threads, memory (dm/host) ios The iPhone and iPad app (dm/ios) mac The Mac front end and app (dm/mac, front_mac.m) nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers rewriter The NSO rewriter and per-build patches shader chain The shader translation chain (DMSH_CHAIN): a change rebuilds every game's shaders tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants