Skip to content
EntityQ55264041· pop 6· linked from 26 articles

MoltenVK is a software library which allows Vulkan applications to run on top of Metal on Apple's macOS, iOS, and tvOS operating systems. It is the first software component to be released for the Vulkan Portability Initiative, a project to have a subset of Vulkan run on platforms lacking native Vulkan drivers.

Source code

[comment]: "This document is written in Markdown ( format." [comment]: "For best results, use a Markdown reader." Table of Contents Introduction to MoltenVK Developing Vulkan Applications on macOS, iOS, tvOS, and visionOS Using the Vulkan SDK Using MoltenVK Directly Fetching MoltenVK Source Code Building MoltenVK Building With Xcode Building From the Command Line Hiding Vulkan API Symbols Accessing Metal Private API Calls Install MoltenVK to Replace The Vulkan SDK libMoltenVK.dylib Running MoltenVK Demo Applications Using MoltenVK in Your Application MoltenVK and Vulkan Compliance Getting Support Contributing to MoltenVK Development Metal uses a different shading language, the Metal Shading Language (MSL) , than Vulkan , which uses SPIR-V . MoltenVK automatically converts your SPIR-V shaders to their MSL equivalents. To provide Vulkan capability to the macOS , iOS , tvOS , and visionOS platforms, MoltenVK uses Apple's publicly available API's, including Metal . MoltenVK does not use any private or undocumented API calls or features, so your app will be compatible with all standard distribution channels, including Apple's App Store . The MoltenVK runtime package contains two products: MoltenVK is a implementation of an almost-complete subset of the Vulkan 1.4 graphics and compute API. MoltenVKShaderConverter converts SPIR-V shader code to Metal Shading Language (MSL) shader code. The converter is embedded in the MoltenVK runtime to automatically convert SPIR-V shaders to their MSL equivalents. In addition, the SPIR-V converter is packaged into a stand-alone command-line MoltenVKShaderConverter macOS tool for converting shaders at development time from the command line. The recommended method for developing a Vulkan application for macOS is to use the Vulkan SDK . The Vulkan SDK includes a MoltenVK runtime library for macOS . Vulkan is a layered architecture that allows applications to add additional functionality without modifying the application itself. The Validation Layers included in the Vulkan SDK are an essential debugging tool for application developers because they identify inappropriate use of the Vulkan API . If you are developing a Vulkan application for macOS , it is highly recommended that you use the Vulkan SDK and the MoltenVK library included in it. Refer to the Vulkan SDK Getting Started document for more info. Because MoltenVK supports the VK KHR portability subset extension, when using the Vulkan Loader from the Vulkan SDK to run MoltenVK on macOS , the Vulkan Loader will only include MoltenVK VkPhysicalDevices in the list returned by vkEnumeratePhysicalDevices() if the VK INSTANCE CREATE ENUMERATE PORTABILITY BIT KHR flag is enabled in vkCreateInstance() . See the description of the VK KHR portability enumeration extension in the Vulkan specification for more information about the use of the VK INSTANCE CREATE ENUMERATE PORTABILITY BIT KHR flag. If you are developing a Vulkan application for iOS , tvOS , or visionOS , or are developing a Vulkan application for macOS and want to use a different version or build of the MoltenVK runtime library than provided in the macOS Vulkan SDK , you can access a pre-built MoltenVK binary library from the MoltenVK repository, by selecting a repository commit from the list, and downloading the associated MoltenVK runtime library artifact. Finally, if you want a customized build of MoltenVK , you can follow the instructions below to create a MoltenVK runtime library by fetching and building the MoltenVK source code. To learn how to integrate the MoltenVK runtime library into a game or application, see the MoltenVK Runtime UserGuide.md document in the Docs directory. When running the fetchDependencies script, you must specify one or more platforms for which to build the external libraries. The platform choices include: You can specify multiple of these selections. The result is a single XCFramework for each external dependency library, with each XCFramework contain

Excerpt from the source-code README · 24,548 chars · not written by Vinony

~4 min read

Encyclopedic overview

10 sections
Contents
  • History
  • Open source
  • Version 1.0
  • Version 1.1
  • Version 1.2
  • Version 1.3
  • Version 1.4
  • See also
  • References
  • External links

MoltenVK is a software library which allows Vulkan applications to run on top of Metal on Apple's macOS, iOS, and tvOS operating systems. It is the first software component to be released for the Vulkan Portability Initiative, a project to have a subset of Vulkan run on platforms lacking native Vulkan drivers.

There are some limitations compared with a native Vulkan implementation.

Excerpted from Wikipedia’s “MoltenVK” article, available under the CC BY-SA 4.0 licence.

Available in 6 languages

via Wikidata sitelinks · CC0