Skip to content

Breath of the Wild: Metal encoding on its own thread on the Mac - #1044

Open
moretti wants to merge 1 commit into
seedds:mainfrom
moretti:botw-enc-thread-mac
Open

moretti wants to merge 1 commit into
seedds:mainfrom
moretti:botw-enc-thread-mac

Conversation

@moretti

@moretti moretti commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Split out of #930 (3 of 4). The deferred encoder's stand-ins for the depth plane copies with blit options are already on main (7d260ee), so this PR is only the profile key.

Summary

 dm/games/01007EF00011E000/game.tsv
  present_snap   on
  pso_mtl4       on
+ enc_thread     on    # Metal encoding on its own thread on the Mac too (already on by default on iOS)

The game waits on the fence of the frame it just submitted, so the submit thread's translation is part of its frame, and moving the encoding to its own thread shortens it. docs/agents/game-patches.md lists Breath of the Wild beside Need for Speed under enc_thread. test_launcher_settings now expects the Mac default to follow the profile: on for Breath of the Wild, off for Wonder.

Evidence

  • Before / after: M5 Pro, a 470 s run outdoors. The present thread's CPU went from 5.9 to 3.4–4.4 ms a frame, and the submit from 6.6 to 5.0 ms.
  • check_t_rt_range (19 cases, the test 7d260ee fixed for the encode thread) passes with this profile.
  • Builds and tests on its own on current main: host and CPU gfx tests, sanitizers, tool tests, clang-tidy and ruff/pyright pass locally.

Merge Danger

Door: two-way: one profile key.

Blast Radius: Breath of the Wild on the Mac.

regress.py impact: Breath of the Wild only. The game isn't on this machine any more, so regress.py check was not rerun on this branch; the measurements above are from #930's runs.

@github-actions github-actions Bot added tools Tools and scripts (dm/tools, scripts) docs Documentation game: 01007EF00011E000 The Legend of Zelda: Breath of the Wild labels Nov 3, 2026
@moretti
moretti force-pushed the botw-enc-thread-mac branch from 8bb5f2d to 5bb1a75 Compare November 3, 2026 06:54
The game waits on the fence of the frame it just submitted, so the submit thread's translation is part
of its frame. With the profile's enc_thread on, an M5 Pro run (470 s outdoors) took the present thread's
CPU from 5.9 to 3.4–4.4 ms a frame and the submit from 6.6 to 5.0 ms; iOS has it on already.

The deferred encoder's stand-ins for the depth plane copies with blit options, which this needs, are on
main (7d260ee).
@moretti
moretti force-pushed the botw-enc-thread-mac branch from 5bb1a75 to c540ee8 Compare November 8, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation game: 01007EF00011E000 The Legend of Zelda: Breath of the Wild tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant