Interview: Khronos brings Vulkan applications to Macs, iPhones, iPads

Khronos introduced new open-source tools to port Vulkan applications to Apple's platforms. In this Q&A, Khronos Group President Neil Trevett explains the project and why it matters.

Apple, iPhone, Mac, iOS, macOS, Vulkan, Metal, Khronos

Developers should be excited that Khronos today introduced new open-source tools to port Vulkan applications to Apple’s platforms. I caught up with Khronos Group President Neil Trevett to find out more about the project and why it matters.

Introducing Vulkan

Vulkan is an open standard for 3D graphics developed by the Khronos Group, an industry consortium dedicated to the creation of open standards for the graphics industry. 

Vulkan is supported by a large number of major industry participants, including hardware vendors, driver implementers, and tool vendors, across many hardware and operating system platforms.

As part of the Vulkan Portability Initiative, open source tools, runtime libraries, and SDKs enable Vulkan development on macOS and deployment on macOS and iOS. And today the MoltenVK, LunarXchange, and SPIRV-Cross cross-compiler are available in open source. These tools are the result of a collaboration between Valve, LunarG and The Brenwill Workshop.

The interview follows in Q&A format:

What kind of demand have you seen from developers for this?

Running Vulkan applications on Apple platforms has been the number one request from developers since Vulkan launched in 2016, and today’s release of the MoltenVK runtime and LunarG macOS SDK brings that capability to life. The last ‘universally available’ 3D API was OpenGL ES 3.0 that was available across all desktop and mobile platforms — including iOS and macOS. With this announcement, Vulkan becomes the new-generation universally available API that can be used by developers across all mobile and desktop platforms.

What is Vulkan, and what applications are using it?

Vulkan is the graphics industry's new-generation, open standard for predictable, high-performance graphics, providing you with unprecedented control of your graphics and compute pipelines, developed by Khronos Group, an industry consortium dedicated to the creation of open standards for the graphics industry. Vulkan provides high-efficiency, cross-platform access to graphics and compute on modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms. 

The Vulkan ecosystem is pervasive and supported by a large number of major industry participants, including hardware vendors, driver implementers, and tool vendors, across many hardware and operating system platforms. Today all the major GPU companies are supporting Vulkan with drivers for desktop and mobile platforms, including AMD, Arm, Imagination, Intel, NVIDIA, Qualcomm and Verisilicon. Vulkan support appears in leading game engines such as Unity and Unreal, numerous game studios actively developing Vulkan titles, and a dozen Vulkan titles shipping, including Doom, Quake, Wolfenstein II, The Talos Principle and Dota 2.

Khronos’ Vulkan Working Group has been working with Khronos members Valve, LunarG, and The Brenwill Workshop to release a collection of free and open-source set of tools, SDKs, and runtime libraries to enable Vulkan development on macOS and deployment on macOS and iOS platforms. And all these tools are free to use, as well as being in open source.

In very simple terms, what does this move mean for Apple users?

It means that more 3D applications and games will be available on the Mac and iPhone. One specific and direct consequence of this announcement, Dota 2 using Vulkan on macOS will be released in the coming months as a free update to provide significantly upgraded performance compared to the OpenGL version.

What does it mean for developers?

It means they can bring their Vulkan-based applications to macOS and iOS with very little or no re-writing of the GPU compute and rendering functionality. Developers will be able to build, run, and debug their Vulkan applications on Apple platforms, which allows them more flexibility, saves time and reduces development and porting costs for developers who wish to support multiple platforms.

What might it mean for enterprise users?

Any enterprise applications that make use of GPU compute and rendering functionality now have the choice of using Vulkan on macOS and iOS — meaning that cross-platform enterprise applications can be supported at performance levels that exceed that possible using the native OpenGL drivers. 

And are there implications for AR/VR development?

Many VR platforms and engines now have Vulkan backends — so availability of Vulkan tools on macOS and iOS may widen the choice of development options for cross-platform AR and VR developers.

Tell us how you are able to deliver native performance levels from Vulkan over Metal?

The Vulkan Working Group at Khronos has analyzed and defined a subset of Vulkan that can be directly mapped to an underlying Metal or DX12 API with very little run-time overhead. Interestingly, only a very small percentage of Vulkan functionality cannot be mapped to Metal at native performance levels.

Additionally, a well-formed Vulkan application will be designed to minimize CPU overhead by batching GPU commands, submitting significant amounts of work to the GPU for each API call. Consequently, adding a thin runtime library between the application and the Metal API will typically have very little performance on application performance.

This kind of analysis and solution is enabled when you have API experts and GPU vendors cooperating at the same table. This is especially true when navigating the complexities of the current crop of low-level native APIs. Khronos is the one organization with a proven track record of bringing these experts together and how we have successfully catalysed Vulkan capabilities on multiple platforms. One such expert is Khronos member The Brenwill Workshop that has created the MoltenVK Vulkan library that runs over Metal.

What is MoltenVK?

MoltenVK, a Khronos member, is an implementation of Vulkan that runs over Apple's Metal graphics framework. With MoltenVK, you get the performance benefits and added debugging and performance tuning capabilities of the Metal framework on iOS and macOS, while maintaining compliance with the Vulkan API.

What is LunarG?

LunarG, a Khronos Group member, is a software engineering company specializing in 3D graphics software solutions and services. The LunarG Vulkan SDK for macOS — available as open source on LunarXchange — enables developers to build, run, and debug their Vulkan applications on the Apple Mac platform. The LunarG SDK for macOS provides loader and validation layers, which allow programmers to check their code for correct API usage. LunarG will continue to evolve the macOS SDK by adding additional tools and features.

Can you now use a Mac to build Vulkan apps for Androids or Windows systems?

Yes, the LunarG SDK Vulkan SDk for macOS includes the tools layers to develop and debug a Vulkan-based application that can then be taken to other platforms with Vulkan support.

To what extent does this work reflect the growing popularity of Apple’s platforms?

macOS and iOS are important platforms for both consumer and creative applications — many of which rely on GPU acceleration of compute and graphics. These Vulkan tools for will enable developers to bring their cross-platform applications to Apple platforms.

To what extent will this accelerate development time?

These porting tools in open source will save developers wishing to support multiple platforms huge amounts of time. A great example is Valve using these Vulkan tools for Dota 2, which is now running faster than the native OpenGL version, without having to create a whole new rendering backend for a complex production game title.

What do you think? Will this turn out to be significant? Have Apple's Macs just become the most important app development platform?

Google+? If you use social media and happen to be a Google+ user, why not join AppleHolic's Kool Aid Corner community and get involved with the conversation as we pursue the spirit of the New Model Apple?

Got a story? Please drop me a line via Twitter and let me know. I'd like it if you chose to follow me there so I can let you know about new articles I publish and reports I find.

Copyright © 2018 IDG Communications, Inc.

It’s time to break the ChatGPT habit
Shop Tech Products at Amazon