Skip to content

Latest commit

 

History

History

README.md

Example Layer

This is a very simple Vulkan layer built using vulkanalia. It intercepts the vkBeginCommandBuffer and vkEndCommandBuffer commands and prints a message before calling the actual command.

Instructions

To build and enable this layer in the triangle example in this repository, follow these instructions. They assume that you are starting in the root directory of this Git repository.

  1. Build the layer – cargo build
  2. Let Vulkan know about the JSON file for your layer that is appropriate for your platform
    • Windows (PowerShell) – $env:VK_ADD_LAYER_PATH="$PWD\layer\VK_LAYER_vulkanalia_layer_example.dll.json"
    • macOS – export VK_ADD_LAYER_PATH="$PWD/layer/VK_LAYER_vulkanalia_layer_example.dylib.json"
    • Linux, BSD, etc. – export VK_ADD_LAYER_PATH="$PWD/layer/VK_LAYER_vulkanalia_layer_example.so.json"
  3. Run the triangle example – cargo run --bin triangle