Khronos Brings Vulkan To macOS, iOS Because Apple Won't

Following Apple's refusal to support the cross-platform Vulkan graphics API in favor of its own Metal API, the Khronos group announced a set of tools for developers to port their Vulkan applications to macOS and iOS.

Going Around Apple

On Windows, graphics card developers are the ones who provide graphics drivers for the operating system. However, Apple has been the one providing graphics API for macOS and iOS, first in the form of OpenGL and OpenGL ES drivers, and then in the form of Metal drivers. Therefore, support for the Vulkan API would have been entirely dependent on Apple's willingness to adopt it.

Since Apple developed its own proprietary Metal API, however, the company has shown less interest in continuing to develop support for any other graphics API. Apple has been prioritizing Metal development, and it has been encouraging macOS and iOS developers to build games and apps that use this API.

Because it seemed unlikely that Apple would eventually support Vulkan, too, the Khronos Group came up with another solution to bring Vulkan to Apple’s platforms: a portable version of Vulkan that would map to the Metal API. 

A Universally Portable Vulkan Subset

Khronos has previously talked about a meta-API that allows developers to target Vulkan when building macOS and iOS apps, even if Apple doesn't support Vulkan. This API would use the common features between Metal and Vulkan and then translate the Metal API calls to Vulkan. To enable this, Khronos has now released a set of tools for developers, too. One is the previously commercial and now open-source MoltenVK library, and the other is the open-source LunarG macOS SDK for Vulkan.

These tools were made open-source with help (and money) from Valve, which has already ported Dota 2 to Vulkan on macOS. This version of Dota 2 is already showing a significant increase in performance over the previous OpenGL version, as you can see in this comparison:

Khronos hopes that developers will also use the portable Vulkan meta-API to port their DirectX 12 games to Vulkan in the future. There will be a performance hit when translating the APIs, but Khronos said it’s insignificant because the translation happens from one low-level API to another.

Not all Vulkan features will be supported by the portable Vulkan API, because not everything will be translated perfectly from Metal and DirectX to Vulkan. As the features of the underlying APIs increase, the portable API will be able to support more features, too. This should in turn allow the portable API to give developers the option to target Vulkan on all sorts of devices and platforms.

The open source MoltenVK can be found on GitHub, while the macOS SDK can be found on LunarXchange.

Lucian Armasu
Lucian Armasu is a Contributing Writer for Tom's Hardware US. He covers software news and the issues surrounding privacy and security.
  • TripleHeinz
    This is a major step in pushing the API but Khronos should be focusing on creating a precise software reference implementation and an optimized software device for x86, ARM and MIPS; fully validated; pretty much like the WARP device for D3D in Windows. This would be an incredible tool, it would allow to run simple Vulkan apps where hardware support is not present and would allow to create fully compliant VK software.
    I know there is a project in the Google summer of code but it should be Khronos the ones creating such an ambitious tool.
    My thoughts.
    Reply