finaly found that to make it find the Vulkan dynamic library I had to add -Dorg.lwjgl.vulkan.libname=MoltenVK as a jvm argument.
All works well excepted that I cannot add any validation layers. If I do, I always get the following error :VK_ERROR_LAYER_NOT_PRESENT: Vulkan layer VK_LAYER_LUNARG_standard_validation is not supported.Am I missing something ?
MoltenVK is a Layer-0 driver implementation of Vulkan, and currently does not support the loading of higher level Vulkan Layers.
From the list of known MoltenVK limitations:QuoteMoltenVK is a Layer-0 driver implementation of Vulkan, and currently does not support the loading of higher level Vulkan Layers.This may change soon, there has been some progress in porting the validation layers to macOS.
In fact I searched for the org.lwjgl.vulkan.libname because the 3.1.6 release of lwjgl I use does not have any natives in the vulkan directory, so I imagined I had to provide the library by myself. But maybe I missed something else ?
Exception in thread "main" java.lang.AssertionError: Failed to create VkInstance: A requested layer is not present or could not be loaded. at org.lwjgl.demo.vulkan.ColoredRotatingQuadDemo.createInstance(ColoredRotatingQuadDemo.java:133) at org.lwjgl.demo.vulkan.ColoredRotatingQuadDemo.main(ColoredRotatingQuadDemo.java:1173)
export VK_ICD_FILENAMES=/code/vulkansdk-macos-220.127.116.11/macOS/share/vulkan/icd.d/MoltenVK_icd.jsonexport VK_LAYER_PATH=/code/vulkansdk-macos-18.104.22.168/macOS/share/vulkan/explicit_layer.d
java -Dorg.lwjgl.vulkan.libname=/code/vulkansdk-macos-22.214.171.124/macOS/lib/libvulkan.dylib -cp target/lwjgl3-demos.jar org.lwjgl.demo.vulkan.ColoredRotatingQuadDemo
export VULKAN_SDK=<path to extracted SDK>/macOSexport VK_ICD_FILENAMES=$VULKAN_SDK/share/vulkan/icd.d/MoltenVK_icd.jsonexport VK_LAYER_PATH=$VULKAN_SDK/etc/vulkan/explicit_layer.d