This makes UAPI design a very difficult problem! The Linux DRM subsystem even has special rules for GPU UAPIs to try to minimize these issues… UAPI baby steps If you make a mistake, you’re stuck with it forever. Since graphics UAPIs can be quite complicated, and often need to change as new GPU support is added to any given driver, this makes it very important to have a good UAPI design! After all, once a driver is in the upstream Linux kernel, you can’t break compatibility with the old UAPI, ever. That means that newer Linux kernel versions must support the same APIs that older ones do, and older apps and libraries must continue working with newer kernels. The Linux kernel has a super strict userspace API stability guarantee. So if they need a new feature to support a new GPU, or they need to fix a bug or a design flaw, or make a change to improve performance, that’s not an issue! They don’t have to worry too much about getting the UAPI right, since they can always change it later. On macOS, since Apple controls both the kernel driver and the userspace Metal/GL driver, and since they are always updated in sync as part of new macOS versions, the UAPI can change whenever they want. This is the interface that they use to communicate between them, and it is specific to each class of GPUs! Since the exact split between userspace and the kernel can vary depending on how each GPU is designed, and since different GPU designs require different bits of data and parameters to be passed between userspace and the kernel, each new GPU driver requires its own UAPI to go along with it. The kernel part is in charge of managing GPU resources and how they are shared between apps, and the userspace part is in charge of converting commands from a graphics API (such as OpenGL or Vulkan) into the hardware commands that the GPU needs to execute.īetween those two parts, there is something called the Userspace API or “UAPI”. In every modern OS, GPU drivers are split into two parts: a userspace part, and a kernel part. Xonotic running at 800+ FPS on an Apple M2 What’s a UAPI? If this is your first time reading about our GPU adventures, you might want to check out my Tales of the M1 GPU article first, which covers what I worked on last year! Also don’t miss Alyssa’s amazing series of articles on her website, which goes all the way back to January 2021! ^^Īnd if this is too long, feel free to jump to the end to learn what this all means for Asahi Linux! Today we’re releasing a big update to our GPU drivers for Asahi Linux, so I wanted to talk to you about what we’ve been working on since then, and what’s next! It’s been a wild ride! Just at the end of last year we released the first version of our drivers, after many months of reverse engineering and development. As you probably know, I’ve been working together with the rest of the Asahi Linux team on open source GPU drivers for Apple Silicon platforms.
0 Comments
Leave a Reply. |