Graphic interface: Vulkan gets a connection to Apple’s Metal

The Khronos Group has released the Vulkan Portability Extension in version 1.0. Despite the version number, the extension, which should enable or simplify the use of Vulkan calls on other graphic interfaces, is currently still considered provisional. The release works together with MoltenVK and gfx-portability on Metal.

Vulkan is an open source interface for graphics programming that is derived from AMD Mantle. It is considered the successor to the OpenGL API, which is also run by the Khronos Group. Vulkan is much closer to hardware and is therefore less abstract than OpenGL

Vulkan offers an integration of the cross-platform intermediate language SPIR-V (Standard Portable Intermediate Representation). The current release of the graphics interface at the time of writing this message has the version number 1.2.153, and the most recent minor release 1.2 brought numerous additions to the Core API in February.

The Vulkan Portability Extension provides Vulikan functions on other 3D interfaces (Fig. 1).

The Vulkan Portability project provides Vulikan functions on other 3D interfaces.

(Image: Khronos Group)

The Vulkan Portability Project is the counterpart to implementations like zinc or vkd3dthat set OpenGL or Direct3D on top of the Vulkan API. The Portability Extension enables programming with Vulkan calls on other graphic interfaces such as OpenGL, DirectX and Metal.

The connection to Apple’s metal interface has a special meaning: Vulkan is not available on Apple’s operating systems, as no native Vulkan drivers are permitted for macOS and iOS.

There are two open source projects for Metal that provide Vulkan functions under Metal: MoltenVK is a central component of the Vulkan Portability Initiative, to which the now released Portability Extension belongs, and gfx portability is a library, currently still managed as a prototype, to implement portability via the abstraction layer gfx-hal.

Khronos Group

On macOS, the Vulkan Portability Extension works with MoltenVK and gfx-portability.

(Image: Khronos Group)

Both MoltenVK and gfx-portability use SPIRV-Cross, a tool to translate the SPIR-V intermediate code (of the Khronos Group into the Metal Shading Language. MoltenVK had already brought the Khronos Group together as part of its Portability Initiative at the beginning of 2018 with the LunarG SDK presented.

The Vulkan Portability Extension takes over the querying of the functions provided on Metal and the other graphic interfaces. The implementation is called VK_KHR_portability_subset. Developers can use it across platforms to determine the respective subset of the Vulkan API that provides the underlying API.

Like MoltenVK, the Portability Extension is one of the building blocks of the Vulkan Portability project.

Like MoltenVK, the Portability Extension is one of the building blocks of the Vulkan Portability Project.

(Image: Khronos Group)

Further details can be found can be found on the Khronos blog. The Khronos Group asks developers to submit their freedback and suggestions to the discussion in the official repository of the Vulkan Portability Project on GitHub to contribute.


To home page