October 31st, 2024

An Update on Apple M1/M2 GPU Drivers

Alyssa Rosenzweig updated on Apple M1/M2 GPU drivers, achieving OpenGL 4.6 and Vulkan 1.3 conformance, supporting tessellation shaders, and enabling x86 game emulation on ARM hardware. Future work targets M3 support.

Read original articleLink Icon
RespectAdmirationAstonishment
An Update on Apple M1/M2 GPU Drivers

Alyssa Rosenzweig provided an update on the Apple M1 and M2 GPU drivers at the X.Org Developers Conference 2024, highlighting significant advancements in the driver, which is notably written in Rust. The driver has achieved OpenGL 4.6 conformance and now supports tessellation shaders, although limitations in the hardware prevent full compliance with OpenGL, Vulkan, and Direct3D standards. The driver emulates certain features using compute shaders, and while software-only tessellation is slow, OpenCL-based tessellation shows promising performance. Rosenzweig also announced Vulkan 1.3 conformance for the Honeykrisp driver, which has been adapted from NVIDIA's NVK driver. Despite challenges in running AAA games due to differences in architecture and memory management, a virtual machine approach allows for effective emulation of x86 games on ARM hardware. Games like Portal and Cyberpunk 2077 have been successfully run on the system, although higher RAM is recommended for optimal performance. Rosenzweig plans to work on M3 GPU support next, while ray tracing is not a current priority. The session concluded with a demonstration of gameplay, showcasing the capabilities of the new driver.

- The Apple M1/M2 GPU driver has achieved OpenGL 4.6 and Vulkan 1.3 conformance.

- Tessellation shaders are supported, but hardware limitations restrict full compliance with major graphics standards.

- A virtual machine approach enables running x86 games on ARM hardware, with successful gameplay demonstrated.

- Higher RAM is recommended for running demanding games, with 16GB being ideal.

- Future work will focus on M3 GPU support, while ray tracing is not prioritized.

Related

AMD says its new laptop chips can beat Apple

AMD says its new laptop chips can beat Apple

AMD showcased new Ryzen AI chips, claiming superiority over Apple's M1 Pro, competing with Intel and Qualcomm. The event highlighted Strix Point Ryzen AI chips on Zen 5 architecture, emphasizing multitasking, image processing, 3D rendering, and gaming improvements. AMD's claims lacked concrete evidence, focusing on enhanced performance and architectural improvements. Real-world performance, battery life, and competitiveness with rivals remain uncertain until laptops featuring the new chips are released.

Metal-benchmarks: Apple GPU microarchitecture

Metal-benchmarks: Apple GPU microarchitecture

The "Metal Benchmarks" GitHub repository analyzes Apple GPU microarchitecture, comparing it with AMD and Nvidia, detailing performance metrics, memory specifications, and limitations, serving developers and researchers in graphics and compute workloads.

AAA Gaming on Asahi Linux

AAA Gaming on Asahi Linux

Asahi Linux has released an alpha gaming toolkit for M1 and M2 Macs, enabling AAA gaming through Vulkan drivers, x86 emulation, and Windows compatibility, with future performance improvements anticipated.

Rust in enterprise kernels

Rust in enterprise kernels

The Maintainers Summit confirmed ongoing Rust integration into enterprise kernels, addressing challenges with the nouveau driver and the new Nova project, while considering the best approach for a core driver.

Apple Introduces M4 Pro and M4 Max

Apple Introduces M4 Pro and M4 Max

Apple has launched the M4 Pro and M4 Max chips, enhancing performance with advanced GPU capabilities, Thunderbolt 5 support, increased memory bandwidth, and improved AI features while prioritizing user privacy.

AI: What people are saying
The comments reflect a strong appreciation for Alyssa Rosenzweig's work on Apple M1/M2 GPU drivers and the challenges involved in such projects.
  • Many commenters express admiration for Alyssa's dedication and the technical challenges she has overcome.
  • There is a call for recognition of her contributions, with suggestions for awards and job opportunities.
  • Some users discuss the complexities of hardware emulation and the potential for future developments, such as M3 support.
  • Comments highlight the impressive nature of her work, especially considering her young age when she started.
  • There are discussions about the broader implications of her work for gaming and driver development on Linux.
Link Icon 20 comments
By @whitehexagon - 3 months
What I really respect is the dedication to completing support for the M1/M2. Too many projects get dropped the moment the next shiny ray-traced toy comes along.

I know this type of work can be challenging to say the least. My own dabble with Zig and Pinephone hardware drivers reminded me of some of the pain of poorly documented hardware, but what a reward when it works.

My own M1 was only purchased because of this project and Alyssa's efforts with OpenGL+ES. It only ever boots Asahi Linux. Thank-you very much for your efforts.

By @helsinki - 3 months
Alyssa's solution to the 4KB vs. 16KB page size discrepancy by running everything in a virtual machine feels like both a clever hack and a potential performance bottleneck. It makes me wonder about the long-term implications of such workarounds. Are we reaching a point where the complexity of bridging these gaps outweighs the benefits, especially when dealing with proprietary hardware designed to be a closed ecosystem?

This also touches on a broader question about the future of open-source efforts on platforms that are inherently restrictive. While it's inspiring to see games like Control running at 45fps on an M1 MAX with open-source drivers, it begs the question: Should the community continue to invest significant resources into making closed systems more open, or should efforts be redirected toward promoting more open hardware standards?

Apple's approach to hardware design warrants criticism. By creating GPUs with limitations that hinder standard functionalities like tessellation shaders and using non-standard page sizes, Apple places unnecessary obstacles in the path of developers. This closed ecosystem not only complicates the work for open-source contributors but also stifles innovation that could benefit all users.

By @kristianp - 3 months
I was going going to say she should work for Valve to help get Steam working on Linux on Macs, but it seems she already does? [1]

[1] https://en.wikipedia.org/wiki/Alyssa_Rosenzweig#Career

By @renewiltord - 3 months
The work by Alyssa R and Asahi Lina is great stuff. I have to say that a lot of this is really inscrutable unless you’re used to driver code. I wish it were much easier to write this stuff but hardware stuff is so idiosyncratic.

Have to say I do enjoy all the old school style whimsy with the witch costume and whatnot.

By @gigatexal - 3 months
Is anyone else astonished at how much is missing in the hardware and how much is emulated?
By @olliej - 3 months
Alyssa is amazing, I remember the first article about the GPU work, and then learning she was only 17 and poof mind blown.

It's truly stunning that anyone could do what she did, let alone a teenager (yes I know, she's not a teenager anymore, passage of time, etc :D)

By @skoczko - 3 months
Since bringing modern OpenGL and Vulkan onto Apple Silicon is impossible without an emulation layer anyway, could, theoretically, a native Metal API for Linux be created? Or is Metal too ingrained in macOS SDKs? MoltenVK is attempting to solve the same issues Alyssa was talking about in her talk [1, the last comment on the issue is hers]

[1] https://github.com/KhronosGroup/MoltenVK/issues/1524

By @gcr - 3 months
I’ve been trained to expect articles with this headline to say something like “we’re dropping support and are getting acqui-hired.”
By @wwalexander - 3 months
Alyssa Rosenzweig deserves a Turing Award!
By @kachapopopow - 3 months
I always wondered about these /SubscriberLink/ links. Is sharing them considered unethical?
By @UncleOxidant - 3 months
Will M3/M4 need completely different drivers?
By @scottlamb - 3 months
> tessellator.cl is the most unhinged file of my career

...so far. The presenter is only 23 apparently. Maybe I'm speaking only for myself here, but I think career unhingedness does not go down over time as much as one might hope.

In all seriousness, she does really impressive work, so when she says this 2,000 lines of C++ is inscrutable, that gives one pause. Glad it's working nonetheless.

By @egwor - 3 months
Really impressive. Well done (and thanks for the laughs. Starting in French would be so funny)
By @mmaniac - 3 months
I'm not sure I've ever seen a bigger case of pissing in the wind than Asahi Linux. I respect the dedication but it takes a special kind of personality to not wash their hands of an affair like this.
By @flkenosad - 3 months
I love her. Keep up the incredible work Alyssa.
By @recvonline - 3 months
Any link to the fact that the drivers are written in Rust?
By @computersuck - 3 months
That's not even a costume because she's definitely a wizard
By @m463 - 3 months
"our target hardware is running literally none of those things". What is needed is to somehow translate DirectX to Vulkan, Windows to Linux, x86 to Arm64, and 4KB pages to 16KB pages.

oh my.

By @adastra22 - 3 months
> frankly, I think ray tracing is a bit of a gimmick feature

That's incredibly arrogant. The whole industry is adopting ray tracing, and it is a very desired feature people are upgrading video cards to get working on games they play.