Khronos Group president talks about Mantle-based API and its future.
Many of the headlines over the past year or so, at least when comes to GPU APIs, has been hogged by Microsoft’s DirectX 12 or even AMD’s Mantle. However, a new player has emerged over time in the form of Khronos Group’s Vulkan. Built upon Mantle, Vulkan aims to promote flexibility and support while also providing a wider range of accessibility. The goal of Vulkan now involves supporting a variety of architectures while ultimately delivering cross platform graphics and compute.
GamingBolt spoke to Neil Trevett, who is Vice President for Nvidia’s Mobile Ecosystem and President of the Khronos Group, about Vulkan. Trevett discussed the project’s growth over the past several years, engines like Source 2 taking advantage, it’s role in a cloud-based future, and much more.
"It has been an interesting design challenge to keep the level of abstraction low, but still provide portability across multiple architectures – but with the diverse perspective and expertise of the Vulkan working group we think we have succeeded."
Rashid K. Sayed: Mantle has apparently formed the foundation for Vulkan which has now grown to be something bigger. How did this transformation come about?
Neil Trevett: Mantle started the industry discussion around the need for more explicit 3D and compute APIs and strongly influenced the trio of new generation GPU APIs arriving in the industry: DX12, Metal and Vulkan. AMD also directly contributed Mantle to the Vulkan design process. All three share similar design goals to reduce driver complexity and overhead. Metal has chosen to provide less flexibility in some areas, for example memory management, in order to make programming simpler for mobile developers.
Vulkan is focused on providing maximum flexibility and performance to support advanced applications, middleware and engines. Overall however, they are similar enough that business concerns, such as availability on platform, portability and cross-platform support, will probably outweigh low-level technical considerations of API selection for most developers. Metal was originally designed to solely support AMD hardware but the Vulkan working group has substantially extended and adapted the original Mantle design to create an API that supports a wide diversity of GPU and OS architectures.
Of the three new generation APIs, only Vulkan is non-proprietary and royalty-free, providing application portability to any platform that wishes to support it. We expect that Vulkan will ship on Windows (including Windows XP, 7 and 8, not just Windows 10), Android, Linux and many other platforms. It has been an interesting design challenge to keep the level of abstraction low, but still provide portability across multiple architectures – but with the diverse perspective and expertise of the Vulkan working group we think we have succeeded.
Rashid K. Sayed: We know that Source 2 engine will take advantage of Vulkan. Can you talk more about this and how the API will influence its working?
Neil Trevett: Valve has been one the most active proponents and supporters of Vulkan and they have stated that Vulkan will be acritical component of SteamOS and future Valve games.The key design goals for Vulkan are to reduce driver complexity and overhead to provide a portable and predictable API platform with maximum flexibility and performance as demanded by advanced applications, middleware and engines – and so is an ideal fit for Valve’s needs.
Rashid K. Sayed: Vulkan’s nature as an OS agnostic API makes it extremely viable for mobile developers. Can you talk about the other advantages it presents?
Neil Trevett: Many key hardware trends are being driven from mobile devices and the single Vulkan framework is designed to support, mobile, embedded and desktop systems and there will be no need for a ‘Vulkan ES.’ Some of the key architectural considerations include: tiling renderers are common in mobile and have to be supported as efficiently as immediate mode architectures; a unified memory rather than a traditional PC with a PCI-Express bus between the CPU and GPU enables radically new memory management strategies; and multi-core devices are now very common and so it is essential that Vulkan enables effective multi-threading performance.
Rashid K. Sayed: The layered design of Vulkan enables multiple IHVs to plug into a common, extensible architecture for code validation, debugging and profiling during development without impacting production performance; this layering flexibility is expected to catalyze strong innovation in cross-vendor GPU tools.
Neil Trevett: It is also very significant that Vulkan and OpenCL 2.1 are now sharing a core intermediate language technology called SPIR-V, the Khronos Standard Portable Intermediate Representation, which is the first IR to natively support both graphics and parallel programming. SPIR-V splits the compiler chain, enabling high-level language front-ends to emit programs in a standardized intermediate form to be ingested by Vulkan or OpenCL drivers.
"Vulkan, a new generation explicit API, has simpler drivers which means reduced driver overhead resulting in higher performance for CPU-limited applications. For applications that are CPU limited, which happens on desktop, and even more on mobile, end users should notice better performing applications with less stuttering and halting. "
Eliminating the need for a built-in high-level language source compiler significantly reduces GPU driver complexity and will enable a diversity of language front-ends. Additionally, a standardized IR provides a measure of shader IP protection, accelerated shader load times and enables developers to use a common language front-end, improving shader reliability and portability across multiple implementations.
Rashid K. Sayed: What advantages does Vulkan present to current gen GPUS and CPUS? How will this improve the game development process as compared to writing code for Mantle and DirectX 11?
Neil Trevett: Vulkan will run on any GPU hardware that supports OpenGL ES 3.1 and OpenGL 4.X and up – so many devices and platform will see an increase in application and game performance with just a driver update.
Vulkan, a new generation explicit API, has simpler drivers which means reduced driver overhead resulting in higher performance for CPU-limited applications. For applications that are CPU limited, which happens on desktop, and even more on mobile, end users should notice better performing applications with less stuttering and halting.
There will also be fewer functional differences between multiple GPU vendors’ implementations for faster, easier ports. Another fundamental advantage of handing the application more control is that the driver has to do less ‘behind the scenes’ management – resulting in much more reliable and predictable performance which doesn’t hit unexpected road bumps as the driver undertakes complex housekeeping.
Rashid K. Sayed: In that regard, how does the multi-threading support of Vulkan present an advantage over current APIs?
Neil Trevett: In the end, the multi-threaded work creation was the one architectural aspect that was not fixable with OpenGL’s monolithic context management system. With Vulkan, developers can construct any number of graphics, compute and DMA command buffers in memory, with the application having the freedom to use any thread management and synchronization it wants, before command buffers get submitted to a command queue.
Note that Vulkan has a general graphics and compute queue model that can be extended to more heterogeneous processing capabilities in the future. This architecture enables multi-core CPUs to assemble much more work for the GPU: enabling the full power of the GPU to be unleashed in many more applications.
Rashid K. Sayed: There is a lot of confusion and discussion regarding how Vulkan is different from DirectX 12. My readers know that it’s platform agnostic but given that both are set out to achieve the same thing, why is there a need for a separate API?
Neil Trevett: The OpenGL family – which includes OpenGL, OpenGL ES and WebGL – provides access to GPU acceleration on billions of devices and platforms, but we welcome healthy competition between open standard and proprietary APIs as it pushes both forward. In general, independent software vendors benefit from having to code, optimize and support their applications, libraries and engines on a minimum number of low-level APIs.
Hardware vendors can also reduce costs, in general, by having to support a minimum number of low-level APIs. Hence the overall desire to prevent industry fragmentation through open standards – and the wide industry support for Vulkan from both the hardware and software communities. DX12 is only available on Windows, and only Windows 10.
"Yes, Vulkan and DX12 take a broadly similar approach. Both APIs mean that application developers have to take more control, which is more involved in some ways, but in the real world developers spend much of their development time battling driver inconsistencies and unpredictability…"
Rashid K. Sayed: We recently spoke to a developer who believes that it will benefit developers if Vulkan makes it way to the PS4. The PS4 already has his own custom API. Do you think Vulkan will eventually make it to the console? And what kind of benefits it could potentially have given that PS4’s API and Vulkan are built from the same foundation?
Neil Trevett: Khronos cannot comment on any console vendor plans – but I agree that Vulkan is potentially very interesting for consoles – especially if AAA games engines have optimized Vulkan ports – it will mean that considerable AAA content could come easily to a platform that supports Vulkan.
Rashid K. Sayed: Cloud gaming seems to be rage these days on consoles and PCs. Is Khronos doing something that area?
Neil Trevett: PC instances in the cloud need the same cutting edge APIs to drive the GPU as if the application is running games locally. The performance and efficiency of Vulkan is just as important in the cloud as on your PC or console.
Rashid K. Sayed: Staying on the topic on cloud, there is a theory that static hardware such as consoles can be made more powerful by offloading stuff to the cloud. For example procedurally generated terrain is one of the most complex rendering that a developer can implement. Do you think Vulkan can help in such a scenario?
Neil Trevett: Yes – that is an interesting area for research and innovation. Vulkan can provide the same API for graphics and compute on the local device and the cloud – simplifying sophisticated load balancing of apps between local and remote resources.
Rashid K. Sayed: Continuing on from DirectX 12’s performance increase over DX11, how do you think AMD can equip Mantle in the coming days to offer a significant bump in performance compared to its current state?
Neil Trevett: AMD are not evolving Mantle as a production API – they are focusing all their effort on Vulkan and DX12 and have advised developers to do the same (head here for more information).
Rashid K. Sayed: DirectX 12 gives the developers plenty of control regarding how they want their applications to run. But this also means that there is a lot of top level stuff that the developer has to decide and implement. Does Vulkan work the same?
Neil Trevett: Yes, Vulkan and DX12 take a broadly similar approach. Both APIs mean that application developers have to take more control, which is more involved in some ways, but in the real world developers spend much of their development time battling driver inconsistencies and unpredictability – and in that respect that a Vulkan app could be actually easier to get fully debugged, and reliably performing across multiple platforms. For developers that don’t need all of Vulkan’s flexibility, there will be utility libraries and engines that that will layer over Vulkan to provide a much higher and familiar level of programming.
"Vulkan is the future of cross-platform graphics and compute – but Khronos is firmly committed to fully support and evolve the existing OpenGL, OpenGL ES and OpenCL APIs for as long as there is an industry need and demand."
Rashid K. Sayed: What is Apple’s reaction to Vulkan? Do you think they will drop Metal in favour of Vulkan?
Neil Trevett: Apple is a Khronos member but we cannot comment on whether Apple plans to support Vulkan on iOS or MacOS though they are free to do so if they wish. No application developer will be able to use Metal exclusively unless their business needs are met by shipping only on Apple and not on any other platform.
Rashid K. Sayed: What’s on the cards next for Vulkan? Could you tell us about any upcoming features you’re currently working on?
Neil Trevett: Because time is of the essence, we are ensuring that Vulkan 1.0 delivers all the essentials for a new generation API and sets a firm foundation for future evolution – but deferring any non-essential features to future versions. In any case we need real-world experience and feedback from Vulkan 1.0 to make data driven decisions for potential new features.
Rashid K. Sayed: What can we expect to hear more information on the API? Furthermore are there any plans to reveal any hard data and benchmarks results?
Neil Trevett: Vulkan is on schedule to have specs and implementations before the end of the year. Benchmark data will start to appear once first public implementations are available. The Vulkan working group started work in June 2014 when it became clear that industry was ready for a ground-up re-design of GPU APIs. There is a lot of energy and effort going into defining Vulkan – it is not a normal, multi-year, standardization effort – it will be completed much faster than that…
Rashid K. Sayed: Is there anything else you want to tell our readers before I let you go?
Neil Trevett: Vulkan is the future of cross-platform graphics and compute – but Khronos is firmly committed to fully support and evolve the existing OpenGL, OpenGL ES and OpenCL APIs for as long as there is an industry need and demand. These APIs are pervasively available on billions of devices and will ship for many, many years to come. With Vulkan, Khronos has now added to a rich mix of technologies so that we can evolve the roadmap for open standard graphics and compute. Khronos is dedicated to continuing to ensure that developers are able to access APIs with cutting edge capabilities and wide portability to help maximize the commercial success of their applications.