{"id":13625184,"url":"https://github.com/KhronosGroup/MoltenVK","last_synced_at":"2025-04-16T06:31:58.405Z","repository":{"id":37396906,"uuid":"109875967","full_name":"KhronosGroup/MoltenVK","owner":"KhronosGroup","description":"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.","archived":false,"fork":false,"pushed_at":"2025-03-19T00:51:36.000Z","size":13781,"stargazers_count":5056,"open_issues_count":294,"forks_count":452,"subscribers_count":136,"default_branch":"main","last_synced_at":"2025-04-14T06:53:14.148Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KhronosGroup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-07T18:41:56.000Z","updated_at":"2025-04-13T20:36:35.000Z","dependencies_parsed_at":"2023-12-19T17:39:58.663Z","dependency_job_id":"8909e006-d94f-46f9-9783-9a8459f0fde6","html_url":"https://github.com/KhronosGroup/MoltenVK","commit_stats":{"total_commits":1800,"total_committers":87,"mean_commits":"20.689655172413794","dds":0.4388888888888889,"last_synced_commit":"bb914faa533a3ed923abf9cce3f9702492bfaef0"},"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhronosGroup%2FMoltenVK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhronosGroup%2FMoltenVK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhronosGroup%2FMoltenVK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhronosGroup%2FMoltenVK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KhronosGroup","download_url":"https://codeload.github.com/KhronosGroup/MoltenVK/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837280,"owners_count":21169373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T21:01:51.873Z","updated_at":"2025-04-16T06:31:58.397Z","avatar_url":"https://github.com/KhronosGroup.png","language":"Objective-C++","funding_links":[],"categories":["Objective-C++","Graphics","前端开发框架及项目"],"sub_categories":["iOS_Swift应用开发"],"readme":"\u003ca class=\"site-logo\" href=\"https://github.com/KhronosGroup/MoltenVK\" title=\"MoltenVK\"\u003e\n\t\u003cimg src=\"Docs/images/MoltenVK-Logo-Banner.png\" alt=\"MoltenVK\" style=\"width:256px;height:auto\"\u003e\n\u003c/a\u003e\n\n\n\nMoltenVK\n========\n\nCopyright (c) 2015-2024 [The Brenwill Workshop Ltd.](http://www.brenwill.com)\n\n[comment]: # \"This document is written in Markdown (http://en.wikipedia.org/wiki/Markdown) format.\"\n[comment]: # \"For best results, use a Markdown reader.\"\n\n![Build Status](https://github.com/KhronosGroup/MoltenVK/workflows/CI/badge.svg)\n\n\nTable of Contents\n-----------------\n\n- [Introduction to **MoltenVK**](#intro)\n- [Developing Vulkan Applications on *macOS, iOS, tvOS, and visionOS*](#developing_vulkan)\n\t- [Using the *Vulkan SDK*](#sdk)\n\t- [Using MoltenVK Directly](#download)\n- [Fetching **MoltenVK** Source Code](#install)\n- [Building **MoltenVK**](#building)\n\t- [Building With _Xcode_](#xcode_build)\n\t- [Building From the Command Line](#command_line_build)\n\t- [Hiding _Vulkan_ API Symbols](#hiding_vulkan_symbols)\n\t- [Accessing _Metal_ Private API Calls](#metal_private_api)\n\t- [Install *MoltenVK* to Replace The _Vulkan SDK_ `libMoltenVK.dylib`](#install_vksdk)\n- [Running **MoltenVK** Demo Applications](#demos)\n- [Using **MoltenVK** in Your Application](#using)\n- [**MoltenVK** and *Vulkan* Compliance](#compliance)\n- [Getting Support](#support)\n- [Contributing to **MoltenVK** Development](#contributing)\n\n\n\n\u003ca name=\"intro\"\u003e\u003c/a\u003e\nIntroduction to MoltenVK\n------------------------\n\n**MoltenVK** is a layered implementation of [*Vulkan 1.2*](https://www.khronos.org/vulkan)\ngraphics and compute functionality, that is built on Apple's [*Metal*](https://developer.apple.com/metal)\ngraphics and compute framework on *macOS*, *iOS*, *tvOS*, and *visionOS*. **MoltenVK** allows\nyou to use *Vulkan* graphics and compute functionality to develop modern, cross-platform,\nhigh-performance graphical games and applications, and to run them across many platforms,\nincluding *macOS*, *iOS*, *tvOS*, *visionOS*, *Simulators*, and *Mac Catalyst* on *macOS 11.0+*,\nand all *Apple* architectures, including *Apple Silicon*.\n\n*Metal* uses a different shading language, the *Metal Shading Language (MSL)*, than\n*Vulkan*, which uses *SPIR-V*. **MoltenVK** automatically converts your *SPIR-V* shaders\nto their *MSL* equivalents.\n\nTo provide *Vulkan* capability to the *macOS*, *iOS*, *tvOS*, and *visionOS* platforms,\n**MoltenVK** uses *Apple's* publicly available API's, including *Metal*. **MoltenVK**\ndoes **_not_** use any private or undocumented API calls or features, so your app will\nbe compatible with all standard distribution channels, including *Apple's App Store*.\n\nThe **MoltenVK** runtime package contains two products:\n\n- **MoltenVK** is a implementation of an almost-complete subset of the\n  [*Vulkan 1.2*](https://www.khronos.org/vulkan) graphics and compute API.\n\n- **MoltenVKShaderConverter** converts *SPIR-V* shader code to *Metal Shading Language (MSL)*\n  shader code, and converts *SPIR-V* shader code to *Metal Shading Language (MSL)* shader code.\n  The converter is embedded in the **MoltenVK** runtime to automatically convert *SPIR-V* shaders\n  to their *MSL* equivalents. In addition, the *SPIR-V* converter is packaged into a stand-alone command-line\n  `MoltenVKShaderConverter` *macOS* tool for converting shaders at development time from the command line.\n\n\n\n\u003ca name=\"developing_vulkan\"\u003e\u003c/a\u003e\nDeveloping *Vulkan* Applications for *macOS, iOS, tvOS, and visionOS*\n---------------------------------------------------------------------\n\n\u003ca name=\"sdk\"\u003e\u003c/a\u003e\n### Using the *Vulkan SDK*\n\nThe recommended method for developing a *Vulkan* application for *macOS* is to use the\n[*Vulkan SDK*](https://vulkan.lunarg.com/sdk/home).\n\nThe *Vulkan SDK* includes a **MoltenVK** runtime library for *macOS*. *Vulkan* is a layered\narchitecture that allows applications to add additional functionality without modifying the\napplication itself. The *Validation Layers* included in the *Vulkan SDK* are an essential debugging\ntool for application developers because they identify inappropriate use of the *Vulkan API*.\nIf you are developing a *Vulkan* application for *macOS*, it is highly recommended that you use the\n[*Vulkan SDK*](https://vulkan.lunarg.com/sdk/home) and the **MoltenVK** library included in it.\nRefer to the *Vulkan SDK [Getting Started](https://vulkan.lunarg.com/doc/sdk/latest/mac/getting_started.html)*\ndocument for more info.\n\nBecause **MoltenVK** supports the `VK_KHR_portability_subset` extension, when using the\n*Vulkan Loader* from the *Vulkan SDK* to run **MoltenVK** on *macOS*, the *Vulkan Loader*\nwill only include **MoltenVK** `VkPhysicalDevices` in the list returned by\n`vkEnumeratePhysicalDevices()` if the `VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR`\nflag is enabled in `vkCreateInstance()`. See the description of the `VK_KHR_portability_enumeration`\nextension in the *Vulkan* specification for more information about the use of the\n`VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR` flag.\n\n\u003ca name=\"download\"\u003e\u003c/a\u003e\n### Using MoltenVK Directly\n\nIf you are developing a *Vulkan* application for *iOS*, *tvOS*, or *visionOS*, or are\ndeveloping a *Vulkan* application for *macOS* and want to use a different version or\nbuild of the **MoltenVK** runtime library than provided in the *macOS Vulkan SDK*,\nyou can access a pre-built MoltenVK binary library from the **MoltenVK** repository, by\n[selecting a repository commit from the list](https://github.com/KhronosGroup/MoltenVK/actions),\nand downloading the associated **MoltenVK** runtime library artifact.\n\nFinally, if you want a customized build of **MoltenVK**, you can follow the [instructions below](#install)\nto create a **MoltenVK** runtime library by fetching and building the **MoltenVK** source code.\n\nTo learn how to integrate the **MoltenVK** runtime library into a game or application,\nsee the [`MoltenVK_Runtime_UserGuide.md `](Docs/MoltenVK_Runtime_UserGuide.md)\ndocument in the `Docs` directory.\n\n\n\n\u003ca name=\"install\"\u003e\u003c/a\u003e\nFetching **MoltenVK** Source Code\n---------------------------------\n\nTo fetch **MoltenVK** source code, clone this `MoltenVK` repository, and then run the\n`fetchDependencies` script to retrieve and build several external open-source libraries\non which **MoltenVK** relies:\n\n1. Ensure you have `cmake` and `python3` installed:\n\n\t\tbrew install cmake\n\t\tbrew install python3\n\n   For faster dependency builds, you can also optionally install `ninja`:\n\n\t\tbrew install ninja\n\n2. Clone the `MoltenVK` repository:\n\n\t\tgit clone https://github.com/KhronosGroup/MoltenVK.git\n\n3. Retrieve and build the external libraries:\n\n\t\tcd MoltenVK\n\t\t./fetchDependencies [platform...]\n\nWhen running the `fetchDependencies` script, you must specify one or more platforms\nfor which to build the external libraries. The platform choices include:\n\n\t--all\n\t--macos\n\t--ios\n\t--iossim\n\t--maccat\n\t--tvos\n\t--tvossim\n\nYou can specify multiple of these selections. The result is a single `XCFramework`\nfor each external dependency library, with each `XCFramework` containing binaries for\neach of the requested platforms.\n\nThe `--all` selection is the same as entering all of the other platform choices,\nand will result in a single `XCFramework` for each external dependency library,\nwith each `XCFramework` containing binaries for all supported platforms and simulators.\n\nRunning `fetchDependencies` repeatedly with different platforms will accumulate targets\nin the `XCFramework`, if the `--keep-cache` option is used on each invocation.\n\nFor more information about the external open-source libraries used by **MoltenVK**,\nsee the [`ExternalRevisions/README.md`](ExternalRevisions/README.md) document.\n\n\n\u003ca name=\"building\"\u003e\u003c/a\u003e\nBuilding **MoltenVK**\n-------------------\n\nDuring building, **MoltenVK** references the latest *Apple SDK* frameworks. To access these frameworks,\nand to avoid build errors, be sure to use the latest publicly available version of *Xcode*.\n\n\u003e ***Note:*** *Xcode 14* introduced a new static linkage model that is not compatible with previous\nversions of *Xcode*. If you link to a `MoltenVK.xcframework` that was built with *Xcode 14* or later,\nalso use *Xcode 14* or later to link it to your app or game.\n\u003e\n\u003e If you need to use *Xcode 13* or earlier to link `MoltenVK.xcframework` to your app or game,\nfirst build **MoltenVK** with *Xcode 13* or earlier.\n\u003e\n\u003e Or, if you want to use *Xcode 14* or later to build **MoltenVK**, in order to be able to use the\nlatest *Metal* capabilities, but need to use *Xcode 13* or earlier to link `MoltenVK.xcframework`\nto your app or game, first add the value `-fno-objc-msgsend-selector-stubs` to the `OTHER_CFLAGS`\n*Xcode* build setting in the `MoltenVK.xcodeproj` and `MoltenVKShaderConverter.xcodeproj` *Xcode*\nprojects, build **MoltenVK** with *Xcode 14* or later, and then link `MoltenVK.xcframework`\nto your app or game using *Xcode 13* or earlier.\n\nOnce built, the **MoltenVK** libraries can be run on *macOS*, *iOS*, *tvOS*, or *visionOS* devices\nthat support *Metal*,or on the *Xcode* *iOS Simulator*, *tvOS Simulator*, or *visionOS Simulator*.\n\n- The minimum runtime OS versions are indicated in the _Deployment Target_ build settings in `MoltenVK.xcodeproj`.\n- Information on *macOS* devices that are compatible with *Metal* can be found in\n  [this article](http://www.idownloadblog.com/2015/06/22/how-to-find-mac-el-capitan-metal-compatible).\n- Information on *iOS* devices that are compatible with *Metal* can be found in\n  [this article](https://developer.apple.com/library/content/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/HardwareGPUInformation/HardwareGPUInformation.html).\n\n\n\u003ca name=\"xcode_build\"\u003e\u003c/a\u003e\n### Building With _Xcode_\n\nThe `MoltenVKPackaging.xcodeproj` *Xcode* project contains targets and schemes to build\nand package the entire **MoltenVK** runtime distribution package, or to build individual\n**MoltenVK** or **MoltenVKShaderConverter** components.\n\nTo build a **MoltenVK** runtime distribution package, suitable for testing and integrating into an app,\nopen `MoltenVKPackaging.xcodeproj` in *Xcode*, and use one of the following *Xcode Schemes*, depending\non whether you want a **_Release_** or **_Debug_** configuration, and whether you want to build for all\nplatforms, or just one platform (in **_Release_** configuration):\n\n- **MoltenVK Package**\n- **MoltenVK Package (Debug)**\n- **MoltenVK Package (macOS only)**\n- **MoltenVK Package (iOS only)**\n- **MoltenVK Package (tvOS only)**\n- **MoltenVK Package (visionOS only)**  _(requires Xcode 15+)_\n\nEach of these`MoltenVKPackaging.xcodeproj` *Xcode* project *Schemes* puts the resulting packages in the\n`Package` directory, creating it if necessary. This directory contains separate `Release` and `Debug`\ndirectories, holding the most recent **_Release_** and **_Debug_** builds, respectively.\n\n_**Note:**_ Due to technical limitations in the dynamic library build tools, dynamic frameworks and libraries cannot be created\nfor the _tvOS Simulator_, or _MacCatalyst_ platforms. Static frameworks are created for these, and all other, platforms.\n\nA separate `Latest` directory links to  the most recent build, regardless of whether it was a **_Release_**\nor **_Debug_** build. Effectively, the `Package/Latest` directory points to whichever of the `Package/Release`\nor `Package/Debug` directories was most recently updated.\n\nWith this packaging structure, you can follow the [instructions below](#using) to link your application\nto the **MoltenVK** libraries and frameworks in the `Package/Latest` directory, to provide the flexibility\nto test your app with either a **_Debug_** build, or a higher-performance **_Release_** build.\n\n\n\u003ca name=\"command_line_build\"\u003e\u003c/a\u003e\n### Building From the Command Line\n\nIf you prefer to build **MoltenVK** from the command line, or to include the activity in a larger build script,\nyou can do so by executing a command similar to the following command within the `MoltenVK` repository folder,\nand identifying one of the *Xcode Schemes* from the list above. For example, the following command will build\n**MoltenVK** in the **_Debug_** configuration for *macOS* only:\n\n\txcodebuild build -quiet -project MoltenVKPackaging.xcodeproj -scheme \"MoltenVK Package (macOS only)\" -configuration \"Debug\"\n\nAlternately, you can use the basic `Makefile` in the `MoltenVK` repository folder to build **MoltenVK**\nfrom the command line. The following `make` targets are provided:\n\n\tmake\n\tmake all\n\tmake macos\n\tmake ios\n\tmake iossim\n\tmake maccat\n\tmake tvos\n\tmake tvossim\n\t\n\tmake all-debug\n\tmake macos-debug\n\tmake ios-debug\n\tmake iossim-debug\n\tmake maccat-debug\n\tmake tvos-debug\n\tmake tvossim-debug\n\t\n\tmake clean\n\tmake install\n\n- Running `make` repeatedly with different targets will accumulate binaries for these different targets.\n- The `all` target executes all platform targets.\n- The `all` target is the default target. Running `make` with no arguments is the same as running `make all`.\n- The `*-debug` targets build the binaries using the **_Debug_** configuration.\n- The `install` target will copy the most recently built `Package/Latest/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib`\n  into the `/usr/local/lib` system directory on your computer. Since `/usr/local/lib` is protected, you will generally\n  need to run it as `sudo make install` and enter your password. The `install` target does not build **MoltenVK**,\n  and you need to run `make macos` or `make macos-debug` first.\n\nThe `make` targets all require that *Xcode* is installed on your system.\n\n_**Note:**_ Due to technical limitations within _Xcode_, a dynamic framework is not created for the _MacCatalyst_ platform.\n\nBuilding from the command line creates the same `Package` folder structure described above when\nbuilding from within *Xcode*.\n\nWhen building from the command line, you can set any of the build settings documented\nin the `MoltenVK_Configuration_Parameters.md` file, by passing them in the command line,\nas in the following examples:\n\n\tmake MVK_CONFIG_LOG_LEVEL=0\nor\n\tmake macos MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS=1\n\n...etc.\n\n\n\u003ca name=\"hiding_vulkan_symbols\"\u003e\u003c/a\u003e\n### Hiding _Vulkan_ API Symbols\n\nYou can optionally build **MoltenVK** with the _Vulkan_ API static call symbols (`vk*`) hidden, to avoid \nlibrary linking conflicts when statically bound to a _Vulkan_ loader that also exports identical symbols.\n\nTo do so, when building **MoltenVK**, set the build setting `MVK_HIDE_VULKAN_SYMBOLS=1`.\nThis build setting can be set in the `MoltenVK.xcodeproj` *Xcode* project, or it can be \nincluded in any of the `make` command-line build commands [mentioned above](#command_line_build).\n\nWith `MVK_HIDE_VULKAN_SYMBOLS=1`, the _Vulkan_ `vkGetInstanceProcAddr()` call remains\nstatically bound, to provide the application with the ability to retrieve the remaining\n_Vulkan_ API calls as function pointers.\n\n\n\u003ca name=\"metal_private_api\"\u003e\u003c/a\u003e\n### Accessing _Metal_ Private API Calls\n\nYou can optionally build **MoltenVK** with access to private _Metal_ API calls, also known\nas \"Service Provider Interfaces\" (SPIs). Doing so will allow **MoltenVK** to extend its\nfunctionality by using certain private _Metal_ API calls, but it will also disqualify the\napp from being distributed via _Apple_ App Stores.\n\nTo do so, when building **MoltenVK**, set the build setting `MVK_USE_METAL_PRIVATE_API=1`.\nThis build setting can be set in the `MoltenVK.xcodeproj` *Xcode* project, or it can be \nincluded in any of the `make` command-line build commands [mentioned above](#command_line_build).\n\nFunctionality added with `MVK_USE_METAL_PRIVATE_API` enabled includes:\n- `VkPhysicalDeviceFeatures::wideLines`\n- `VkPhysicalDeviceFeatures::logicOp`\n- `VkPhysicalDeviceFeatures::depthBounds` *(requires an AMD GPU)*\n- `VkPhysicalDevicePortabilitySubsetFeaturesKHR::samplerMipLodBias`\n- `VkGraphicsPipelineRasterizationCreateInfo::sampleMask`, using `MTLRenderPipelineDescriptor.sampleMask` instead of emulating it in the fragment shader\n\n\n\u003ca name=\"install_vksdk\"\u003e\u003c/a\u003e\n### Install **MoltenVK** to Replace the _Vulkan SDK_ `libMoltenVK.dylib`\n\nTo replace the version of the **MoltenVK** installed on _macOS_ via the \n*[Vulkan SDK](https://vulkan.lunarg.com/sdk/home)* standard install process, \nperform the following steps:\n\n1. Build a _macOS_ version of **MoltenVK**, as described [above](#building).\n   The default config for command-line **MoltenVK** build has verbose logging info turned on. \n   If you want **MoltenVK** to log like the original _Vulkan SDK_ install, use this command when building **MoltenVK**:\n\n   ```bash\n   $ make macos MVK_CONFIG_LOG_LEVEL=1\n   ```\n\n2. From a command line terminal, execute the following command:\n\n   ```bash\n   $ sudo make install\n   ```\n\nThis will copy your latest _macOS_ build of **MoltenVK** into `/usr/local/lib/libMoltenVK.dylib`,\noverwriting the file installed by the _Vulkan SDK_ install process.\n\n\n\u003ca name=\"demos\"\u003e\u003c/a\u003e\nRunning **MoltenVK** Demo Applications\n--------------------------------------\n\nOnce you have compiled and built the **MoltenVK** runtime distribution package from this **MoltenVK** repository,\nas described in the [Building **MoltenVK**](#building) section, you can explore how **MoltenVK** provides *Vulkan*\nsupport on  *macOS*, *iOS*, and *tvOS* by investigating and running the demo application that is included in **MoltenVK**.\n\nThe **MoltenVK** _Cube_ demo app is located in the `Demos` folder. The demo app is available as an *Xcode* project.\nTo review and run the included demo app, open the `Demos/Demos.xcworkspace` workspace in *Xcode*.\n\nPlease read the [`Demos/README.md`](Demos/README.md) document for a description and instructions for running the\nincluded *Cube* demo app, and for external links to more sophisticated demo applications that can be run on **MoltenVK**.\n\n\n\n\u003ca name=\"using\"\u003e\u003c/a\u003e\nUsing **MoltenVK** in Your Application\n--------------------------------------\n\nOnce you have compiled and built the **MoltenVK** runtime distribution package from this **MoltenVK** repository,\nas described in the [Building **MoltenVK**](#building) section, follow the instructions in the Installation\nsection of the [`Docs/MoltenVK_Runtime_UserGuide.md`](Docs/MoltenVK_Runtime_UserGuide.md#install) document\nin the `Docs` directory, to link the **MoltenVK** libraries and frameworks to your application.\n\nThe runtime distribution package in the `Package/Latest` directory is a stand-alone package, and you can copy\nthe contents of that directory out of this **MoltenVK** repository into your own application building environment.\n\n\n\n\u003ca name=\"compliance\"\u003e\u003c/a\u003e\n**MoltenVK** and *Vulkan* Compliance\n------------------------------------\n\n**MoltenVK** is designed to be an implementation of a *Vulkan 1.2* subset that runs on *macOS*, *iOS*,\n*tvOS*, and *visionOS* platforms by mapping *Vulkan* capability to native *Metal* capability.\n\nThe fundamental design and development goal of **MoltenVK** is to provide this capability in a way that\nis both maximally compliant with the *Vulkan 1.2* specification, and maximally  performant.\n\nSuch compliance and performance is inherently affected by the capability available through *Metal*,\nas the native graphics driver on *macOS*, *iOS*, *tvOS*, and *visionOS* platforms. *Vulkan*\ncompliance may fall into one of the following categories:\n\n- Direct mapping between *Vulkan* capabilities and *Metal* capabilities. Within **MoltenVK**, the vast\n  majority of *Vulkan* capability is the result of this type of direct mapping.\n\n- Synthesized compliance through alternate implementation. A small amount of capability is provided using\n  this mechanism, such as via an extra render or compute shader stage.\n\n- Non-compliance. This appears where the capabilities of *Vulkan* and *Metal* are sufficiently different, that\n  there is no practical, or reasonably performant, mechanism to implement a *Vulkan* capability in *Metal*.\n  Because of design differences between *Vulkan* and *Metal*, a very small amount of capability falls into this\n  category, and at present **MoltenVK** is **_not_** fully compliant with the *Vulkan* specification. A list of\n  known limitations is documented in the [`MoltenVK_Runtime_UserGuide.md`](Docs/MoltenVK_Runtime_UserGuide.md#limitations)\n  document in the `Docs` directory.\n\nThe **MoltenVK** development team welcomes you to [post Issues](https://github.com/KhronosGroup/MoltenVK/issues)\nof non-compliance, and engage in discussions about how compliance can be improved, and non-compliant features can\nbe implemented or worked around.\n\n**MoltenVK** is a key component of the\n[*Khronos Vulkan Portability Initiative*](https://www.khronos.org/vulkan/portability-initiative),\nwhose intention is to provide specifications, resources, and tools to allow developers to understand and design\ntheir *Vulkan* apps for maximum cross-platform compatibility and portability, including on platforms, such as\n*macOS*, *iOS*, *tvOS*, and *visionOS*, where a native *Vulkan* driver is not available.\n\n\n\n\u003ca name=\"support\"\u003e\u003c/a\u003e\n\nGetting Support\n----------------\n\n- If you have a question about using **MoltenVK**, you can ask it in\n  [*MoltenVK Discussions*](https://github.com/KhronosGroup/MoltenVK/discussions).\n  This forum is monitored by **MoltenVK** contributors and users.\n\n- If you encounter an issue with the behavior of **MoltenVK**, or want to request an enhancement,\n  you can report it in the [*MoltenVK Issues List*](https://github.com/KhronosGroup/MoltenVK/issues).\n\n- If you encounter an issue with the *Vulkan SDK*, including the *Validation Layers*, you can report it in the\n  [*Vulkan SDK Issues List*](https://vulkan.lunarg.com/issue/home).\n\n- If you explore **MoltenVK** and determine that it does not meet your requirements at this time, we would appreciate\n  hearing why that is so, in [*MoltenVK Discussions*](https://github.com/KhronosGroup/MoltenVK/discussions).\n  The goal of **MoltenVK** is to increase the value of *Vulkan* as a true cross-platform ecosystem, by providing\n  *Vulkan* on *Apple* platforms. Hearing why this is currently not working for you will help us in that goal.\n\n\n\n\u003ca name=\"contributing\"\u003e\u003c/a\u003e\n\nContributing to **MoltenVK** Development\n----------------------------------------\n\nAs a public open-source project, **MoltenVK** benefits from code contributions from a wide range of developers,\nand we encourage you to get involved and contribute code to this **MoltenVK** repository.\n\nTo contribute your code, submit a [Pull Request](https://github.com/KhronosGroup/MoltenVK/pulls)\nto this repository. The first time you do this, you will be asked to agree to the **MoltenVK**\n[Contributor License Agreement](https://cla-assistant.io/KhronosGroup/MoltenVK).\n\n\n### Licensing\n\n**MoltenVK** is licensed under the Apache 2.0 license. All new source code files should include a\ncopyright header at the top, containing your authorship copyright and the Apache 2.0 licensing stub.\nYou may copy the text from an existing source code file as a template.\n\nThe Apache 2.0 license guarantees that code in the **MoltenVK** repository is free of Intellectual Property\nencumbrances. In submitting code to this repository, you are agreeing that the code is free of any Intellectual\nProperty claims. \n\n\n### *Vulkan* Validation\n\nDespite running on top of *Metal*, **MoltenVK** operates as a *Vulkan* core layer. As such, as per the\nerror handling guidelines of the [*Vulkan* specification](https://www.khronos.org/registry/vulkan/specs/1.2/html/vkspec.html#fundamentals-errors), **MoltenVK** should not perform *Vulkan* validation. When adding functionality\nto **MoltenVK**, avoid adding unnecessary validation code.\n\nValidation and error generation **_is_** appropriate within **MoltenVK** in cases where **MoltenVK** deviates\nfrom behavior defined by the *Vulkan* specification. This most commonly occurs when required behavior cannot\nbe mapped to functionality available within *Metal*. In that situation, it is important to provide feedback to\nthe application developer to that effect, by performing the necessary validation, and reporting an error.\n\nCurrently, there is some excess *Vulkan* validation and error reporting code within **MoltenVK**, added before\nthis guideline was introduced. You are encouraged to remove such code if you encounter it while performing other\n**MoltenVK** development. Do not remove validation and error reporting code that is covering a deviation in\nbehavior from the *Vulkan* specification.\n\n\n### Memory Management\n\n*Metal*, and other *Objective-C* objects in *Apple's SDK* frameworks, use reference counting for memory management.\nAs a contributor to **MoltenVK**, when instantiating *Objective-C* objects, it is important that you do not rely on\nthe app providing *autorelease pools* to do memory management for you. Because many *Vulkan* games and apps may be\nported from other platforms, they will often not automatically include autorelease pools in their threading models.\n\nAs a contributor to **MoltenVK**, avoid the use of the *Metal* `autorelease` method, or any object *Metal* creation\nmethods that imply internal use of `autorelease`, (eg- `[NSString stringWithFormat: ]`, etc). Instead, favor object\ncreation methods that return a retained object (eg- `[[NSString alloc] initWithFormat: ]`, etc), and manually track\nand release those objects. If you need to use autoreleased objects, wrap your code in an `@autoreleasepool {...}` block.\n\n\n### Code Formatting\n\nWhen contributing code, please honour the code formatting style found in existing **MoltenVK** source code.\nIn future, this will formally be enforced using `clang-format`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKhronosGroup%2FMoltenVK","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKhronosGroup%2FMoltenVK","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKhronosGroup%2FMoltenVK/lists"}