Vulkan is the next generation version of the OpenGL graphics API by the Khronos Group designed to work better with current generation GPU architectures. Part of aligning better with the underlying hardware actually made Vulkan a great deal more work than OpenGL. Thankfully however, in this day and age, that’s a problem for game engine developers to deal with. On that topic, the developers at Unity have done exactly that. Now available from Unity, based on Unity 5.5 beta 4, is a preview of the new Vulkan renderer. Why should you care? Well here are the benefits of Vulkan described on the Unity blog:
The main benefit of Vulkan over older mobile rendering APIs such as OpenGL ES 3.x is speed. Vulkan is designed to take advantage of multiple CPU cores by allowing the application to build command lists in multiple threads in parallel. This allows the application to take advantage of all of the CPU cores on the device, improving performance. The Vulkan preview release supports this via the “Enable Graphics Jobs” checkbox in the player settings. However, we’re seeing large performance gains even when running the renderer in a single thread. In one of our internal benchmarks we’re seeing up to 35% improvement in frame times on Android, compared to OpenGL ES 3.1 renderer, even though they’re both running in a single rendering thread!
For now however, Vulkan is limited to a subset of devices right now. Again from the Unity blog:
This preview build has Vulkan support enabled for the following targets:
- Windows standalone (no Vulkan support in the editor yet)
- Linux standalone
On Windows, we’ve been mainly testing on Nvidia and AMD GPUs. Remember to update your GPU drivers!Vulkan is a new technology and the drivers keep improving constantly, so before reporting a crash, check first if an updated driver fixes the problem.
On Android, we’ve tested on the following devices:
- Samsung Galaxy S7 (European version, with ARM Mali GPU). Make sure you have the latest firmware, with build date August 2016 or later. Previous firmwares have older drivers that are known not to work.
- Nvidia Shield Tablet (both versions), Shield Console.
- Google Nexus 6P, 5X (although you might see more issues on these handsets compared to the others).
The following devices are known not to work with the currently available firmware:
- Samsung Galaxy S7 (US version, with Qualcomm GPU). We expect that an upcoming firmware with an updated driver should fix this.
On Linux, only the Nvidia GPUs have been tested. You’ll need to have libvulkan1 installed (either from your distro or via the LunarG Vulkan SDK) and recent enough drivers (367.x or newer). However, we’ve seen random hangs when transitioning from the splash screen into the game itself. So when testing this experimental release, you might consider disabling the Unity splash screen, if you have that option.