Apple M1 Open-Source GPU Bring-Up Sees An Early Triangle

Written by Michael Larabel in Apple on 22 January 2021 at 01:36 PM EST. 28 Comments
APPLE
The open-source/Linux Apple M1 work continues to be quite busy this week... The latest is Alyssa Rosenzweig who has been working on reverse-engineering the M1 graphics processor has been able to write some early and primitive code for rendering a 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.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week