What does HackerNews think of MoltenVK?
MoltenVK is a Vulkan Portability implementation. It layers a subset of the high-performance, industry-standard Vulkan graphics and compute API over Apple's Metal graphics framework, enabling Vulkan applications to run on macOS, iOS and tvOS.
Translating between rendering APIs is not really the problem. The GPU design is more different than the API is.
...technically, Vulkan on Windows is also only supported via 3rd-parties (the GPU vendors), so the situation isn't actually all that different. The "Vulkan driver" is just bundled with the application on Mac instead of installed separately.
> MoltenVK is a Vulkan Portability implementation. It layers a subset of the high-performance, industry-standard Vulkan graphics and compute API over Apple's Metal graphics framework, enabling Vulkan applications to run on macOS, iOS and tvOS.
—-
This is a very nice comparison for people looking to explore Vulkan...even versus native frameworks like Metal (on OSX).
P.S. I dont think OpenGL is supported on OSX anymore. However Vulkan has MoltenVK which works on OSX - https://github.com/KhronosGroup/MoltenVK MoltenVK is officially supported and is a big part of the Vulkan Portability initiative - https://www.vulkan.org/portability
MoltenVK is fully production ready. Multiple games use MoltenVK to run on OSX using Vulkan. Including the big one - DOTA 2 (https://www.gamingonlinux.com/2021/09/dota-2-to-drop-opengl-...). The bug tracker for DOTA2/Vulkan is here - https://github.com/ValveSoftware/Dota-2-Vulkan
https://www.youtube.com/watch?v=xDGQcjqpYqI (M1 macbooks running moltenvk games)
Proper support for Vulkan would not be an abstraction layer. Metal is not the language of the hardware, GPUs operate on assembly like instructions. These are not publicly documented or AFAIK exposed on Mac OS so only Apple would be capable of creating a proper Vulkan driver.
> They don't control the API - not what is in it, the direction it is going, nor when it is updated. That means they can't integrate it tightly with their OSs. Not from a tech standpoint and not from a release standpoint.
What if I told you I can transfer a file between my Mac and PC using software built into Mac OS from a standard controlled by Microsoft.
> Supporting it in MacOS would mean just having a team working for Khronos, implementing Vulkan on top of MacOS's actual graphics API, Metal, and releasing when they could.
This is like saying because Mac and Safari support HTML 5 its like the dev team is working for W3C. Khronos group is a standards organization not generally the implementer.
> Not sure who that would be because there doesn't seem to be a good enough reason for any group to do it.
https://github.com/KhronosGroup/MoltenVK
Plenty of "native" Mac games can't be bothered to utilize Metal directly and just use this instead. This generally results in less than optimal performance or efficiency.
> GPU makers, even at the best of times, have never been interested, and, of course, they can look forward to zero Mac business in the near future, so that isn't going to change.
GPU makers are plenty interested because it sells GPUs and it is exactly how its done on Windows. Back when Nvidia worked on Mac OS they implemented CUDA and OpenGL on Mac.
They stopped supporting OpenGL [0] and Vulkan support is a community effort [1].
[0] https://www.anandtech.com/show/12894/apple-deprecates-opengl...
[1] https://github.com/KhronosGroup/MoltenVK
edit: If you have something to add to the conversation, feel free to enlighten us. It does gets tiring discussing anything Apple around here because of the sheer bias.
Vulkan is supported pretty well on Apple through MoltenVK: https://github.com/KhronosGroup/MoltenVK
Mesa does software implementation of Vulkan, too: https://en.wikipedia.org/wiki/Mesa_(computer_graphics)
Metal was released before Vulkan existed, and Khronos already has a compatibility layer available (https://github.com/KhronosGroup/MoltenVK) - I don’t think graphics APIs are the issue here.
https://github.com/KhronosGroup/MoltenVK
Battery life might be a good reason
"MoltenVK is a Vulkan Portability implementation. It layers a subset of the high-performance, industry-standard Vulkan graphics and compute API over Apple's Metal graphics framework, enabling Vulkan applications to run on iOS and macOS." [1]
[1] https://github.com/KhronosGroup/MoltenVK [2] https://www.khronos.org/news/permalink/vulkan-support-for-do...
I don't know if one already exist for OpenGL, but for Vulkan there's MoltenVK: https://github.com/KhronosGroup/MoltenVK
Q: Any plans for macOS support?
While Wine and Proton work on macOS, there are no plans to support the new Steam Play functionality on macOS at the moment.
--------------------
https://appleinsider.com/articles/18/06/28/why-macos-mojave-...
And yea, the messaging is confusing because of this line on their site:
> As a first deliverable from the Vulkan Portability Initiative, Khronos members Valve, LunarG, and The Brenwill Workshop have released a collection of free and open source set of tools, SDKs, and runtime libraries to enable Vulkan development on macOS and deployment on macOS and iOS platforms
Source: https://www.khronos.org/vulkan/portability-initiative
That led me to think they’re sponsoring it.
It looks like MoltenVK was created by The Brenwill Workshop.
Providing macOS gives a developer and designer platform for iOS. That is really important for them. So Metal being available on macOS is important for that reason. But it's also important in that the Mac platform is still important, just not nearly as important as iOS.
OpenGL doesn't really have much of a future. Everyone is moving towards the next generation frameworks. It just happens that there was a lot of uncertainty about whether OpenGL could adapt or whether there would be a successor, and during that time Apple decided to invest in developing Metal. It wasn't until a couple of years later than Vulkan was released.
In the meantime, Apple has built up quite a lot of tooling around Metal.
And it's not like it's that difficult to write cross platform apps that target the Mac. If you write against major engines, they will already have support for the different backends. If you are writing your own software, you can still target OpenGL, or you can target Vulkan and use MoltenVK to run it on macOS.
And for the next several years, people writing portable software are going to have to either just target OpenGL, for compatibility with older graphics cards, or maintain at least two backends, OpenGL and Vulkan. Given that lots of games target DirectX first, and consider any of the cross-platform frameworks a porting effort, Apple probably doesn't consider it a big loss to add one more platform that needs to be ported to.
What's going to wind up happening is more software like ANGLE (https://github.com/google/angle), MoltenVK (https://github.com/KhronosGroup/MoltenVK), and gfx-rs (https://github.com/gfx-rs/gfx and https://github.com/gfx-rs/portability, see http://gfx-rs.github.io/2018/04/09/vulkan-portability.html for details) for providing one set of abstractions on top of several different backends.