Fix instructions for running the examples on a Mac. (#609)
- `$VULKAN_SDK` must now be set, and serves as a base value for the other variables; - ICD and layers moved from the `etc` to `share` subfolder.
This commit is contained in:
parent
2a9a59e75c
commit
e5c4d11b03
13
README.md
13
README.md
|
@ -231,11 +231,14 @@ Make sure that you have a Vulkan ready driver and install the [LunarG Vulkan SDK
|
||||||
#### Linux
|
#### Linux
|
||||||
Make sure that you have a Vulkan ready driver and install the [LunarG Vulkan SDK](https://lunarg.com/vulkan-sdk/). You also have to add the library and layers to your path. Have a look at my [post](http://askubuntu.com/a/803110/77183) if you are unsure how to do that.
|
Make sure that you have a Vulkan ready driver and install the [LunarG Vulkan SDK](https://lunarg.com/vulkan-sdk/). You also have to add the library and layers to your path. Have a look at my [post](http://askubuntu.com/a/803110/77183) if you are unsure how to do that.
|
||||||
#### macOS
|
#### macOS
|
||||||
Install the [LunarG Vulkan SDK](https://lunarg.com/vulkan-sdk/). This basically entails extracting the downloaded tarball to any location you choose and then setting a few environment variables. Specifically, if `SDK_PATH` is set to the root extracted SDK directory,
|
Install the [LunarG Vulkan SDK](https://lunarg.com/vulkan-sdk/). The installer puts the SDK in `$HOME/VulkanSDK/<version>` by default. You will need to set the following environment variables when running cargo:
|
||||||
|
```sh
|
||||||
* `DYLD_LIBRARY_PATH = $SDK_PATH/macOS/lib`
|
VULKAN_SDK=$HOME/VulkanSDK/<version>/macOS \
|
||||||
* `VK_ICD_FILENAMES = $SDK_PATH/macOS/etc/vulkan/icd.d/MoltenVK_icd.json`
|
DYLD_FALLBACK_LIBRARY_PATH=$VULKAN_SDK/lib \
|
||||||
* `VK_LAYER_PATH = $SDK_PATH/macOS/etc/vulkan/explicit_layer.d`
|
VK_ICD_FILENAMES=$VULKAN_SDK/share/vulkan/icd.d/MoltenVK_icd.json \
|
||||||
|
VK_LAYER_PATH=$VULKAN_SDK/share/vulkan/explicit_layer.d \
|
||||||
|
cargo run ...
|
||||||
|
```
|
||||||
|
|
||||||
### [Triangle](https://github.com/MaikKlein/ash/blob/master/examples/src/bin/triangle.rs)
|
### [Triangle](https://github.com/MaikKlein/ash/blob/master/examples/src/bin/triangle.rs)
|
||||||
Displays a triangle with vertex colors.
|
Displays a triangle with vertex colors.
|
||||||
|
|
Loading…
Reference in a new issue