Reputation: 51
I am getting started with Vulkan (vulkansdk-macos-1.1.126.0) on macOS (10.14.6), and have followed a tutorial in setting up an instance which all seems to go well however when I call vkEnumerateInstanceLayerProperties
I get a returned layer count of 0.
At first I thought it could be my build arguments/variables, however when I run the vulkanInfo application supplied with the tar.gz it also reports there that there are no layers (Layers: count = 0
). I then tried to add environment variables:
PATH=$PATH:$VULKAN_ROOT/bin
export VK_LAYER_PATH=$VULKAN_ROOT/etc/vulkan/explicit_layers.d
export VK_ICD_FILENAMES=$VULKAN_ROOT/etc/vulkan/icd.d/MoltenVK_icd.json
export VK_LAYER_PATH=$VULKAN_ROOT/etc/vulkan/explicit_layers.d
export VK_INSTANCE_LAYERS=VK_LAYER_LUNARG_standard_validation vulkaninfo
#export VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation vulkaninfo
and launch vulkanInfo from the terminal. Maybe it is a Mac trying to be too secure issue or has something to do with file permissions. Any suggestions are appreciated since this will seriously hamper debugging.
Upvotes: 4
Views: 322
Reputation: 51
So as you'd expect I was doing something wrong, just doing 2 different things wrong:
- for launching vulkanInfo from the terminal, you can see that I wasn't exporting the PATH
variable.
- for VSCode (where I am building the application) I had the VK_ICD_FILENAMES
and VK_LAYER_PATH
as preprocessor definitions, not as launch environment variables (set in the launch.json, environment name/value map).
Upvotes: 1