4 ms·
This is for Fedora on the M1. It would be amazing to get this for macOS. What's involved in pulling something like that off?
by politician 3y ago
This is for Fedora on the M1. It would be amazing to get this for macOS. What's involved in pulling something like that off?
- fayalalebrun 3y agoPerhaps already possible via MoltenVK -> Vulkan -> Zink?
- Guzba 3y agoProbably needs one or two more layers just to be sure.
- jamesfmilne 3y agoUltimately they build command buffers and send them to the GPU. You'd need a way to do that from macOS. The original Mesa drivers for the M1 GPU were bootstrapped by doing just that, sending command buffers to the AGX driver in macOS using IOKit. https://rosenzweig.io/blog/asahi-gpu-part-2.html https://rosenzweig.io/blog/asahi-gpu-part-2.html https://github.com/AsahiLinux/gpu/blob/main/demo/iokit.c https://github.com/AsahiLinux/gpu/blob/main/demo/iokit.c So you'd need a bit more glue in Mesa to get the surfaces from the GPU into something you can composite onto the screen in macOS.
- shmerl 3y agoI think Apple bans third party kernel drivers? To write a proper Vulkan or OpenGL implementation you need a kernel counterpart for handling the GPU if I understand correctly. That's probably the reason no one bothers implementing native Vulkan for macOS. But if it's doable with Apple's driver - then not sure.
- skykooler 3y agoAccording to the devs, it isn't really possible due to Apple not having a stable public kernel API: https://social.treehouse.systems/@AsahiLinux/111930744188229065 https://social.treehouse.systems/@AsahiLinux/111930744188229...
- ribit 3y agoYou can implement an OpenGL driver on top of Metal. But why bother dedicating so many resources for the sake of a suboptimal legacy API?
- smoldesu 3y agoBecause it's a cross-platform framework that thousands of programs (including Mac exclusives) rely on? There's so much OpenGL-only software that it should be Apple's moral imperative to support it anyways. I don't think anyone can honestly say that the graphics situation on Mac has improved in the absence of cross-platform APIs. Even Apple admits it with the Game Porting Toolkit.
- ribit 3y agoAnd any of those Mac programs need anything more recent than 4.1? GL is legacy tech and Apple does offer legacy support. I just don’t see any reason to invest more work into this area. We should encourage people to stop using GL, not use it more. It’s bad technology.
- smoldesu 3y agoIdeally we encourage people to port to Vulkan instead of Metal and DirectX, so porting is easier and more people can run common software. Unfortunately, certain vendors have a reputation against third party Open standards.
- mort96 3y agoLegacy or not, OpenGL is the best cross platform graphics API we have that's actually practical for people to write directly. Metal is reasonable to write directly but not cross platform, Vulkan is cross platform but you need thousands of LoC to put a triangle on the screen.