Hello, I have a question because there was a problem using the Vulkan API through Kotlin.
I printed out the names of the currently available layers, but only MoltenVK is output, and when I actually try to use the Validation Layer, the following error is output.
VK_ERROR_LAYER_NOT_PRESENT: Vulkan layer VK_LAYER_KHRONOS_validation is not supported.
Currently, I have installed the Vulkan SDK and added the ./macOS/lib of the Vulkan SDK installed in the library path. Is there any missing??
Related Java Arguments
Djava.library.path=/Users/XXX/VulkanSDK/1.3.250.1/macOS/lib:...
Related Code
val validationLayerSupport = stackPush().use { stack ->
val layerCount = stack.ints(0)
VK10.vkEnumerateInstanceLayerProperties(layerCount, null)
val avaliableLayers = VkLayerProperties.malloc(layerCount[0], stack)
VK10.vkEnumerateInstanceLayerProperties(layerCount, avaliableLayers)
val avaliableLayerNames = avaliableLayers.map { it.layerNameString() } .toSet()
//print available layer names
println("Available layers:")
avaliableLayerNames.forEach { println("\t$it") }
return@use avaliableLayerNames.containsAll(VALIDATION_LAYERS) //VALIDATION_LAYERS = setOf("VK_LAYER_KHRONOS_validation")
}
Thank you.