
Using Vulkan® Device Memory
This post serves as a guide on how to best use the various Memory Heaps & Memory Types exposed in Vulkan on AMD drivers, starting with some high-level tips.
The AMD Open Source Driver for Vulkan® is an open-source Vulkan driver for AMD Radeon™ graphics adapters on Linux®.
The driver is built on top of AMD’s Platform Abstraction Library (PAL), a shared component that is designed to encapsulate certain hardware and OS-specific programming details for many of AMD’s 3D and compute drivers. Leveraging PAL can help provide a consistent experience across platforms, including support for recently released GPUs and compatibility with AMD developer tools.
Shaders that compose a particular VkPipeline
object are compiled as a single entity using the LLVM-Based Pipeline Compiler (LLPC) library. LLPC builds on LLVM’s existing shader compilation infrastructure for AMD GPUs to generate code objects compatible with PAL’s pipeline ABI.
The AMD Open Source Driver for Vulkan is designed to support a wide range of AMD GPUs:
Note: For Pre-Polaris and Pre-Raven GPUs, please use v-2021.Q2.5 or older release.
The AMD Open Source Driver for Vulkan is designed to support following distros and versions on both the AMDGPU upstream driver stack and the AMDGPU Pro driver stack:
The driver has not been well tested on other distros and versions. You may try it out on other distros and versions of your choice.
The following features and improvements are planned in future releases (Please refer to Release Notes for update of each release):
You are welcome to submit contributions of code to the AMD Open Source Driver for Vulkan.
The driver is built from source code in four repositories: LLVM, LLPC, XGL, and PAL.
For changes to LLVM, you should submit contributions to the LLVM trunk. Commits there will be evaluated to merge back into the amd-gfx-gpuopen-master
branch periodically.
For changes to XGL or PAL, please create a pull request against the dev branch. After your change is reviewed and if it is accepted, it will be evaluated to merge into the master branch in a subsequent regular promotion.
Important
By creating a pull request, you agree to allow your contribution to be licensed by the project owners under the terms of the MIT license.
When contributing to XGL and PAL, your code should:
Please make each contribution reasonably small. If you would like to make a big contribution, like a new feature or extension, please raise an issue first to allow planning to evaluate and review your work.
Important
Since PAL is a shared component that must support other APIs, other operating systems, and pre-production hardware, you might be asked to revise your PAL change for reasons that might not be obvious from a pure Linux Vulkan driver perspective.
For more information, including detailed build instructions for both Ubuntu and RedHat Linux, installation instructions, how to get your new driver up and running, runtime settings customisation, and the built-in profiling present in the PAL layer, please head on over to GitHub and check out the README.md
in the AMDVLK
repository.