notes on linux graphics

Ankush Jain
1 min readAug 27, 2022

Previously: X server multiplexed access to GPU. all apps went through X. later OpenGL came in and OpenGL commands were translated to X11 protocol and passed on to GPU. This is Indirect Rendering. Wayland is a more modern display protocol.

Indirect Rendering is obviously slow because you have a stupid proxy. That’s where the Direct Rendering Infrastructure comes in. Indirect rendering is still used for 2D graphics because whatever.

DRM is the manager or kernel component of DRI. Multiplexes access to GPU between DRI clients and X and other things.

Mesa (at least pre-Vulkan) is an open source implementation of OpenGL. Uses DRI to provide graphics acceleration. Talks with DRM for buffer allocation etc. Mesa also implements GLX (OpenGL eXtension for X server), to coordinate areas that are rendered by the 2D driver and 3D drivers.

What is Gallium and State Trackers and Compilers?

Mesa traditionally implements OpenGL but also Vulkan now.

Stack

kernel — amdgpu (new), radeon (old), i915 (intel), nouveau (nvidia)

userspace access to amdgpu — libdrm-amdgpu

— — — — — — —

amdvlk64 — amd’s implementation of Vulkan

OR

Mesa — a collection of userspace drivers. Gallium is common stuff extracted out of all these drivers. Most Mesa drivers use Gallium, some don’t.

RadeonSI — AMD’s Mesa driver. Noveau — Nvidia.

— — — — — — — —

libvulkan

application

Other things: Zink (OpenGL wrapper over Vulkan). Very solid on Linux. Native OpenGL drivers may be redundant in future.

RADV -Mesa’s open source alternative to AMDVLK.

--

--