AMD Open-Source Driver For Vulkan "AMDVLK" Is Now Available

Written by Michael Larabel in Display Drivers on 22 December 2017 at 06:00 AM EST. Page 1 of 2. 66 Comments.

Last week I reported on AMD finally preparing their open-source Vulkan driver that many Linux enthusiasts have been looking forward to since the Vulkan 1.0 debut nearly two years ago. As of this morning, the source-code to this official AMD Vulkan driver is now publicly available. AMD Linux fans and developers can rejoice this weekend building out this "AMDVLK" Vulkan driver and its new Platform Abstraction Layer (PAL).

AMDVLK

This driver that's now open-source is the official AMD Vulkan driver -- what up to now was available via the AMDGPU-PRO driver and shared with the Radeon Windows Vulkan driver. This open-source Radeon Vulkan driver is not to be confused with "RADV" that is the community-driven Radeon Vulkan driver living within Mesa and continues to be developed independently of AMD. If you are not aware of this AMD Linux driver landscape, you really need to make it a new year's resolution to increase your Phoronix reading. ;)

The "name" for this official open-source AMD Vulkan driver to avoid confusion with the separate RADV effort is being called "AMDVLK" or "AMD Open Source Driver for Vulkan." At least AMDVLK is distinctly different from RADV.

Meet The Platform Abstraction Layer (PAL)

As written in my earlier article, AMDVLK is built separate from Mesa. It's not using any Mesa/Gallium/NIR APIs or anything living within the Mesa tree. This is since this Vulkan driver is designed with cross-platform and other internal AMD APIs in mind.

AMDVLK builds upon AMD's Platform Abstraction Library (PAL) that is a shared component encapsulating some hardware and operating system programming details across AMD's multiple drivers... Basically a hardware abstraction layer making their driver more portable across their GPUs and operating systems and allowing for greater code use of hardware-specific programming sequences across different APIs. PAL sits below their Vulkan and Direct3D drivers.


The generic AMD PAL architecture, not specific to Vulkan nor Linux.

I am told that now the Platform Abstraction Layer is open-source, RadeonSI developers might also end up picking it up for re-using it for having these unified hardware programming sequences, etc. We'll see if it provides any benefit for current Radeon hardware support (aside from perhaps fixing some regressions) but might help in bringing up next-gen hardware support due to the code re-use.

Tieing in with this Platform Abstraction Layer is their LLPC library, the LLVM-based Pipeline Compiler. The LLPC library builds on the LLVM compiler infrastructure to generate shaders compatible with the PAL's pipeline interface.

As of right now, AMDVLK doesn't appear to build against the current upstream LLVM code-base, but hopefully that will change in the near future as it's otherwise a blocker for easily packaging AMDVLK in distribution repositories, etc.

Below is a diagram provided by AMD showing AMDVLK fit in obviously between libvulkan and how within AMDVLK it fits in with SPIR-V, LLPC, LLVM, and the PAL ultimately in turn communicating with the AMDGPU libdrm code for interfacing with the AMDGPU Direct Rendering Manager kernel driver.


How AMDVLK fits into the Linux driver stack.

AMDVLK Hardware Support

As with AMDGPU-PRO and similar to RADV, the AMDVLK driver supports hardware going back to the Radeon HD 7000 "GCN 1.0" series. But as with RADV and how AMDGPU-PRO handles it, as AMDVLK/PAL only interfaces with the AMDGPU libdrm on Linux systems, you need to be using the AMDGPU DRM driver. So if you are using the default Radeon DRM driver with GCN 1.0/1.1 hardware, you need to switch to using AMDGPU DRM; details on that and more can be found in my recent AMDGPU vs. Radeon DRM article with Linux 4.15. Obviously if you are on a more recent (GCN 1.2+) GPU, you need no kernel changes as AMDGPU is the DRM driver in use.

AMDVLK Features

AMD is advertising Vulkan 1.0 compliance, more than 30 Vulkan extensions, Radeon GPU Profiler support, built-in debug/profiling tools, and mid-command buffer preemption and SR-IOV virtualization support as the key features for this current AMDVLK release.

Moving forward they are planning to continue to adapt to upstream Vulkan changes, provide hardware performance counter support through RenderDoc, optimizations to LLPC to improve GPU-limited performance and compile times, and optimizations to improve CPU-limited performance.


Related Articles