Apple M1 Open-Source GPU Bring-Up Sees An Early Triangle
Alyssa Rosenzweig of Panfrost fame has been working to reverse engineer the Apple M1 graphics as part of the Asahi Linux effort with developer Marcan.
The first open-source triangle on the Apple M1 GPU.
This week the milestone was reached of drawing a triangle using the open-source code. It's an important first milestone but important to keep in mind that this isn't an initial driver triangle but rather hand-written vertex and fragment shaders with machine code for the M1 GPU. Those hand-written shaders are submitted to the hardware via the existing macOS IOKit kernel driver. If not clear enough, this was done on macOS and not the early Linux state as well.
Drawing triangles are an important first step towards GPU drivers. (This triangle pictured back during the RadeonHD days...)
It's a step forward but still a long way out from seeing a functioning OpenGL (and Vulkan?) driver and DRM/KMS driver that are working on Linux with the Apple M1. Considering how long it's taken efforts like Lima, Panfrost, and even the V3D efforts to get into usable shape, it would be very surprising if there is any practical open-source graphics driver support on Linux for the M1 GPU this calendar year.
In any case, for those interested in the efforts to render the first open-source triangle with the M1 GPU, Alyssa has written a lengthy post about the effort via rosenzweig.io. The current demo code can be found via this GitHub repository.
This M1 GPU open-source triangle milestone comes just about one week after developers at Corellium saw early success in booting Linux on the M1. They followed up by posting initial Apple M1 Linux kernel patches albeit still in early form and there is a very long journey ahead.