Popular cross-platform 3D graphics and compute API Vulkan is gaining support for the Apple ecosystem, which means Mac and iOS developers will be able to build and run Vulkan apps on Apple devices.

Valve, LunarG, and The Brenwill Workshop, members of The Khronos Group consortium that developed Vulkan, have worked together with the Khronos Group Portability Initiative to allow Vulkan apps to be ported to Apple platforms.

vulkanappsmac
The aim of Khronos Group’s Vulkan Portability Initiative is a universal subset of Vulkan 1.0 that is designed to run at native performance levels over Metal and DirectX 12 drivers. Metal and DirectX 12 are able to support almost all of Vulkan, with the exception of elements like triangle fans, separate stencil reference masks, Vulkan Event functionality, and a few other features.

Valve used Vulkan tools on macOS with Dota 2 and was able to achieve "significantly higher performance" than native OpenGL drivers.

vulkandota2
An open source collection of tools, SDKs, and runtime libraries that enable Vulkan development and deployment on macOS and iOS is now available on the Portability Landing Page on the Khronos Group website. With Vulkan support for Mac and iOS devices, developers will be able to support multiple platforms while cutting down on porting and development costs.

"Running Vulkan applications on Apple platforms has been the number one request from developers and today’s release of the MoltenVK runtime and LunarG macOS SDK brings that capability to life,” said Neil Trevett, VP NVIDIA and Khronos Group President. “Developers are invited to download the open source Vulkan Portability tools today and provide feedback via Vulkan Ecosystem GitHub Issue. The Vulkan Portability Initiative will continue to strengthen the infrastructure and tooling around bringing Vulkan capabilities to multiple Metal and DX12 platforms - our long-term goal is to enable portable Vulkan code to be executed on any platform that developers care about."

Starting today, a MoltenVK library from The Brenwill Workshop that translates Vulkan calls into Metal calls on macOS and iOS is being open sourced.

The open source LunarG Vulkan SDK for macOS is also available today on LunarXchange, enabling developers to build, run, and debug Vulkan applications on Mac. Going forward, LunarG plans to continue to evolve its Mac SDK to add additional tools and features.

More information on Vulkan support for Apple devices can be found on The Khronos Group website.

Top Rated Comments

marksatt Avatar
45 months ago
I don’t believe that MoltenVK will be immediately useful to most serious Mac games developers. Aspyr, Feral, Unity and here at Epic we already have direct, native Metal backends that are (or at least should be) faster and support a greater range of features than another intermediate translation library.

Specifically MoltenVK has a list of limitations that make it sufficient for porting mobile Vulkan games and games with a primarily D3D9-era rendering engine, but probably inadequate for most modern D3D11+ game engines.

Principally anything that requires geometry shaders or tessellation shaders is currently not going to work as MoltenVK doesn’t support them. They are *optional* features in Vulkan so it can still call itself conformant by contrast for D3D these are *required* features in D3D11 onward so games do use them, sometimes extensively. Moreover the approach MoltenVK takes to recompiling shaders makes it infeasible to impossible for them to be supported without significant work and performance penalties. Metal doesn’t have direct equivalents so the MoltenVK library would need to defer SPIRV to Metal translation until said shaders are used together in a Shader Pipeline at runtime. Only then could it recompile them to Metal and emulate all the necessary behaviour but this would result in a big performance hit on the CPU. It would also be harder to adopt the native features offered by Mac Metal to deal with these cases and hurt GPU performance.

The other gotcha will be emulating type conversion of data between the resources and the shader. Metal doesn’t have a performant way to do that in all cases right now, so you need to use multiple different techniques to achieve the result while minimising the performance penalty. MoltenVK appears to support only a trivial subset of D3D’s implicit resource type casts which wouldn’t be enough for UE4.

I wish them well in their efforts but this is not going to magically result in better performance in games shipped by Feral, or Epic, etc. It might well end up making it easier for smalller studios with their own engines, esp. mobile focused developers, and that is no bad thing.
Score: 10 Votes (Like | Disagree)
Janichsan Avatar
45 months ago
Does seem like Metal was a step in the right direction, but could be overshadowed by a better standard?
Better? Maybe not, but cross-platform instead of proprietary.
Score: 8 Votes (Like | Disagree)
marksatt Avatar
45 months ago
Why? What would be the issue there? Lacking hardware support on iOS devices?
Mobile GPUs are architecturally *very* different from desktop GPUs so don't have the same features. Metal's API design was predominantly driven by the needs & capabilities of iOS GPUs, hence why geometry shaders are absent and why the tessellation pipeline is completely different to D3D.

Obviously the macOS hardware could support these features in a way that is directly equivalent to D3D and were Apple to do that and developers elected to use said features then those titles would need more work to run on iOS. That being said, it already takes *substantial* effort to rework a macOS title to fit on iOS, as shown by Aspyr's heroic efforts with Civ VI and Feral's equally impressive Rome & GRID ports. Given the difference in performance profile of iOS vs. macOS devices it probably wouldn't really matter as any game that used these features would likely not be viable anyway.
Score: 5 Votes (Like | Disagree)
Rudy69 Avatar
45 months ago
Vulkan, Khronos.. am I seeing a pattern here?

Does seem like Metal was a step in the right direction, but could be overshadowed by a better standard?
Not sure how it's being over shadowed. This is more or less just a tool to take existing Vulkan games and convert the Vulkan calls to Metal calls.
Score: 3 Votes (Like | Disagree)
cube Avatar
45 months ago
Live long and prosper.
Score: 3 Votes (Like | Disagree)
marksatt Avatar
45 months ago
Maybe I'm wrong here, but my understanding is that you do not have to translate the SPIRV shaders to MSL at runtime. MoltenVK apparently comes with a separate conversion tool ('https://www.moltengl.com/docs/readme/moltenvk-readme-user-guide.html') that's supposed to allow you to do this beforehand, and then you can pass your MSL shaders directly to your Vulkan code.



It's surely an extra step during the porting process, but you wouldn't have to deal with the performance hit.
That’s what I said sir, by doing this offline for SPIRV you avoid the runtime performance hit BUT you CANNOT use some/all Metal specific feature and you CANNOT emulate geometry or tessellation shaders. Emulating them requires the full set of shaders in a pipeline so that you can rewrite them to use Metal’s similar but not equivalent features. That is known only at runtime in most engines - not all though. That means combining vertex + (hull and/or geometry) shader stages into compute shaders that must run in an earlier compute command buffer, separate to the later draw call that uses the (domain + pixel shader). Plus all the associated buffer allocations and resource binding shenanigans- it’s actually bloody hard work to get right!
[doublepost=1519686438][/doublepost]
[USER=825783]@marksatt[/USER]

Good to hear some input from someone with good insight. :)

Quite a bit off-topic, but do you know what's going on with the major pauses/lag in between seemingly good frame rates in the MacOS version of Fortnite?

https://www.dropbox.com/s/nzt0h1s9hvrzgad/Fortnite_major_hiccups.m4v?dl=0

Or is the problem I see perhaps related to the NVIDIA Web Driver which is required for the GTX 970 I have to work in MacOS? Sorry, maybe I should report this somewhere else…
Looks like it is either texture streaming or shader compilation or a combination of the two. I’ve explained the challenges of dealing with the initial shader setup at runtime, even with precompiled shaders, elsewhere. It still isn’t a solved problem in UE4 or Fortnite and it likely never will be perfect. This isn’t the forum to report problems - that should be done over at the Fortnite forums and the feedback mechanism ('https://www.epicgames.com/fortnite/forums/bugs-issues/bug-reports').
Score: 3 Votes (Like | Disagree)

Top Stories

AirPods Pro Beta Firmware

AirPods Pro Beta Firmware Now Available

Wednesday July 21, 2021 6:50 am PDT by
Upcoming AirPods Pro firmware updates are now available to Apple Developer Program members as beta versions. AirPods Pro firmware beta one features FaceTime Spatial Audio and Ambient Noise Reduction. Custom Transparency mode, including Conversation Boost, was initially expected to be included in the beta but appears to have been delayed for a later version. Apple made the announcement...
maxresdefault

Apple Music to Livestream Premiere of Kanye West's New Album 'Donda' on Thursday

Wednesday July 21, 2021 1:49 am PDT by
Apple Music on Thursday will host a global livestream for the premiere of Kanye West's tenth studio album, titled "Donda." The sold-out event will take place at the Mercedes-Benz Stadium in Atlanta, Georgia, and Apple Music's livestream will start at 8:00 p.m. Eastern Time. The livestream was revealed in a Beats Studio Buds ad that aired during the NBA Finals. The ad features U.S. track...
General Apps Messages

All Three Major U.S. Carriers and Google Adopt Rich Communication Services, But No Sign of Apple Interest

Tuesday July 20, 2021 1:15 pm PDT by
For the last several years, Google has been pushing a new communications protocol called Rich Communication Services, or RCS. RCS is designed to replace SMS, the current text message standard, and it offers support for higher resolution photos and videos, audio messages, bigger file sizes, better encryption, improved group chat, and more. Verizon today announced that it is planning to adopt...
ios wifi settings

Apple Confirms iOS 14.7 Fixes WiFi Bug and Many Other Vulnerabilities

Wednesday July 21, 2021 11:38 am PDT by
Following the release of iPadOS 14.7 this morning, Apple has shared details on the security updates that are included in iOS 14.7, iPadOS 14.7, macOS Big Sur 11.5, watchOS 7.6, and tvOS 14.7, all of which came out this week. Notably, Apple's documentation confirms that the iOS 14.7 and iPadOS 14.7 updates address a WiFi-related vulnerability that could impact iOS devices when joining a...
macOS Malware Feature

Common Windows Malware Can Now Infect Macs

Wednesday July 21, 2021 8:13 am PDT by
A common form of malware on Windows systems has been modified into a new strain called "XLoader" that can also target macOS (via Bleeping Computer). Derived from the Formbook info-stealer for Windows, XLoader is a form of cross-platform malware advertised as a botnet with no dependencies. It is used to steal login credentials, capture screenshots, log keystrokes, and execute malicious files. ...
macOS Big Sur Feature Orange

Apple Releases macOS Big Sur 11.5 With Podcast App Updates and Bug Fixes

Wednesday July 21, 2021 10:15 am PDT by
Apple today released macOS Big Sur 11.5, the fifth major update to the macOS Big Sur operating system that launched in November 2020. macOS Big Sur 11.5 comes two months after the release of macOS Big Sur 11.4. The new ‌‌‌‌‌macOS Big Sur‌‌‌‌ 11.5 update can be downloaded for free on all eligible Macs using the Software Update section of System Preferences. macOS Big Sur...
idos 2 app ios

Apple to Pull 'iDOS 2' DOS Emulator From App Store

Thursday July 22, 2021 3:22 pm PDT by
iDOS 2, an app designed to allow users to play classic DOS games, will soon be pulled from the App Store, the app's creator said today. According to iDOS developer Chaoji Li, he tried to submit an iDOS update with bug fixes to the App Store, but was told that the update was rejected because it violated the 2.5.2 App Store guideline that says apps cannot install or launch executable code.Durin...
airpods 3 gizmochina Feature

AirPods 3 Rumored to Launch Alongside iPhone 13 at Expected September Event

Friday July 23, 2021 12:54 am PDT by
The third-generation AirPods will likely launch at the same event revealing Apple's upcoming iPhone 13 lineup, according to a report from DigiTimes, which makes the claim citing sources familiar with the matter. The report as a whole echoes previous reporting that production of the third-generation AirPods will kickstart in August, meaning a launch shortly after can be easily expected. DigiTi...
iPad mini pro feature

Next-Generation iPad Mini Will Reportedly Feature a Mini-LED Display

Thursday July 22, 2021 9:03 am PDT by
Apple is widely rumored to be planning a new iPad mini with a significant redesign, including a larger 8.5-inch to 9-inch display with slimmer bezels, a Touch ID power button instead of a home button, a USB-C port instead of a Lightning connector, and more. According to a paywalled preview of a DigiTimes report today, the sixth-generation iPad mini will also feature a mini-LED display:BLU...
airpods 3 gizmochina Feature teal

AirPods 3 Mass Production Said to Kick Off in August

Tuesday July 20, 2021 8:40 pm PDT by
Mass production of the third-generation AirPods will kick off in August, according to a new report from Nikkei Asia. They will reportedly join a number of other products such as the iPhone 13 lineup and redesigned MacBook Pro models as launches coming before the end of the year. Renderings of rumored third-generation AirPods design Rumored launch dates for the third-generation AirPods have...