2017-11-17 11:14:29 -05:00
|
|
|
<a class="site-logo" href="https://github.com/KhronosGroup/MoltenVK" title="MoltenVK">
|
|
|
|
<img src="Docs/images/MoltenVK-Logo-Banner.png" alt="MoltenVK" style="width:256px;height:auto">
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MoltenVK
|
|
|
|
========
|
|
|
|
|
2020-01-07 16:47:29 -05:00
|
|
|
Copyright (c) 2015-2020 [The Brenwill Workshop Ltd.](http://www.brenwill.com)
|
2017-11-17 11:14:29 -05:00
|
|
|
|
|
|
|
*This document is written in [Markdown](http://en.wikipedia.org/wiki/Markdown) format.
|
|
|
|
For best results, use a Markdown reader.*
|
|
|
|
|
2018-03-01 20:57:51 +01:00
|
|
|
[](https://travis-ci.org/KhronosGroup/MoltenVK)
|
2017-11-17 11:14:29 -05:00
|
|
|
|
|
|
|
Table of Contents
|
|
|
|
-----------------
|
|
|
|
|
2019-02-08 19:36:52 -05:00
|
|
|
- [Developing Vulkan Applications on macOS and iOS](#developing_vulkan)
|
|
|
|
- [Introduction to **MoltenVK**](#intro)
|
|
|
|
- [Fetching **MoltenVK** Source Code](#install)
|
2017-11-17 11:14:29 -05:00
|
|
|
- [Building **MoltenVK**](#building)
|
2018-03-06 14:07:06 -05:00
|
|
|
- [Running the **MoltenVK** Demo Applications](#demos)
|
2017-11-17 11:14:29 -05:00
|
|
|
- [Using **MoltenVK** in Your Application](#using)
|
2018-03-06 16:51:05 -05:00
|
|
|
- [**MoltenVK** and *Vulkan* Compliance](#compliance)
|
2019-02-08 19:36:52 -05:00
|
|
|
- [Reporting Issues](#issues)
|
2018-03-06 16:51:05 -05:00
|
|
|
- [Contributing to **MoltenVK** Development](#contributing)
|
2017-11-17 11:14:29 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-08 19:36:52 -05:00
|
|
|
<a name="developing_vulkan"></a>
|
|
|
|
Developing Vulkan Applications for macOS and iOS
|
|
|
|
------------------------------------------------
|
|
|
|
|
|
|
|
The recommended method for developing a *Vulkan* application for *macOS* is to use the
|
|
|
|
[*Vulkan SDK*](https://vulkan.lunarg.com/sdk/home).
|
2017-11-17 11:14:29 -05:00
|
|
|
|
2019-02-08 19:36:52 -05:00
|
|
|
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*](https://vulkan.lunarg.com/sdk/home) and the **MoltenVK** library included in it.
|
2017-11-17 11:14:29 -05:00
|
|
|
|
2019-02-08 19:36:52 -05:00
|
|
|
If you are developing a *Vulkan* application for *iOS*, or are developing a *Vulkan* application for
|
|
|
|
*macOS* and want to use a different **MoltenVK** runtime library than provided in the *macOS Vulkan SDK*,
|
|
|
|
you can use this document to learn how to build a **MoltenVK** runtime library from source code.
|
2017-11-17 11:14:29 -05:00
|
|
|
|
2019-02-08 19:36:52 -05:00
|
|
|
To learn how to integrate the **MoltenVK** runtime library into a game or application,
|
|
|
|
see the [`MoltenVK_Runtime_UserGuide.md `](Docs/MoltenVK_Runtime_UserGuide.md)
|
|
|
|
document in the `Docs` directory.
|
2018-03-13 16:09:26 -04:00
|
|
|
|
2017-11-17 11:14:29 -05:00
|
|
|
|
|
|
|
|
|
|
|
<a name="intro"></a>
|
2019-02-08 19:36:52 -05:00
|
|
|
Introduction to MoltenVK
|
|
|
|
------------------------
|
2017-11-17 11:14:29 -05:00
|
|
|
|
2020-03-19 18:01:05 -04:00
|
|
|
**MoltenVK** is a layered implementation of [*Vulkan 1.0*](https://www.khronos.org/vulkan)
|
|
|
|
graphics and compute functionality, that is built on Apple's [*Metal*](https://developer.apple.com/metal)
|
|
|
|
graphics and compute framework on both *iOS* and *macOS*. **MoltenVK** allows you to use *Vulkan* graphics
|
|
|
|
and compute functionality to develop modern, cross-platform, high-performance graphical games and applications,
|
|
|
|
and to run them across many platforms, including both *iOS* and *macOS*.
|
2018-07-23 20:12:57 -04:00
|
|
|
|
|
|
|
*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 *iOS* and *macOS* 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*.
|
|
|
|
|
2019-02-08 19:36:52 -05:00
|
|
|
The **MoltenVK** runtime package contains two products:
|
2017-11-17 11:14:29 -05:00
|
|
|
|
2019-02-08 19:36:52 -05:00
|
|
|
- **MoltenVK** is a driver-level implementation of the [*Vulkan 1.0*](https://www.khronos.org/vulkan)
|
2018-07-23 20:12:57 -04:00
|
|
|
graphics and compute API.
|
2017-11-17 11:14:29 -05:00
|
|
|
|
|
|
|
- **MoltenVKShaderConverter** converts *SPIR-V* shader code to *Metal Shading Language (MSL)*
|
2018-07-23 20:12:57 -04:00
|
|
|
shader code, and converts *GLSL* shader source code to *SPIR-V* shader code and/or
|
|
|
|
*Metal Shading Language (MSL)* shader code. The *SPIR-V* converter is included in the
|
|
|
|
**MoltenVK** runtime to automatically convert *SPIR-V* shaders to their *MSL* equivalents.
|
|
|
|
In addition, both the *SPIR-V* and *GLSL* converters can be be packaged into a stand-alone
|
|
|
|
command-line *macOS* tool for converting shaders at development time.
|
2017-11-17 11:14:29 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a name="install"></a>
|
2019-02-08 19:36:52 -05:00
|
|
|
Fetching **MoltenVK** Source Code
|
|
|
|
---------------------------------
|
2017-11-17 11:14:29 -05:00
|
|
|
|
2019-02-08 19:36:52 -05:00
|
|
|
To fetch **MoltenVK** source code, clone this `MoltenVK` repository, and then run the
|
|
|
|
`fetchDependencies` script to retrieve and build several external open-source libraries
|
|
|
|
on which **MoltenVK** relies:
|
2017-11-17 11:14:29 -05:00
|
|
|
|
2018-03-06 14:07:06 -05:00
|
|
|
1. Ensure you have `cmake` and `python3` installed:
|
2017-11-17 11:14:29 -05:00
|
|
|
|
2018-03-06 14:07:06 -05:00
|
|
|
brew install cmake
|
2019-06-16 12:00:22 -04:00
|
|
|
brew install python3
|
2017-11-17 11:14:29 -05:00
|
|
|
|
2018-04-09 14:26:02 -04:00
|
|
|
For faster dependency builds, you can also optionally install `ninja`:
|
2018-04-04 20:48:21 +02:00
|
|
|
|
|
|
|
brew install ninja
|
|
|
|
|
2018-03-12 10:02:13 -04:00
|
|
|
2. Clone the `MoltenVK` repository:
|
2018-03-01 21:39:39 -05:00
|
|
|
|
2018-03-12 10:02:13 -04:00
|
|
|
git clone https://github.com/KhronosGroup/MoltenVK.git
|
2018-03-01 21:39:39 -05:00
|
|
|
|
2018-03-12 10:02:13 -04:00
|
|
|
3. Retrieve and build the external libraries:
|
2017-11-17 11:14:29 -05:00
|
|
|
|
2018-03-30 22:16:27 -04:00
|
|
|
cd MoltenVK
|
2020-06-17 19:10:33 -04:00
|
|
|
./fetchDependencies [platform...]
|
|
|
|
|
|
|
|
When running the `fetchDependencies` script, you must specify one or more platforms
|
|
|
|
for which to build the external libraries. The platform choices include:
|
|
|
|
|
2020-06-19 15:05:43 -04:00
|
|
|
--ios --iosfat --tvos --tvosfat --macos --all
|
2020-06-17 19:10:33 -04:00
|
|
|
|
2020-06-19 15:05:43 -04:00
|
|
|
You can specify multiple of these selections. The `--iosfat` and `--tvosfat` selection builds one
|
|
|
|
binary for each external library, with each binary including code for both *iOS* and *iOS Simulator*
|
|
|
|
platforms, or *tvOS* and *tvOS Simulator* platforms, respectively. The `--all` selection is the same
|
|
|
|
as selecting `--iosfat --tvosfat --macos` and results in three binaries for each external library:
|
|
|
|
a *fat iOS* binary, a *fat tvOS* binary, and a *macOS* binary. The more selections you include,
|
2020-06-17 19:10:33 -04:00
|
|
|
the longer the build time.
|
2017-11-17 11:14:29 -05:00
|
|
|
|
2018-03-12 10:02:13 -04:00
|
|
|
For more information about the external open-source libraries used by **MoltenVK**,
|
2018-03-30 22:16:27 -04:00
|
|
|
see the [`ExternalRevisions/README.md`](ExternalRevisions/README.md) document.
|
2017-11-17 11:14:29 -05:00
|
|
|
|
|
|
|
|
|
|
|
<a name="building"></a>
|
|
|
|
Building **MoltenVK**
|
|
|
|
-------------------
|
|
|
|
|
2019-02-13 14:34:55 -05:00
|
|
|
During building, **MoltenVK** references the latest *Apple SDK* frameworks. To access these frameworks,
|
|
|
|
and to avoid build errors, be sure to use the latest publicly available version of *Xcode*.
|
2018-03-01 19:42:15 -05:00
|
|
|
|
2019-02-13 14:34:55 -05:00
|
|
|
>***Note:*** To support `IOSurfaces` on *iOS*, **MoltenVK**, and any app that uses **MoltenVK**,
|
|
|
|
must be built with a minimum **iOS Deployment Target** (aka `IPHONEOS_DEPLOYMENT_TARGET `) build
|
|
|
|
setting of `iOS 11.0` or greater.
|
|
|
|
|
|
|
|
Once built, the **MoltenVK** libraries can be run on *iOS* or *macOS* devices that support *Metal*.
|
2018-03-01 19:42:15 -05:00
|
|
|
|
2019-02-13 14:34:55 -05:00
|
|
|
- At runtime, **MoltenVK** requires at least *macOS 10.11* or *iOS 9* (or *iOS 11* if using `IOSurfaces`).
|
2018-03-01 19:42:15 -05:00
|
|
|
- Information on *macOS* devices that are compatible with *Metal* can be found in
|
|
|
|
[this article](http://www.idownloadblog.com/2015/06/22/how-to-find-mac-el-capitan-metal-compatible).
|
2019-02-13 14:34:55 -05:00
|
|
|
- Information on *iOS* devices that are compatible with *Metal* can be found in
|
2018-03-01 19:42:15 -05:00
|
|
|
[this article](https://developer.apple.com/library/content/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/HardwareGPUInformation/HardwareGPUInformation.html).
|
|
|
|
|
2017-11-17 11:14:29 -05:00
|
|
|
The `MoltenVKPackaging.xcodeproj` *Xcode* project contains targets and schemes to build
|
|
|
|
and package the entire **MoltenVK** runtime distribution package, or to build individual
|
|
|
|
**MoltenVK** or **MoltenVKShaderConverter** components.
|
|
|
|
|
|
|
|
To build a **MoltenVK** runtime distribution package, suitable for testing and integrating into an app,
|
2018-09-16 14:46:01 -04:00
|
|
|
open `MoltenVKPackaging.xcodeproj` in *Xcode*, and use one of the following *Xcode Schemes*, depending
|
2020-06-19 15:05:43 -04:00
|
|
|
on whether you want a **_Release_** or **_Debug_** configuration, and whether you want to build for all
|
|
|
|
platforms, or just one platform (in **_Release_** configuration):
|
2017-11-17 11:14:29 -05:00
|
|
|
|
2018-10-30 23:16:12 -04:00
|
|
|
- **MoltenVK Package**
|
2018-09-16 14:46:01 -04:00
|
|
|
- **MoltenVK Package (Debug)**
|
2020-06-22 15:56:22 -04:00
|
|
|
- **MoltenVK Package (macOS only)**
|
2018-10-30 23:16:12 -04:00
|
|
|
- **MoltenVK Package (iOS only)**
|
2020-06-19 15:05:43 -04:00
|
|
|
- **MoltenVK Package (tvOS only)**
|
2017-11-17 11:14:29 -05:00
|
|
|
|
|
|
|
Each of these`MoltenVKPackaging.xcodeproj` *Xcode* project *Schemes* puts the resulting packages in the
|
|
|
|
`Package` directory, creating it if necessary. This directory contains separate `Release` and `Debug`
|
2018-10-30 23:16:12 -04:00
|
|
|
directories, holding the most recent **_Release_** and **_Debug_** builds, respectively.
|
2017-11-17 11:14:29 -05:00
|
|
|
|
2018-10-30 23:16:12 -04:00
|
|
|
A separate `Latest` directory links to the most recent build, regardless of whether it was a **_Release_**
|
|
|
|
or **_Debug_** build. Effectively, the `Package/Latest` directory points to whichever of the `Package/Release`
|
2017-11-17 11:14:29 -05:00
|
|
|
or `Package/Debug` directories was most recently updated.
|
|
|
|
|
|
|
|
With this packaging structure, you can follow the [instructions below](#using) to link your application
|
2019-02-18 22:19:37 +00:00
|
|
|
to the **MoltenVK** libraries and frameworks in the `Package/Latest` directory, to provide the flexibility
|
|
|
|
to test your app with either a **_Debug_** build, or a higher-performance **_Release_** build.
|
2017-11-17 11:14:29 -05:00
|
|
|
|
|
|
|
|
2018-03-30 13:03:37 -04:00
|
|
|
### Building from the Command Line
|
|
|
|
|
|
|
|
If you prefer to build **MoltenVK** from the command line, or to include the activity in a larger build script,
|
2018-10-30 23:16:12 -04:00
|
|
|
you can do so using the following command within the `MoltenVK` repository folder, and identifying one of the
|
|
|
|
*Xcode Schemes* from the list above. For example, the following command will build **MoltenVK** in the
|
|
|
|
**_Release_** configuration for both *macOS* and *iOS*:
|
2018-03-30 13:03:37 -04:00
|
|
|
|
2018-10-30 23:16:12 -04:00
|
|
|
xcodebuild -quiet -project MoltenVKPackaging.xcodeproj -scheme "MoltenVK Package" build
|
2018-03-30 13:03:37 -04:00
|
|
|
|
2018-10-30 23:16:12 -04:00
|
|
|
Alternately, you can use the basic `Makefile` in the `MoltenVK` repository folder to build **MoltenVK**
|
|
|
|
in the **_Release_** configuration from the command line. The following `make` targets are provided:
|
|
|
|
|
|
|
|
make
|
|
|
|
make all
|
|
|
|
make macos
|
|
|
|
make ios
|
2020-06-19 15:05:43 -04:00
|
|
|
make iosfat
|
|
|
|
make tvos
|
|
|
|
make tvosfat
|
2018-10-30 23:16:12 -04:00
|
|
|
make clean
|
2019-03-22 19:36:21 -04:00
|
|
|
make install
|
2018-10-30 23:16:12 -04:00
|
|
|
|
2020-04-02 21:11:14 -04:00
|
|
|
|
2020-06-19 15:05:43 -04:00
|
|
|
Running `make all` is the same as running all of `make macos`, `make iosfat`, and `make tvosfat`.
|
|
|
|
Running `make` with no arguments is the same as running `make all`.
|
2020-04-02 21:11:14 -04:00
|
|
|
|
2019-03-22 19:36:21 -04:00
|
|
|
The `install` target will copy the most recently built *macOS* `MoltenVK.framework` into
|
|
|
|
the `/Library/Frameworks` folder of your computer. Since `/Library/Frameworks` is protected,
|
2020-04-02 21:11:14 -04:00
|
|
|
you will generally need to run it as `sudo make install` and enter your password.
|
2018-10-30 23:16:12 -04:00
|
|
|
|
2020-04-02 21:11:14 -04:00
|
|
|
The `install` target just installs the built framework, it does not first build the framework.
|
2020-06-19 15:05:43 -04:00
|
|
|
You will first need to at least run `make macos`, or use *Xcode* to build the framework as described above.
|
2019-03-22 19:36:21 -04:00
|
|
|
|
|
|
|
The `make` targets all require that *Xcode* is installed on your system.
|
2018-10-30 23:16:12 -04:00
|
|
|
|
2020-04-02 21:11:14 -04:00
|
|
|
Building from the command line creates the same `Package` folder structure described above when
|
|
|
|
building from within *Xcode*.
|
2018-03-30 13:03:37 -04:00
|
|
|
|
2017-11-17 11:14:29 -05:00
|
|
|
|
2019-05-28 17:19:43 -04:00
|
|
|
### Building Within a Larger External Build Environment
|
|
|
|
|
|
|
|
If you build **MoltenVK** as part of a larger build environment, that does not use the scripts or *Xcode*
|
|
|
|
projects provided by **MoltenVK**, you may be interested in certain build options designed to allow you to
|
|
|
|
customize the use of **MoltenVK** within your custom build environment. These options are not available
|
|
|
|
in the default **MoltenVK** build environment described in the previous sections.
|
|
|
|
|
|
|
|
- `MoltenVKShaderConverter` uses the `SPIRV-Tools` external library to log SPIR-V code for diagnostics.
|
|
|
|
If this is not useful to you, you can define the `MVK_EXCLUDE_SPIRV_TOOLS` when building the
|
|
|
|
`MoltenVKShaderConverter` code base, and **MoltenVK** will not attempt to use code from the `SPIRV-Tools`
|
|
|
|
repository. In this way, you will not need to retrieve or build the `SPIRV-Tools` repository, or link to
|
|
|
|
a `SPIRV-Tools` external library.
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-06 14:07:06 -05:00
|
|
|
<a name="demos"></a>
|
|
|
|
Running the **MoltenVK** Demo Applications
|
|
|
|
------------------------------------------
|
|
|
|
|
|
|
|
Once you have compiled and built the **MoltenVK** runtime distribution package from this **MoltenVK** repository,
|
|
|
|
as described in the [Building **MoltenVK**](#building) section, you can explore how **MoltenVK** provides *Vulkan*
|
|
|
|
support on *iOS* and *macOS* by investigating and running the demo applications that are included in **MoltenVK**.
|
|
|
|
|
|
|
|
The **MoltenVK** demo apps are located in the `Demos` folder. Each demo app is available as an *Xcode* project.
|
|
|
|
To review and run the included demo apps, open the `Demos/Demos.xcworkspace` workspace in *Xcode*.
|
|
|
|
|
|
|
|
Please read the [`Demos/README.md`](Demos/README.md) document for a description of each demo app, and instructions
|
|
|
|
on running the demo apps. Several of the demo apps allow you to explore a variety of *Vulkan* features by modifying
|
|
|
|
*Xcode* build settings. Additional demos can be downloaded and built from external repositories, as described in the
|
|
|
|
[`Demos/README.md`](Demos/README.md) document
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-11-17 11:14:29 -05:00
|
|
|
<a name="using"></a>
|
|
|
|
Using **MoltenVK** in Your Application
|
|
|
|
--------------------------------------
|
|
|
|
|
2018-03-06 14:07:06 -05:00
|
|
|
Once you have compiled and built the **MoltenVK** runtime distribution package from this **MoltenVK** repository,
|
|
|
|
as described in the [Building **MoltenVK**](#building) section, follow the instructions in the Installation
|
2019-02-18 22:19:37 +00:00
|
|
|
section of the [`Docs/MoltenVK_Runtime_UserGuide.md`](Docs/MoltenVK_Runtime_UserGuide.md#install) document
|
|
|
|
in the `Docs` directory, to link the **MoltenVK** libraries and frameworks to your application.
|
2017-11-17 11:14:29 -05:00
|
|
|
|
|
|
|
The runtime distribution package in the `Package/Latest` directory is a stand-alone package, and you can copy
|
|
|
|
the contents of that directory out of this **MoltenVK** repository into your own application building environment.
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-06 16:51:05 -05:00
|
|
|
<a name="compliance"></a>
|
|
|
|
|
|
|
|
**MoltenVK** and *Vulkan* Compliance
|
|
|
|
------------------------------------
|
|
|
|
|
2018-05-14 15:48:27 -04:00
|
|
|
**MoltenVK** is designed to be a *Vulkan 1.0* driver that runs on *macOS* and *iOS* platforms by mapping *Vulkan*
|
2018-03-06 16:51:05 -05:00
|
|
|
capability to native *Metal* capability.
|
|
|
|
|
|
|
|
The fundamental design and development goal of **MoltenVK** is to provide this capability in a way that
|
2018-05-14 15:48:27 -04:00
|
|
|
is both maximally compliant with the *Vulkan 1.0* specification, and maximally performant.
|
2018-03-06 16:51:05 -05:00
|
|
|
|
|
|
|
Such compliance and performance is inherently affected by the capability available through *Metal*, as the
|
|
|
|
native driver on *macOS* and *iOS* platforms. *Vulkan* compliance may fall into one of the following categories:
|
|
|
|
|
|
|
|
- Direct mapping between *Vulkan* capabilities and *Metal* capabilities. Within **MoltenVK**, almost all capability
|
|
|
|
is the result of this type of direct mapping.
|
|
|
|
|
|
|
|
- Synthesized compliance through alternate implementation. A very small amount of capability is provided using
|
|
|
|
this mechanism, such as via an extra render or compute shader stage.
|
|
|
|
|
|
|
|
- Non-compliance. This appears where the capabilities of *Vulkan* and *Metal* are sufficiently different, that
|
|
|
|
there is no practical, or reasonably performant, mechanism to implement a *Vulkan* capability in *Metal*.
|
|
|
|
Because of design differences between *Vulkan* and *Metal*, a very small amount of capability falls into this
|
|
|
|
category, and at present **MoltenVK** is **_not_** fully compliant with the *Vulkan* specification. A list of
|
2019-02-08 19:36:52 -05:00
|
|
|
known limitations is documented in the [`MoltenVK_Runtime_UserGuide.md`](Docs/MoltenVK_Runtime_UserGuide.md#limitations)
|
2018-03-06 16:51:05 -05:00
|
|
|
document in the `Docs` directory.
|
|
|
|
|
|
|
|
The **MoltenVK** development team welcomes you to [post Issues](https://github.com/KhronosGroup/MoltenVK/issues)
|
|
|
|
of non-compliance, and engage in discussions about how compliance can be improved, and non-compliant features can
|
|
|
|
be implemented or worked around.
|
|
|
|
|
|
|
|
**MoltenVK** is a key component of the [*Khronos Vulkan Portability Initiative*](https://www.khronos.org/vulkan/portability-initiative),
|
|
|
|
whose intention is to provide specifications, resources, and tools to allow developers to understand and design
|
|
|
|
their *Vulkan* apps for maximum cross-platform compatibility and portability, including on platforms, such as
|
2018-05-24 13:21:31 +08:00
|
|
|
*macOS* and *iOS*, where a native *Vulkan* driver is not available.
|
2018-03-06 16:51:05 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-08 19:36:52 -05:00
|
|
|
<a name="issues"></a>
|
|
|
|
|
|
|
|
Reporting Issues
|
|
|
|
----------------
|
|
|
|
|
|
|
|
- If you encounter an issue with the behaviour of **MoltenVK**, you can report it in the
|
|
|
|
[*MoltenVK Issues List*](https://github.com/KhronosGroup/MoltenVK/issues).
|
2019-09-25 15:41:40 -05:00
|
|
|
|
2019-02-08 19:36:52 -05:00
|
|
|
- If you encounter an issue with the *Vulkan SDK*, including the *Validation Layers*, you can report it in the
|
|
|
|
[*Vulkan SDK Issues List*](https://vulkan.lunarg.com/issue/home).
|
|
|
|
|
2019-09-25 15:41:40 -05:00
|
|
|
- If you explore **MoltenVK** and determine that it does not meet your requirements at this time, we would appreciate
|
|
|
|
hearing why that is so, on the [*MoltenVK Issues List*](https://github.com/KhronosGroup/MoltenVK/issues).
|
|
|
|
The goal of **MoltenVK** is to increase the value of *Vulkan* as a true cross-platform ecosystem, by providing
|
|
|
|
*Vulkan* on *Apple* platforms. Hearing why this is currently not working for you will help us in that goal.
|
|
|
|
|
2019-02-08 19:36:52 -05:00
|
|
|
|
|
|
|
|
2018-03-06 16:51:05 -05:00
|
|
|
<a name="contributing"></a>
|
|
|
|
|
|
|
|
Contributing to **MoltenVK** Development
|
|
|
|
----------------------------------------
|
|
|
|
|
|
|
|
As a public open-source project, **MoltenVK** benefits from code contributions from a wide range of developers,
|
|
|
|
and we encourage you to get involved and contribute code to this **MoltenVK** repository.
|
|
|
|
|
|
|
|
To contribute your code, submit a [Pull Request](https://github.com/KhronosGroup/MoltenVK/pulls)
|
|
|
|
to this repository. The first time you do this, you will be asked to agree to the **MoltenVK**
|
|
|
|
[Contributor License Agreement](https://cla-assistant.io/KhronosGroup/MoltenVK).
|
|
|
|
|
|
|
|
|
|
|
|
### Licensing
|
|
|
|
|
|
|
|
**MoltenVK** is licensed under the Apache 2.0 license. All new source code files should include a
|
|
|
|
copyright header at the top, containing your authorship copyright and the Apache 2.0 licensing stub.
|
|
|
|
You may copy the text from an existing source code file as a template.
|
|
|
|
|
|
|
|
The Apache 2.0 license guarantees that code in the **MoltenVK** repository is free of Intellectual Property
|
|
|
|
encumbrances. In submitting code to this repository, you are agreeing that the code is free of any Intellectual
|
|
|
|
Property claims.
|
|
|
|
|
|
|
|
|
2019-07-17 18:24:07 -04:00
|
|
|
### Memory Management
|
|
|
|
|
|
|
|
*Metal*, and other *Objective-C* objects in *Apple's SDK* frameworks, use reference counting for memory management.
|
|
|
|
When instantiating *Objective-C* objects, it is important that you do not rely on implied *autorelease pools* to do
|
|
|
|
memory management for you. Because many *Vulkan* games and apps may be ported from other platforms, they will
|
|
|
|
typically not include autorelease pools in their threading models.
|
|
|
|
|
|
|
|
Avoid the use of the `autorelease` method, or any object creation methods that imply use of `autorelease`,
|
|
|
|
(eg- `[NSString stringWithFormat: ]`, etc). Instead, favour object creation methods that return a retained object
|
|
|
|
(eg- `[[NSString alloc] initWithFormat: ]`, etc), and manually track and release those objects. If you need to use
|
|
|
|
autoreleased objects, wrap code blocks in an `@autoreleasepool {...}` block.
|
|
|
|
|
|
|
|
|
2018-03-06 16:51:05 -05:00
|
|
|
### Code Formatting
|
|
|
|
|
2018-05-24 13:21:31 +08:00
|
|
|
When contributing code, please honour the code formatting style found in existing **MoltenVK** source code.
|
2018-03-06 16:51:05 -05:00
|
|
|
In future, this will formally be enforced using `clang-format`.
|