Khronos Group ships tools bringing Vulkan graphics API to iOS and MacOS
The Khronos Group has released new open source tools that allows the Vulkan API, a 3D graphics API, to work on iOS and macOS, a move that can make it easier for developers to port games to Apple's hardware from other platforms, while still taking advantage of technologies like Apple's Metal graphics API.
Previously Vulkan has been usable on a number of major platforms, including Windows and Linux on desktops and Android on mobile, but not on macOS and iOS. For these Apple-controlled platforms, developers instead have to use OpenGL and OpenGL ES, older graphics APIs also managed by the Khronos Group, as support for Vulkan wasn't implemented for Macs and iOS devices
Vulkan is an open standard cross-platform API that is meant to be used by developers of games requiring high levels of graphical performance, such as first person shooters, intending to release the games on multiple platforms. The cross-platform nature of Vulkan saves developers from having to learn platform-specific graphical technologies, like DirectX for Windows, as Vulkan handles that communication on their behalf.
Released today by the Vulkan Working Group's Portability Initiative, the free tools are part of a universally portable subset of Vulkan 1.0 that can be run natively over Metal. The main release, the MoltenVK library, translates calls within the Vulkan portable subset to Metal calls, using the open source SPIRV-Cross cross-compiler to translate Vulkan shaders into native code formats.
The Working Group collaborated with game developer Valve, LunarG, and the Brenwill Workshop to produce the MoltenVK library, with Valve already implementing the library in its own software. The popular game Dota 2 has been altered to work with Vulkan on Mac, and Valve has apparently seen significantly higher performance in the game running on macOS compared to the native OpenGL drivers, with players expected to see the change in a free update within the next few months.
"We have been running substantial production loads through the Vulkan tools on Mac, including Dota 2 which is now running faster than the native OpenGL version," said Valve developer Pierre-Loup Griffais. "These efforts are aimed toward reducing development and porting costs for any developer supporting multiple platforms."
MoltenVK is available to all developers for free, without any fees or royalties payable for using the library in commercial applications.
Alongside MoltenVK is the open source LunarG Vulkan SDK for macOS, which can be used by developers to build, run, and debug their applications on Mac. The SDK provides loader and validation layers, used for checking code for correct API usage, with additional tools and features said to be on the way.
Though Apple is counted as a member of the Khronos Group, it has yet to provide its own support for the Vulkan API in either iOS or MacOS, instead relying on OpenGL and Metal. Apple has previously shown some interest in developing a new standard 3D graphics API for the web, including proposing a new Community Group at the World Wide Web Consortium to create one in February 2017, but reports indicate Apple's WebKit team suggested using Metal as the base instead of another pre-existing cross-platform API.