We have a rather large iOS game that is crashing upon launch. XCode reports “Terminated due to memory issue”, and we can clearly see the memory grow quickly to ~700MB leading up to the crash. This is before any scene is loaded, and before any of our code has been executed.
The crash only happens when the Metal Graphics API is selected (we want to use Linear Colour Space).
It looks like it’s happening when reading/compiling shaders (see attached allocation call tree). There’s a huge malloc as a result of Shader::Transfer and some ShaderLab initialization stuff.
If we remove Metal from the Graphics APIs, everything works fine. The memory initially spikes upon load, but not to the same extent, then settles at ~250MB.
We’re not using too many special shaders or anything… mostly Standard Shader:

This has been reproduced on Unity 5.5.1f1 and 5.6.0f3. I’m testing on an iPad Air using iOS 10.2.
Is anyone else having this problem with Metal?
