Improve iOS runtime and Metal support - #87
Conversation
|
Hi, @tryk016 and thanks for PR! It would be extremely hard to review in current state: it mixes up many individual things and large. PR has to be broken down in to several, for example:
Would be nice to merge simple stuff first, and then more hairy stuff. For one: I'm not sure, if upscaler is really useful. OpenGothic not generating any motion vectors/optical flow as this is quite expensive perf-wise. Without those temporal upscaler will ghost anywhere. |
|
Thanks for the feedback, I’ll split it into small, focused PRs based on the latest master, starting with the independent fixes:
Your concern about temporal upscaling is valid. The current port does not provide complete per-object motion vectors for animated or moving geometry, so ghosting is possible. I’ll leave the temporal MetalFX work out of the initial upstream series. I’ll prepare the smaller replacement PRs first and link them here before closing this one. |
|
Thanks again for the feedback. I have now split out the first four independent changes, each based on the current master:
I’ll keep this PR open as the main discussion thread for the iOS work and add links to the next focused PRs here as they are prepared. The larger lifecycle, safe rect, display link, swapchain configuration and other changes remain separate from this first batch. |
This is the Tempest part of the iOS port I have been working on for OpenGothic.
The main goal was to add the missing iOS lifecycle support and expose the Metal features the application needs without putting OpenGothic-specific decisions into Tempest. The new rendering paths are optional and the existing defaults stay unchanged.
The PR adds safe iOS scene and window handling, support for the host application's orientation and frame-rate policy, MetalFX Spatial and Temporal scalers, an optional direct-drawable path, configurable frames in flight, a bounded shader cache and validated precompiled Metal libraries with runtime compilation as a fallback. It also contains a few small fixes found while testing the port, including iOS font fallback, Metal storage on the simulator and CTest compatibility on MSVC.
I kept the existing graphics API virtual-function order and verified that Vulkan and DirectX still build. MetalFX is weak-linked and checked at runtime, so it is not required on older systems or devices. The parent project also remains in control of the Apple deployment target.
Tested with the regular CTest suite and fresh macOS, iPhoneOS arm64 and iPhone Simulator arm64 builds. The full GitHub Actions matrix passed on Windows MSVC, Windows MinGW, Ubuntu and macOS:
https://github.com/tryk016/Tempest/actions/runs/33337161891