GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing docs.mesa3d.org — RADV — The Mesa 3D Graphics Library latest documentation RADV¶RADV is a Vulkan driver for AMD GCN/RDNA GPUs. Introduction¶RADV is a userspace driver that implements the Vulkan API on most modern AMD GPUs. Many Linux distributions include RADV in their default installation as part of their Mesa packages. It is also the Vulkan driver on the Steam Deck, the handheld console developed by Valve. Features¶The easiest way to track the feature set of RADV (and other Vulkan drivers in Mesa) is to take a look at the Mesa matrix. Contributing to RADV¶RADV is part of Mesa, so we recommend reading Mesa’s guidelines for submitting patches. Additionally, the RADV team agreed on the following workflow for contributions:
In case your MR needs to be merged immediately (should be rarely needed), feel free to ping the developers to get more approvals. If you find a bug or shortcoming in RADV and cannot address it yourself, file an issue on the tracker. LLM-assisted MRs require a good understanding of the codebase, and reviewing them has a real cost. Reviewers/maintainers may close such MRs at their discretion. LLM-written issues are discouraged: they tend to be verbose and hard to read. Please describe the issue in your own words. LLM-generated reproducers are fine as long as you have reviewed them and they demonstrate the bug. Supported hardware¶All GCN and RDNA GPUs that are supported by the Linux kernel (and capable of graphics) are also supported by RADV, starting from GCN 1. We are always working on supporting the very latest GPUs too. Vulkan API support:
The exact list of Vulkan conformant products can be seen here. Each GPU chip can contain various hardware blocks (also known as IP blocks), and each of those are separately versioned. We usually refer to hardware generations by the main version number of the GFX (graphics) hardware block. Each hardware generation has different chips which usually only have minor differences between each other, such as number of compute units and different minor versions of some IP blocks. We refer to each chip by the code name of its first release, and we don’t differentiate between refreshes of the same chip, because they are functionally exactly the same. For more information about which GPU chip name corresponds to which GPU product, see the src/amd/common/amd_family.h file. Notes about GFX6-7 (GCN 1-2) GPUs:
Basics¶The RADV source code is located in RADV is a userspace driver, compiled to a shared library file.
On Linux, typically When you start a Vulkan application, the Vulkan loader (in userspace)
will find a set of Vulkan drivers (also known as Vulkan implementations),
all of which are technically shared libraries.
If you are running on a system with a supported AMD GPU and have RADV installed,
the loader will find With RADV, when the application makes Vulkan API calls (aka. entry points),
the Responsibilities of RADV vs. the kernel driver¶Due to the complexity of how modern GPUs work, the graphics stack is split between kernel-mode drivers (KMD) and user-mode drivers (UMD). All Graphics APIs such as Vulkan, OpenGL, etc. are implemented in userspace. RADV is a UMD that currently works with the The KMD is responsible for:
The UMD (in our case, RADV) is responsible for:
To communicate with Command submission and PM4 packets¶Vulkan applications record a series of commands in command buffers and later submit these command buffers to one of the queues in the GPU. Command buffer recording in RADV is implemented by emitting packets in a buffer, which is called a command stream (CS). Command packets are more or less analogous to Vulkan API calls,
which means that each Vulkan command (such as draw or dispatch)
corresponds to one or more packets.
However, depending on how closely the hardware follows Vulkan spec
some commands will require a more complex implementation.
For example, a simple For the graphics queue (GFX) and async compute queue (ACE), the PM4 packet format is used; other queues such as SDMA and the various video queues have their own format. Commands typically vary between different GPU generations. When submitting to a queue, several CSs are submitted to the kernel at once.
The kernel terminology calls these indirect buffers (IB) because the kernel
typically uses the After command submission, the packets in the IBs will be executed by the command processor (CP) of the queue that the buffer was submitted to. The exact capabilities and supported commands of the CP depend on HW generation and queue type. Each CP has a collection of registers that control how the CP behaves. Registers in the CP are not to be confused with registers in shaders. For example, the addresses of shader programs, some details of shader execution, draw call information etc. have a corresponding register. These registers can be typically set by PM4 packets. Shader compilation¶One of the main responsibilities of RADV is compiling shaders for Vulkan applications. RADV relies on the Mesa shader compiler stack. Here is a rough overview of how it works:
ACO is the default shader-compiler used in RADV. Read its documentation here. We still maintain an LLVM based compiler backend too, which is these days solely used for testing and hardware bringup. Users are recommended NOT to use the LLVM backend. Shader execution¶Some commands (such as draws and dispatches) ask the CP to launch shaders. Shader launch is handled by the firmware, based on registers that control shader programs. Additionally, draw commands will also automatically use the appropriate fixed function units in the hardware. Shaders are executed by a so-called compute unit on the GPU, which is a SIMD machine. A shader invocation is a single SIMD lane (AMD also calls it thread, not to be confused by a CPU HW thread), and a subgroup is all 64 or 32 SIMD lanes together (also known as a wave). Each wave is a separate running instance of a shader program, but multiple waves can be grouped together into workgroups. Registers in shaders (not to be confused with registers in the CP):
For further reading, AMD has publised whitepapers and documentation for the GCN and RDNA GPU architectures. These can be found on their GPUOpen site. Debugging¶For a list of environment variables to debug RADV, please see RADV driver environment variables for a list. Instructions for debugging GPU hangs can be found here. DRI Configuration Options¶RADV supports per-application option overrides via See the driconf documentation for the file format. Debugging¶
Performance¶
Features¶
Miscellaneous¶
Hardware Documentation¶You can find a list of documentation for the various generations of AMD hardware on the X.Org wiki. Additional community-written documentation is also available in Mesa: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |