5 ms·
One thing that is surprisingly slow on the M1 is running an OpenGL ES application in the simulator. I developed a game on a shoestring budget, and hoped that a
by TheNewAndy 5y ago
One thing that is surprisingly slow on the M1 is running an OpenGL ES application in the simulator.
I developed a game on a shoestring budget, and hoped that an M1 would be able to be used for capturing video of the game at the resolutions that Apple wants, but it was way too slow to be able to do this, so I had to just leave video out of my store page.
The same app run on your M1 mac with its iOS compatibility works completely fine (as it should, it is a 2d game with about 10 sprites that just get drawn with scaling and no rotation).
- TillE 5y agoI've tried a number of games from the app store (relatively simple 2D games which don't melt your phone) on an M1 Pro MBP, and found they all constantly maxed out multiple CPU cores for no apparent reason. There's definitely something wrong even with the iOS compatibility layer.
- my123 5y agoSounds like it went through the software rendering path...
- TheNewAndy 5y agoYou are correct. It is frustrating because clearly it can be hardware accelerated, just Apple hasn't really bothered themselves to do this
- Klonoar 5y agoI was under the impression that OpenGL on M1 devices just passes through to Metal at this point. Does OpenGL ES not get this treatment...?
- xenadu02 5y agoSimulator support for GPU rendering is far from trivial so it isn't about "bothering". Metal jobs are packaged up along with shaders and proxied out to the host macOS Metal framework. Textures are backed by IOSurfaces which do some fancy Mach memory mapping tricks to share memory between your app in a simulator, the macOS side of Metal, and sometimes GPU memory (on Intel Macs with discrete GPUs). For the most part this is transparent to you and works even when Simulator vNext is running on macOS vPrevious. The vast majority of developers are using higher-level system frameworks, an engine that has a Metal renderer already, use WebGPU, or use Metal on Apple platforms.
- TheNewAndy 5y agoWith the amount of cash apple has, it very much is about bothering. They have the resources to make their development tools not terrible, but instead they seem to be investing in... cash for a rainy day.
- dTal 5y agoMaybe they plan to bring an M1 iPhone to market, so it's not worth the considerable engineering effort to fix a problem that will go away by itself in a while.
- jarjoura 5y agoThere is no OpenGL driver on M1. So your app is running through a translation layer to the native Metal driver underneath. All OpenGL rendering on M1, no matter the framework (iOS, Catalyst, macOS) has pretty terrible performance because of that.
- andy_ppp 5y agoIs this true for WebGL as well or does Safari/Chrome/Firefox do something special?
- olliej 5y agoAll browsers use the ANGLE library to translate to the underlying platform 3d engine (Direct3d, Metal, OpenGL, Vulkan?) That aside, afaik M1 Macs only have OpenGL as a translation layer (to metal) for programs running under Rosetta
- xenadu02 5y agoSimulator has never supported hardware acceleration for OpenGL ES. It is no different on an Intel Mac. Only Metal in Simulator runs on the GPU. This includes WebGPU if you're using Safari.