#How can I enable VK_LAYER_KHRONOS_validation layer?

20 messages · Page 1 of 1 (latest)

blissful rover
#

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.

acoustic thistle
#

do you have vk_layer_path as system variable?(or how its called in mac)

blissful rover
#

I'm not using it at the moment. Previously, it was handed over to the application as an env variable, but there was no change, so it is currently removed.

#

To be exact, the same error occurs when you give the correct value, and the same error occurs when you give the wrong value (write li instead of lib) (does not support layers).

sick sorrel
blissful rover
#

I will try to find the path where the manifest file exists. Thank you 🙇‍♂️

sick sorrel
#

manifest json file to be clear

#

usually, the file is in share/explicit_layer.d (so up one folder from lib and down two)

blissful rover
#

I think I found it 🙂

sick sorrel
#

yep

blissful rover
#

Tried with the folder path, but the same error is printed

sick sorrel
#

can you set VK_LOADER_DEBUG=all as an env-var and see what it prints? This causes the vulkan-loader to output where it searched for layers and whatnot

blissful rover
#

Ofcourse! wait a moment please

#

Um... the same output. I tried to apply the environmental variable through export to see if it was caused by the failure of the environmental variable, but it came out the same at this time.

sick sorrel
#

maybe the env-vars are just not reaching the application?

blissful rover
#

I think environmental variables are applied well

sick sorrel
#

well, the loader prints to stderr, but maybe try adding a debug utils messenger to the pNext chain of vkInstanceCreateInfo?
That or figure out where stderr has gone

blissful rover
#

Oh, I think I've solved the problem to some extent. I think it is a problem caused by receiving a layer-related pass from lwjgl as a separate factor and initializing it based on that factor.
Currently, we are trying to resolve the error shown below. Thank you for help 🙇‍♂️

sick sorrel
#

well that error is cause you need to enable the portability enumeration flag and extension

blissful rover
#

I'll look for related information. Thanks once again.