Live data from Hacker News

An Update on Apple M1/M2 GPU Drivers

lwn.net

61–70 of 291 posts

Re: An Update on Apple M1/M2 GPU Drivers

#61

Any link to the fact that the drivers are written in Rust?

https://asahilinux.org/2022/11/tales-of-the-m1-gpu/

> Since this was going to be the first Linux Rust GPU kernel driver, I had a lot of work ahead! Not only did I have to write the driver itself, but I also had to write the Rust abstractions for the Linux DRM graphics subsystem. While Rust can directly call into C functions, doing that doesn’t have any of Rust’s safety guarantees. So in order to use C code safely from Rust, first you have to write wrappers that give you a safe Rust-like API. I ended up writing almost 1500 lines of code just for the abstractions, and coming up with a good and safe design took a lot of thinking and rewriting!

Also https://github.com/AsahiLinux/linux/blob/de1c5a8be/drivers/g... where "drm" is https://en.wikipedia.org/wiki/Direct_Rendering_Manager

Re: An Update on Apple M1/M2 GPU Drivers

#62
post #56

Earlier quoted context omitted.

Yes. Apple have their own graphics API. They were able to decide that, say, geometry shaders aren't worth the chip area or engineering effort to support. Other IHVs don't get that choice; for geometry shaders, for instance, they're part of both Vulkan and OpenGLES, there are games and benchmarks that use them, and customers (end-users, gamedevs, review/benchmark sites, SoC vendors) will evaluate GPUs based, in some s…

Other hardware vendors absolutely do the same. Geometry shaders are poor performers on several other vendors for precisely the same reason

At least some Qualcomm, Imagination and Broadcom GPUs support geometry shaders in hardware. Not entirely sure about Arm. To be fair, it could be the support isn't very good.

Re: An Update on Apple M1/M2 GPU Drivers

#63
post #41

Earlier quoted context omitted.

She is not doing CI/CD so the PMs would fire her in any modern company. "Where are the unit tests?!? How is it possible to write code without tests and 100% coverage!"

OpenGL and Vulkan have tons of tests and Alyssa runs them. I don't know if it's automated through CI.

Reportedly, the lack of M3 support so far is because there is no M3 Mac Mini which they can use for CI.

Re: An Update on Apple M1/M2 GPU Drivers

#64
> 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.

Re: An Update on Apple M1/M2 GPU Drivers

#66

> 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.

The same was true about 3D TVs. Also a gimmick.

Re: An Update on Apple M1/M2 GPU Drivers

#68

> 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.

That doesn’t necessarily mean it’s important, just that it’s the only thing they can think of to sell. Much like some AI stuff we’re seeing right now.

Personally I think it’s useful for a few things, but it’s not the giant game changer I think they want you to think it is.

Raytraced reflections are a very nice improvement. Using it for global illumination and shadows is also a very good improvement.

But it’s not exactly what the move to multi texturing was, or the first GPUs. Or shaders.

Re: An Update on Apple M1/M2 GPU Drivers

#69

> 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.

I don't know, Hardware Unboxed recently did a review of 30-some games comparing the visuals with and without ray tracing, and the conclusion for the majority of them was that it wasn't worth it. There were only maybe half a dozen games where the ray tracing was an unambiguous improvement.

So I think calling it "a bit of a gimmick" is accurate for many of the games that shipped in, even if not all of them.

Re: An Update on Apple M1/M2 GPU Drivers

#70
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)

Post reply on HN