The Khronos Group, which is the maker of all sorts of cross-platform application programming interfaces (APIs), including OpenGL and Vulkan, announced that it will create an even more portable API that will work on top of Vulkan, Apple’s Metal, and Microsoft’s DirectX 12.
The group said the move was highly requested by the industry, but at the same time it might bring some confusion to what the goals for Vulkan--the original next-generation graphics API--are supposed to be.
Vulkan API
Both Vulkan and DirectX 12 (or rather Direct3D 12) were born, in a sense, out of AMD’s Mantle API, which promised to bring significantly higher multi-core CPU performance in games.
DirectX 12 was, of course, Microsoft’s graphics API for its own platforms, whereas Mantle was seen as too close to AMD to be adopted by other chip makers. Therefore, AMD donated Mantle to the Khronos Group so it could build a more cross-platform graphics API out of it that everyone can back.
Vulkan’s support is not quite universal yet, but it is supported on a large majority of computing devices, including devices running Windows (indirectly via chip makers’ drivers), Linux, and Android (starting with version 7.0 of Android). Apple seems to have been the only major player from the mobile and desktop computing markets that hasn’t adopted Vulkan, because it already has its own “Metal” graphics API.
Khronos’ Plans To Increase Portability
Khronos argued that the field is actually rather fragmented so that a new API--a meta-API if you will--will be needed to act as an overlay on top of Vulkan, Metal, and DirectX 12. The group said that the solution would need to run at close to full efficiency (compared to the more “native” and explicit APIs on top of which it would be built). It would also have to address differences between the three APIs, as it’s likely that not all three will evolve in sync with each other.
Khronos’ idea to solve the problem of dealing with differences seems to be to omit them altogether and base the new “portable API” on the intersection of features of the three explicit APIs. In other words, the feature specifications of the portable API will be defined by the lowest common denominator between Vulkan, Metal, and DirectX 12.
The group added that mainly the performance-oriented features of the three APIs will be omitted. This raises the question of whether or not Khronos’ goal of reaching “close to full efficiency” will still be reached when some of the performance optimizations used by each of the three explicit APIs will be removed.
Building A Next-Gen Web Graphics API
The one place where the new meta-API may make some sense is for the purpose of building web games using the next-generation APIs. Explicit APIs such as Vulkan and Metal are likely too low-level to be used by browsers directly, if nothing else because of security concerns (attackers being able to gain direct control over hardware remotely).
Some kind of overlay or sandbox would’ve needed to be built anyway, but at the same it would need to bring better performance than the recently finished WebGL 2.0 specification (based on OpenGL ES 3.0).
Apple actually announced something similar last month: an API called “WebGPU,” meant to be a standard for web graphics that would work on top of Vulkan, Metal, and DirectX 12. However, considering Apple didn’t want to adopt the existing open Vulkan API, it seems strange of Apple to want everyone else to adopt its own standard now.
A Compromise With Apple?
The idea for the new Khronos meta-API likely exists in the first place because Apple wouldn’t want to adopt Vulkan. Vulkan already works on Windows through driver support from the chip makers, so Apple is the major roadblock in making Vulkan truly cross-platform.
Perhaps a compromise could be made between Khronos and Apple, where Khronos (and all of its members) adopt Apple’s WebGPU API, which would work on top of Vulkan and DirectX, while Apple ditches Metal and adopts Vulkan. This way, Khronos wouldn't have to reinvent the wheel for a new web graphics API based on explicit 3D APIs such as Vulkan, and Apple wouldn't have to go through the trouble of supporting Khronos' WebGPU alternative, either. Chances are that Apple would have to abandon WebGPU if Khronos builds its own, because the web is by definition more cross-platform. Therefore, Apple would have to play along and adopt the browser API that everyone else will adopt.
As we already mentioned, a web graphics API is needed whether Khronos invents the meta-API or not. At the same time, Apple adopting Vulkan means that native games wouldn’t have to use some other lower performance cross-platform API--they could just use Vulkan for Windows, Linux, macOS, Android, and iOS. Khronos and Apple could make this win-win deal between themselves, instead of trying to work around each other and fight these uphill battles for standardization of each other's APIs.