Jump to content

Devs can finally target Vulkan on MacOS / IOS, despite Apple's blocking

Humbug

It's been two years since the official spec of Vulkan 1.0 has been released by the Khronos group, as per wiki currently a dozen released games support the API on windows and Linux . Early on one of the things that devs looked forward to was having one API which could target all PC operating systems. However Apple had a change of heart at some point because Vulkan was seen as a threat to Metal, which is their own low level graphics API; similar to Vulkan and DX12, but limited to Apple operating systems.

 

A company known as Brenwill Workshop Ltd had developed an intermediate library known as MoltenVK. What this does is translate Vulkan to Metal. Upto now MoltenVK was a commercially licensed software, which was lucrative for Brenwill but doesn't do much good for the PC gaming ecosystem on the whole.

 

Now however it seems like GabeN has been sufficently impressed by MoltenVK that Valve has decided to pay Brenwill sufficient millions $$ to open source MoltenVK and keep it that way for future development. The reason Valve has done this is because their longterm objective is for devs to be able to use one graphics API to target windows 7, windows 8, windows 10, Linux and MacOSX. i.e. all the platforms where steam operates. MoltenVK has been open sourced on the Apache 2.0 license which means that devs can now ship it with steam games on MacOSX targeting vulkan which then translates to MetalOSX on the fly.

 

The only reason this is possible with good performance is because of the similarity of the new generation low level APIs (metal, Vulkan, DX12) means they map easily onto each other. Traditionally games which got ported from windows to MacOSX and Linux tended to use openGL, since it was the only available option and it allowed devs to kill two birds with one stone. Since MacOSX and Linux were both smaller platforms (relative to windows) the economics of porting to them often makes sense when they can be taken collectively. Companies like Feral interactive and Aspyr which regularly port games to MacOSX and Linux take advantage of this synergy. Apple has been accused by developers of having a lackluster attitude towards PC gaming and not keeping openGL up to date on their MacOSX.

 

Github indicates that the number of in-development projects using Vulkan is magnitudes greater than DirectX12, although the latter released earlier. However the dominant graphics API on PC remains DirectX11. As for as non-pc platforms are concerned Vulkan also ships on Nintendo Switch and android.

 

The next high profile AAA pc game releasing on Linux using Vulkan in the coming months is Rise of the Tomb Raider.

 

Credit to Michael Larabel @ phoronix for the news

https://www.phoronix.com/scan.php?page=article&item=vulkan-on-mac&num=1

Quote

Two years and a few days since the Vulkan 1.0 release is now marked by a new significant milestone for this cross-platform graphics/compute API... It's not a new Vulkan release today, but Vulkan is now available on Apple's iOS and macOS platforms! Here are the details with the embargo just expiring on Vulkan now on macOS/iOS but still without the official support from Apple.
image.php?id=vulkan-on-mac&image=vulkan_
Apple sadly still isn't supporting Vulkan officially, but The Khronos Group is now able to get behind Vulkan on macOS/iOS. Up to now there's been the MoltenVK library to run Vulkan on iOS/OSX operating systems. That library has been proprietary and commercially licensed while developed by Brenwill Workshop Ltd. Now, thanks to an arrangement with Valve, MoltenVK is being open-sourced under the Apache 2.0 license and will be available to all. The Khronos Group in our briefing didn't elaborate or purport to know the specifics of how this came about, just that Valve is to thank for their negotiations with Brenwill... I would presume a lucrative financial arrangement from Valve is to thank for that small company now opening up their code for mapping Vulkan on top of Metal. That code will continue to be open-source moving forward and thus a cataclysmic shift now that Vulkan is easily available for macOS, complementing Vulkan's existing support for Windows, Linux and Android. MoltenVK is basically a library that Apple programs can now build against that allows the use of Vulkan APIs while is then mapped to Apple's low-level Metal graphics API.
image.php?id=vulkan-on-mac&image=vulkan_
Also playing a big role in this Vulkan to Apple platforms is LunarG who has ported their Vulkan SDK to macOS. Most functionality should be working today for this macOS Vulkan SDK, but support for a few remaining features/functions will be taken care of over the coming weeks. The MoltenVK library also relies upon the open-source SPIR-V cross-compiler for turning Vulkan/SPIR-V shaders into compatible native code formats for execution with the Metal API.
image.php?id=vulkan-on-mac&image=vulkan_
Given Valve's heavy involvement in getting Vulkan to macOS, it's no surprise they effectively have a launch title... Dota 2 will be able to use Vulkan on macOS! Valve has found extremely promising performance results for Dota 2 on Vulkan rather than OpenGL, as shown below. Valve hasn't yet communicated when that Vulkan-ized macOS Dota 2 build will go public, but hopefully soon. This is a big performance win for macOS gamers. Valve will be making an announcement of their own this morning.
image.php?id=vulkan-on-mac&image=vulkan_
 In terms of what is supported by Vulkan on macOS, almost all functionality! The missing pieces are just triangle fans, separate stencil reference masks, Vulkan event functionality, only a limited set of texture-specific swizzles are supported, and allocation callbacks for object creation functions are not currently supported.

The Khronos Group members working on Vulkan are also still involved in getting the API running on top of Direct3D 12 too, but today is just about the Vulkan 1.0 for Mac news. It will certainly be interesting to see what comes of this and how the adoption goes now that macOS developers can freely and easily make use of Vulkan there now too. This is hopefully good news too if game studios begin making use of Vulkan on Mac and thereby increasing support for this graphics API and Linux stands to benefit too. Wine should also be another important benefactor of this work with now being able to leverage Vulkan on macOS as part of bringing Direct3D 12 over Vulkan, etc. Interesting times ahead and let's not forget about GDC happening next month!

 

For more information on the Vulkan API itself you can check the below thread.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Sorry to be a spoilsport, but MoltenVK isn't Vulkan any more than Winelib is Windows or WebGL is OpenGL ES.

 

Raw Vulkan applications still won't run on Apple OSes, and not all parts of Vulkan are even exposed through MoltenVK.

 

It's an API compatibility layer and nothing more. It doesn't have the same portability aspects of raw Vulkan code, adds extra library overhead, and just generally isn't a perfect solution.

 

Apple still needs to just suck it the F up and allow AMD and Nvidia to expose Vulkan in their OS.

Link to comment
Share on other sites

Link to post
Share on other sites

Perfect solution? Nobody claimed that.

 

What do you mean by Raw Vulkan applications? Valve demonstrated Dota2 running on Mac on Vulkan through MoltenVK. With better performance than native openGL.

Link to comment
Share on other sites

Link to post
Share on other sites

Imagine if Apple got their head out of their ass. We'd have Vulkan on every single platform. Both on desktop and mobile and everything in between. 

 

They're holding the industry back in favor of maintaining the walled garden.

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, Humbug said:

Perfect solution? Nobody claimed that.

 

What do you mean by Raw Vulkan applications? Valve demonstrated Dota2 running on Mac on Vulkan through MoltenVK. With better performance than native openGL.

Yeah, but there were code changes to accomodate that, and it requires a seperate code path for the MacOS version.

 

It's not native Vulkan, it's just a compatibility layer over top of Metal.

 

2 hours ago, Trixanity said:

Imagine if Apple got their head out of their ass. We'd have Vulkan on every single platform. Both on desktop and mobile and everything in between. 

 

They're holding the industry back in favor of maintaining the walled garden.

Except some embedded Linux devices which still only use FBM drivers and not full DRI drivers.

 

But for normal consumer stuff it would be really convenient yeah.

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, Sniperfox47 said:

Yeah, but there were code changes to accomodate that, and it requires a seperate code path for the MacOS version.

 

It's not native Vulkan, it's just a compatibility layer over top of Metal.

Yes all this is understood, read the opening post.

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, Trixanity said:

Imagine if Apple got their head out of their ass. We'd have Vulkan on every single platform. Both on desktop and mobile and everything in between. 

 

They're holding the industry back in favor of maintaining the walled garden.

What Apple is really trying to keep at bay is Android. Vulkan is well supported by google on Android. Apple wants to maintain that differentiation between IOS and Android. Whereas having the same graphics API available on both platforms is one step towards promoting cross platform app development.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Humbug said:

Yes all this is understood, read the opening post.

...I did read the OP... However your title line reads:

Quote

Vulkan finally arrives on MacOS / IOS, despite Apple's blocking

Which is totally incorrect. Vulkan hasn't arrived, and this does nothing to get around Apple's blocking of native Vulkan.

 

MoltenVK has existed for a long time, since before Vulkan 1.0 launched, is *not* Vulkan but rather a Vulkan compatibility layer, and Vulkan is still not exposed via the driver interface.

Link to comment
Share on other sites

Link to post
Share on other sites

9 hours ago, Sniperfox47 said:

Apple still needs to just suck it the F up and allow AMD and Nvidia to expose Vulkan in their OS.

Why? What does Apple gain from allowing anyone else from influencing their operating system if they don't have to. 

 

Apple is all about control and I guaranty Apple is going to keep improving Metal for the Mac and iOS devices. Its their API, and they know how to make it work with their OS rather than modify libraries based for Windows machines to run on their OSes. 

Laptop: 2019 16" MacBook Pro i7, 512GB, 5300M 4GB, 16GB DDR4 | Phone: iPhone 13 Pro Max 128GB | Wearables: Apple Watch SE | Car: 2007 Ford Taurus SE | CPU: R7 5700X | Mobo: ASRock B450M Pro4 | RAM: 32GB 3200 | GPU: ASRock RX 5700 8GB | Case: Apple PowerMac G5 | OS: Win 11 | Storage: 1TB Crucial P3 NVME SSD, 1TB PNY CS900, & 4TB WD Blue HDD | PSU: Be Quiet! Pure Power 11 600W | Display: LG 27GL83A-B 1440p @ 144Hz, Dell S2719DGF 1440p @144Hz | Cooling: Wraith Prism | Keyboard: G610 Orion Cherry MX Brown | Mouse: G305 | Audio: Audio Technica ATH-M50X & Blue Snowball | Server: 2018 Core i3 Mac mini, 128GB SSD, Intel UHD 630, 16GB DDR4 | Storage: OWC Mercury Elite Pro Quad (6TB WD Blue HDD, 12TB Seagate Barracuda, 1TB Crucial SSD, 2TB Seagate Barracuda HDD)
Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, DrMacintosh said:

Why? What does Apple gain from allowing anyone else from influencing their operating system if they don't have to. 

 

Apple is all about control and I guaranty Apple is going to keep improving Metal for the Mac and iOS devices. Its their API, and they know how to make it work with their OS rather than modify libraries based for Windows machines to run on their OSes. 

*facepalm* What...?

 

Vulkan is not "based for Windows", it's an open API designed by the makers of GPUs to be an efficient, low level, and platform independent way of addressing GPUs.

 

The Vulkan 1.0 standard was nearly feature complete vs Metal and has since exceeded the capabilities of Metal through Vendor extensions approved by the Kronos group.

 

This also has *nothing* to do with any work Apple is doing. Metal and Vulkan are both implemented in the GPU drivers by the GPU vendors (Intel, AMD, and Nvidia). Vulkan support is *already* in the GPU drivers for at least AMD and Nvidia since they share a common codebase between platforms, it's just not exposed because Apple forbids them from exposing it if they want their drivers signed (a requirement for them to work in MacOS...)

 

Apple has no incentive, since by keeping it locked down they can continue to platform lock in developers, and charge certification fees.

 

That doesn't make it not a dick move. This BS from Apple is aggravating for the same reason Microsoft's UWP push is aggravating.

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, Sniperfox47 said:

This BS from Apple is aggravating for the same reason Microsoft's UWP push is aggravating.

Too bad I guess. 

Laptop: 2019 16" MacBook Pro i7, 512GB, 5300M 4GB, 16GB DDR4 | Phone: iPhone 13 Pro Max 128GB | Wearables: Apple Watch SE | Car: 2007 Ford Taurus SE | CPU: R7 5700X | Mobo: ASRock B450M Pro4 | RAM: 32GB 3200 | GPU: ASRock RX 5700 8GB | Case: Apple PowerMac G5 | OS: Win 11 | Storage: 1TB Crucial P3 NVME SSD, 1TB PNY CS900, & 4TB WD Blue HDD | PSU: Be Quiet! Pure Power 11 600W | Display: LG 27GL83A-B 1440p @ 144Hz, Dell S2719DGF 1440p @144Hz | Cooling: Wraith Prism | Keyboard: G610 Orion Cherry MX Brown | Mouse: G305 | Audio: Audio Technica ATH-M50X & Blue Snowball | Server: 2018 Core i3 Mac mini, 128GB SSD, Intel UHD 630, 16GB DDR4 | Storage: OWC Mercury Elite Pro Quad (6TB WD Blue HDD, 12TB Seagate Barracuda, 1TB Crucial SSD, 2TB Seagate Barracuda HDD)
Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Sniperfox47 said:

...I did read the OP... However your title line reads:

Which is totally incorrect. Vulkan hasn't arrived, and this does nothing to get around Apple's blocking of native Vulkan.

Edited the OP to provide further insight. That devs can now target Vulkan on apple platforms...

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Sniperfox47 said:

MoltenVK has existed for a long time, since before Vulkan 1.0 launched, is *not* Vulkan but rather a Vulkan compatibility layer, and Vulkan is still not exposed via the driver interface.

Of course it's not exposed at the driver layer. That's the reason this news matters. The OS will still see Metal.

 

The licensing change is key. Not only is it open source now but the new license allows any game dev to use MoltenVK, distribute it, modify it: without royalties.

Link to comment
Share on other sites

Link to post
Share on other sites

This is cool but I'd prefer to use metal. I'll wait until the Vulkan VS. Metal benchmarks are there, getting better performance than OpenCL isn't exactly a feat. 

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, RorzNZ said:

This is cool but I'd prefer to use metal. I'll wait until the Vulkan VS. Metal benchmarks are there, getting better performance than OpenCL isn't exactly a feat. 

You can't have Vulkan vs Metal benchmarks because no platform allows both.

 

MoltenVK will have a lower performance than Metal because it's translating your Vulkan calls into Metal calls, meaning it's just running Metal code with extra overhead and less optimizations.

 

In theory Vulkan and Metal should perform damn near identically, just like how in theory DX12 and Vulkan should perform damn near identically.

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, Sniperfox47 said:

You can't have Vulkan vs Metal benchmarks because no platform allows both.

 

MoltenVK will have a lower performance than Metal because it's translating your Vulkan calls into Metal calls, meaning it's just running Metal code with extra overhead and less optimizations.

 

In theory Vulkan and Metal should perform damn near identically, just like how in theory DX12 and Vulkan should perform damn near identically.

Then just use metal. SC2 has options for both so I don't see why Valve can't. Its not as if they don't have the money or resources. 

 

3 hours ago, Sniperfox47 said:

 

Apple has no incentive, since by keeping it locked down they can continue to platform lock in developers, and charge certification fees.

 

Apple maintains quality and performance. With a seperate API it ensures applications are fully optimised for OS X. With the price I pay for my laptop I do expect this to be maintained and not have second-rate performance. 

Link to comment
Share on other sites

Link to post
Share on other sites

13 minutes ago, RorzNZ said:

Then just use metal. SC2 has options for both so I don't see why Valve can't. Its not as if they don't have the money or resources. 

LOL, Valve is not doing this for themselves. They want to make it easier for devs to release more games on MacOSX and Linux. Vulkan works natively on windows and Linux. Now it will work non-natively on MacOSX. You still have to port the games to Linux and MacOSX, it's not trivial. But not having to switch graphics APIs means one less thing to worry about and spend man hours on.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, RorzNZ said:

Apple maintains quality and performance. With a seperate API it ensures applications are fully optimised for OS X. With the price I pay for my laptop I do expect this to be maintained and not have second-rate performance. 

Oh boy here we go again...

Just because it's made by Apple doesn't mean it is better.

It isn't "more optimized for the hardware" just because it is Apple. In fact, I'd argue that Nvidia and AMD are in a better position to optimize Vulkan for their own hardware, than Apple are to optimize Metal for Nvidia and AMD hardware.

Link to comment
Share on other sites

Link to post
Share on other sites

love to see how short-sighted the apple fan base is.

Lol, Vulkan is now a Windows thing just because Apple doesn't want to add it to their OSs forgetting that Apple is part of the group that develops Vulkan (Kronos)

Why not just port X to Metal? Cause no reason to do extra work for a platform that can barely reach 5% of the market share. Maybe, just maybe, the incentive would be higher if you only add to work on it once using a common library across all available platform... Nah must be talking crazy talk, plus Metal is made by Apple, therefore, better than anything out there without a single Benchmark proving it, but who needs proof when you have blind faith in a corporation amiright.

One day I will be able to play Monster Hunter Frontier in French/Italian/English on my PC, it's just a matter of time... 4 5 6 7 8 9 years later: It's finally coming!!!

Phones: iPhone 4S/SE | LG V10 | Lumia 920 | Samsung S24 Ultra

Laptops: Macbook Pro 15" (mid-2012) | Compaq Presario V6000

Other: Steam Deck

<>EVs are bad, they kill the planet and remove freedoms too some/<>

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, yian88 said:

Maan fuck mac's and apple, khronos shouldnt even waste their time, let mac die with their metal a slow death.

I'm not going to defend apple, but comments like this aren't helpful. This is just as misleading as all the comments made by the Apple fanboys.

 

  1. Apple is a member of Khronos. Saying Kronos shouldn't bother on Apple platforms is effectively saying that Apple shouldn't bother on Apple platforms.
  2. Khronos isn't doing anything special to target Apple systems. MoltenVK was made by Brenwill Workshop, the same company who made MoltenGL for high performance OpenGL ES on iOS. This purchase was done made by Valve for their interests, not under any special directive from the rest of Khronos.
  3. MacOS and iOS is a huuuuuuuuge market segment. Developers aren't just going to ignore it. That's a big part of the issue. If Apple wasn't as big of a market presence this anti-competitive crap wouldn't fly because nobody would target them. As it is, their stubborn insistence on Metal just serves to fragment code, duplicate work, and discourage developers who target their systems from putting in the work to port to other platforms.

P.s. This is fundamentally the same thing Nvidia is doing with refusing to enable support for VESA Adaptive sync in order to push Gsync.

Link to comment
Share on other sites

Link to post
Share on other sites

8 hours ago, LAwLz said:

Oh boy here we go again...

Just because it's made by Apple doesn't mean it is better.

It isn't "more optimized for the hardware" just because it is Apple. In fact, I'd argue that Nvidia and AMD are in a better position to optimize Vulkan for their own hardware, than Apple are to optimize Metal for Nvidia and AMD hardware.

We don't have benchmarks yet, but seeing as MoltenVK adds another layer its probably going to have less performance. I wouldn't make claims that Vulkan would be better when there are no benchmarks. 

Link to comment
Share on other sites

Link to post
Share on other sites

16 minutes ago, RorzNZ said:

We don't have benchmarks yet, but seeing as MoltenVK adds another layer its probably going to have less performance. I wouldn't make claims that Vulkan would be better when there are no benchmarks. 

This is what you said:

10 hours ago, RorzNZ said:

Apple maintains quality and performance. With a seperate API it ensures applications are fully optimised for OS X. With the price I pay for my laptop I do expect this to be maintained and not have second-rate performance. 

The only way I can interpret this, is that you believe anything not made by Apple is "second-rate" and will not be as good as whatever Apple makes.

 

In reality, Vulcan and Metal will most likely perform similarly. The reason why Apple are not allowing Vulcan to run on their products is because they want to make it more difficult for developers to target multiple platforms.

It's the same thing as Microsoft only allowing DirectX for UWP. They aren't doing that because "they want to ensure the software is fully optimized for Windows". They do it to fuck with developers.

Link to comment
Share on other sites

Link to post
Share on other sites

34 minutes ago, LAwLz said:

They do it to fuck with developers.

And with their user base...

Link to comment
Share on other sites

Link to post
Share on other sites

Guest
This topic is now closed to further replies.

×