Driver tweak for Windows ARM could offer insane performance increases with Vulkan
Editor note: it appears as though future Qualcomm Adreno GPU drivers will include the native Vulkan driver, which means using any of the workarounds suggested below will no longer be required.
The other day I took a break from doomscrolling to browse my favourite developer sites for some interesting discussion, and one thread grabbed my attention. A developer was asking about an app they were creating with Vulkan, and how the performance wasn’t the greatest. There was some mention of the OpenCL™, OpenGL®, and Vulkan® Compatibility Pack, and I was now intrigued.
A history of Vulkan on Windows ARM
Windows ARM has actually been around for quite some time before seeing a resurgence over the past year, and as a somewhat niche platform, native drivers and software had been scarce to find. Of course this has now drastically changed, but it doesn’t change the fact that up until the last few months there were no native Vulkan drivers for the Windows ARM platform.
So, how to you maintain compatibility with all these graphic APIs without native driver support? You use emulation or translation layers, which is exactly what the OpenCL™, OpenGL®, and Vulkan® Compatibility Pack is. Since getting apps to work was goal number one, you aren’t going to see huge performance, but rather apps would now work correctly.
You’ll see that Vulkan is included in this package, which is where my intrigue first came from. Vulkan just recently released a native arm64 driver, so I was curious as to what this compatibility pack was doing.
Mesa and Dzn
It turns out that Microsoft had been working on a driver for Mesa (WSL) called Dzn that would bring Vulkan to arm64 devices. This driver used Direct3D12 to translate the Vulkan API and was focused on compatibility rather than performance. Microsoft quickly ported Dzn to Windows and added it into the compatibility pack which defaulted Windows ARM to use the Dzn Direct3D12 driver for Vulkan based applications which was a huge plus for users.
Native Vulkan and performance
After finding out about Dzn and how it works by utilizing D3D12, I figured this could be a reason for the poor performance. One of the suggestions was using a tool provided by LunarG in the Vulkan SDK to override the default driver.
Now of course one of the options is just uninstalling the compatibility pack altogether, but then you will lose all OpenCL/OpenGL support which might work for you, but I would not advise this. It’s hard to determine what apps use which API and losing these may cause crashes or system hangs.
The vkconfig tool is a better option as it allows you to adjust the default driver that Windows uses (Dzn/Direct3D12) to the actual physical GPU of the system, rather than through Dzn. Since Vulkan is what they call a low-level graphics API, it can access hardware directly if the correct driver is present, which allows very good performance.
How-To
First, you will need to download and install the latest LunarG Vulkan SDK, which you can find here. Make sure you select the ARM64 version.
After install, you can find vkconfig in the SDK directory under the “bin” folder.
When you run it, you will be presented with a window with quite a few settings. Click on the “Portability” setting on the left, then what you are looking for is under the screen on the right, under the VK_LAYER_KHRONOS_profiles dropdown.
You can leave all the other settings as they are, paying only attention to the “Force Device” dropdown. Here you want to select “Using Device Name” and then select the physical GPU of your device (in my case it’s the Adreno X1-85 GPU).
Now, run your Vulkan app and enjoy that massive performance increase!
Quick Testing
I have only been able to test Doom (the remake) so far, but the results speak for themselves. This was using the default settings, other than disabling motion blur, chromatic aberration and setting the render scale to 80%.
Dzn (D3D12): ~40-75FPS
Native Vulkan: ~80-200FPS
Now, I don’t have much experience running tons of benchmarks so I am hoping someone who has much more experience, and a diverse array of hardware can supplement my quick and dirty test with some better data, but until then you can see how much better the native Vulkan driver is vs Dzn.
If you enjoy reading about Windows on ARM, consider subscribing!