Asahi Linux project’s OpenGL support on Apple Silicon officially surpasses Apple’s
For around three years now, the team of independent developers behind the Asahi Linux project has worked to support Linux on Apple Silicon Macs, despite Apple’s total lack of involvement. Over the years, the project has gone from a “highly unstable experiment” to a “surprisingly functional and usable desktop operating system.” Even Linus Torvalds has used it to run Linux on Apple’s hardware.
The team has been steadily improving its open source, standards-conformant GPU driver for the M1 and M2 since releasing them in December 2022, and today, the team crossed an important symbolic milestone: The Asahi driver’s support for the OpenGL and OpenGL ES graphics have officially passed what Apple offers in macOS. The team’s latest graphics driver fully conforms with OpenGL version 4.6 and OpenGL ES version 3.2, the most recent version of either API. Apple’s support in macOS tops out at OpenGL 4.1, announced in July 2010.
Developer Alyssa Rosenzweig wrote a detailed blog post that announced the new driver, which had to pass “over 100,000 tests” to be deemed officially conformant. The team achieved this milestone despite the fact that Apple’s GPUs don’t support some features that would have made implementing these APIs more straightforward.
“Regrettably, the M1 doesn’t map well to any graphics standard newer than OpenGL ES 3.1,” writes Rosenzweig. “While Vulkan makes some of these features optional, the missing features are required to layer DirectX and OpenGL on top. No existing solution on M1 gets past the OpenGL 4.1 feature set… Without hardware support, new features need new tricks. Geometry shaders, tessellation, and transform feedback become compute shaders. Cull distance becomes a transformed interpolated value. Clip control becomes a vertex shader epilogue. The list goes on.”
Now that the Asahi GPU driver supports the latest OpenGL and OpenGL ES standards—released in 2017 and 2015, respectively—the work turns to supporting the low-overhead Vulkan API on Apple’s hardware. Vulkan support in macOS is limited to translation layers like MoltenVK, which translates Vulkan API calls to Metal ones that the hardware and OS can understand.
Apple’s OpenGL support has been stuck at the 4.1 level since macOS 10.9 Mavericks was released in 2013. Since then, the company has shifted its focus to its proprietary Metal graphics API, which, like DirectX 12 and Vulkan, is a “low-overhead” API meant to reduce the performance overhead sometimes associated with older APIs like OpenGL. But despite declaring OpenGL officially deprecated in 2018, Apple has left its existing OpenGL implementation alone since then, never updating it but also maintaining support even as it has transitioned from Intel’s processors to its own CPUs and GPUs.
Rosenzweig’s blog post didn’t give any specific updates on Vulkan except to say that the team was “well on the road” to supporting it. In addition to supporting native Linux apps, supporting more graphics APIs in Asahi will allow the operating system to take better advantage of software like Valve’s Proton, which already has a few games written for x86-based Windows PCs running on Arm-based Apple hardware.
Though there are still things that don’t work, Fedora Asahi Remix is surprisingly polished and supports a lot of the hardware available in most M1 and M2 Macs—including the webcam, speakers, Wi-Fi and Bluetooth, and graphics acceleration. Other features, like Thunderbolt, running displays over USB-C, the system’s built-in microphone, and the Touch ID fingerprint sensors, remain non-functional. Asahi’s most recent update blog post, published in mid-January, highlighted HDMI support, support for DRM-protected websites via Google’s proprietary Widevine package, Touchbar support for the handful of Apple Silicon Macs that use one, and more.
As for the newest wave of M3 Macs, Asahi developer Hector Martin said in October 2023 that basic support for the newest chips would take “at least six months.” Among other things, the team will need time to support the M3 GPU in their drivers; the team also relies primarily on Mac mini models for development, and the M3 Mac mini doesn’t exist yet.
https://arstechnica.com/?p=2003456