Why Vulkan is not supported on Apple platform

As I know Vulkan is implemented by GPU vendors. Why can’t just the GPU vendor implement it on Apple platform just like in Windows.

Because MacOS works differently from Windows.

See, back when 3D graphics cards started to emerge, Microsoft made the decision to build an Installable Client Driver model for OpenGL. This would allow GPU makers to install OpenGL implementations into Windows, and allow users to talk to them indirectly through the ICD model. But that means that there has to be a channel directly from the application to the driver, with minimal communication with Windows itself.

And while Microsoft later decided to make their own 3D API, that channel between the driver and the application still exists. Because that channel exists, it is possible for GPU driver vendors and so forth to build alternative models for communication between the application and the driver. Like, for example, Vulkan.

Microsoft could in theory remove that channel, but doing so would break lots of stuff. And Microsoft doesn’t like breaking backwards compatibility. But note that they don’t allow the use of that channel in UWP applications sold on their store.

On MacOS, such a channel never existed. The MacOS OpenGL implementation was MacOS. That is, your OpenGL function calls go to MacOS; it was MacOS who talked to the driver. This is why MacOS OpenGL extensions were rigidly controlled by Apple themselves; implementations couldn’t directly expose function pointers into their own driver. Everything had to go through MacOS.

Remember: the OS owns the GPU and the driver. The user can only communicate with the graphics driver to the extent that the OS allows them to. Windows had a channel to allow direct communication; MacOS never did. Without such direct communication mechanisms, it is not possible to build a Vulkan implementation.

At least, not directly in graphics drivers. You have to build it on top of MacOS’s graphics API: Metal.

1 Like

What a fast reply, thank you sir now I can sleep in peace.

Hi, Haiiro no Jiren
you can use Vulkan API on MacOS via MoltenVK.
vulkan sdk for mac os also uses MoltenVK.