7/3/2023 0 Comments Xonotic nvidia![]() That’s super cool! She started writing an M1 GPU OpenGL driver for Mesa, the Linux userspace graphics stack, and just a few months later she was already passing 75% of the OpenGL ES 2 conformance tests, all on macOS!Įarlier this year, her work was so far ahead that she was running games on a fully open source Mesa OpenGL stack, running on top of Apple’s kernel driver on macOS! But there was still no Linux kernel driver… time to help out with that part! ✨ The Mysterious GPU Firmware That’s a ton of work, but less than one month in she was already drawing her first triangle! She’s amazing! If you haven’t checked out her series on dissecting the M1 GPU you should visit her website and take a look! ✨✨īut wait, how can she work on the user space driver without a kernel driver to go with it? Easy, she did it on macOS! Alyssa reverse engineered the macOS GPU driver UAPI enough to allocate memory and submit her own commands to the GPU, and this way she could work on the user space part without having to worry about the kernel bit. Together with Dougall Johnson (who focused on documenting the GPU shader architecture), she started reverse engineering all the user space bits, including the shaders and all the command list structures needed to set up rendering. That means that in order to make the M1 GPU work with Asahi Linux, we need two bits: a kernel driver and a user space driver! □ Alyssa joins the projectĪll the way back in 2021 when Asahi Linux started, Alyssa Rosenzweig joined the project to start working on reverse engineering the M1 GPU. This UAPI is what lets the user space part ask the kernel to allocate/deallocate memory and submit command lists to the GPU. These APIs are usually different for every driver! In Linux we call that the UAPI, but every OS has something similar. All modern GPU drivers work this way, on all major OSes!īetween the user space driver and the kernel driver, there is some kind of custom API that is customized for each GPU family. Meanwhile, the kernel part is in charge of managing the MMU and handling memory allocation/deallocation from different apps, as well as deciding how and when to send their commands to the command processor. The user space part is in charge of compiling shader programs and translating API calls (like OpenGL or Vulkan) into the specific command lists that the command processor will use to render the scene. In order to handle all these moving parts in a reasonably safe way, modern GPU drivers are split into two parts: a user space driver and a kernel driver. (This is all very simplified and in reality there are a lot more parts that vary from GPU to GPU, but those are the most important bits!) ![]()
0 Comments
Leave a Reply. |