Skip to content

fix(ios): iPad docked MetalFX Retina output and eliminate BotW frame pacing micro-stutter - #1585

Open
dengboyun wants to merge 1 commit into
ly05010419:mainfrom
dengboyun:fix/ios-botw-sync-mfx
Open

dengboyun wants to merge 1 commit into
ly05010419:mainfrom
dengboyun:fix/ios-botw-sync-mfx

Conversation

@dengboyun

Copy link
Copy Markdown

Summary

This PR addresses two display and performance improvements on iOS / iPad:

  1. Eliminate 60 FPS Micro-Stutter on iOS (BotW):

    • Commit d1966c52 enabled TOTK_SYNC_LAG=1 by default for Breath of the Wild (tested on macOS).
    • On iOS, where presentation pacing is handled via CADisplayLink / CAMetalDrawable, this 1-frame relaxed fence wait causes frame pacing to fluctuate between 16.6 ms and 22 ms, leading to noticeable micro-stutter during 60 FPS gameplay.
    • Setting setenv("TOTK_SYNC_LAG", "0", 1); in apply_display_settings on iOS restores clean fence synchronization and eliminates the micro-stutter, keeping a stable 60 FPS.
  2. iPad Docked MetalFX Output Upscaling:

    • On iPad docked play (where DefaultValuePad defaults to docked mode), the 1080p canvas was previously stretched bilinearly by the compositor to the iPad screen (e.g. 2360x1328 on 11" iPad Air / 2732x2048 on 13").
    • Enabling MetalFX spatial output upscaling (TOTK_IOS_DRAWABLE_H=0, TOTK_MFX_OUTPUT=1, TOTK_MFX_UPSCALE=1) during iPad docked play (with overwrite=0 so custom layer settings still win) allows Apple Silicon's hardware MetalFX spatial upscaler to reconstruct native Retina resolution with sharp edges and zero aliasing.

Tested on iPad Air 11-inch (M4).

… frame jitter

- Breath of the Wild on iOS: commit d1966c5 enabled TOTK_SYNC_LAG by default for BotW. On iOS with CADisplayLink presentation pacing, the 1-frame relaxed fence wait causes frame pacing to fluctuate between 16.6 ms and 22 ms, leading to noticeable micro-stutter. Disable TOTK_SYNC_LAG on iOS so the game holds a solid, rock-steady 60 FPS.
- On iPad docked play (DefaultValuePad), enable MetalFX spatial output upscaling (TOTK_IOS_DRAWABLE_H=0, TOTK_MFX_OUTPUT=1, TOTK_MFX_UPSCALE=1) to upscale docked canvases to the native Retina display cleanly rather than relying on system bilinear stretching.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant