Why MetalPerformanceShaders is not available in macOS

As stated in title. It seems like in the source file, there are code like the following:

MPS_CLASS_AVAILABLE_STARTING( __MAC_10_11, __IPHONE_9_0, __TVOS_9_0)


But I cannot import it in macOS projects, and the document did not stated macOS support too.

Replies

There are a few features that are only available on iOS/tvOS but not also on macOS. don't forget to always check the Metal Feature Sets table for available features on various OS-es and GPU families.

look at what metal really is, it is a non-open format version of OpenCL. apple supposedly signed up to support opencl but really hasn't.


apple's version of OpenCL 1.2 is severely crippled and if you read blender source code you'll see it's full of hacks and work arounds to get GPU pipelines running. only a company like adobe can throw enough programming horsepower behind photoshop to get decent GPU performance. most OSX users of ffmpeg have given up on apple's opencl and just use pthreads.

not really... Metal is a unified API (both compute and graphics) and has on par performance when compared to Vulkan and DirectX 12. Metal also has a thinner/lower overhead than OpenGL/CL has ever had.

Because, as it seems, Apple is not investing nearly enough in Metal development. I was very exited about Metal when it first appeared but now, two years later, it still feels more like a tech demo than a ready product. And desktop version is even less feature-complete than the iOS version. No double precision, no fences, no explicit ressouce management on desktop, no prebaked command buffers, no queue synchronization. I really hope that Apple steps up their game with 10.13...