vulkanvalidation-layers

How to make VK_LAYER_KHRONOS_validation available?


Solution:

  1. Uninstall vulkan
  2. In registry HKLM\SOFTWARE\Khronos\Vulkan\ExplicitLayers and HKLM\SOFTWARE\WOW6432Node\Khronos\Vulkan\ExplicitLayers remove everything
  3. reinstall vulkan

I recently started learning how to use Vulkan. I'm following this tutorial but even with a copy/paste of their code I got an error because VK_LAYER_KHRONOS_validation is not listed when I call vkEnumerateInstanceLayerProperties().

In the Vulkan configurator, VK_LAYER_KHRONOS_validation appear in the right panel but not in the bottom one (I'm not sure about what this configurator is for but there is an "Available Layers" category in the bottom panel and the names written there are the one listed by vkEnumerateInstanceLayerProperties()).

Vulkan Development Status:
- Layers override: "Validation" configuration
- VULKAN_SDK environment variable: D:\Games\lib\Vulkan\1.2.176.1
- Vulkan Loader version: 1.2.141
- User-Defined Layers Paths from VK_LAYER_PATH environment variable: None
- User-Defined Layers Paths from Vulkan Configurator: None
- Available Layers:
    - VK_LAYER_NV_optimus (1.2.142)
    - VK_LAYER_VALVE_steam_overlay (1.2.136)
    - VK_LAYER_VALVE_steam_fossilize (1.2.136)
    - VK_LAYER_EOS_Overlay (1.2.136)
    - VK_LAYER_EOS_Overlay (1.2.136)
    - VK_LAYER_OBS_HOOK (1.2.131)
    - VK_LAYER_OBS_HOOK (1.2.131)
- Physical Devices:
    - GeForce GTX 950 (Discrete GPU) with Vulkan 1.2.142

Other tutorials I found use VK_LAYER_LUNARG_standard_validation but it don't work too and is Deprecated.

So do I need to install validation layer manually, if yes where? And if no, why is VK_LAYER_KHRONOS_validation unavailable and how can I use it?

I'm sure I'm missing something obvious ç_ç.


Additional information :

uint32_t layerCount;
vkEnumerateInstanceLayerProperties(&layerCount, nullptr);
std::vector<VkLayerProperties> availableLayers(layerCount);
vkEnumerateInstanceLayerProperties(&layerCount, availableLayers.data());
validation layer: loaderGetDeviceRegistryFiles: GUID for 23 is not SoftwareComponent skipping
validation layer: loaderGetDeviceRegistryFiles: GUID for 24 is not SoftwareComponent skipping
validation layer: loader_get_json: Failed to open JSON file C:\Program Files\Rockstar Games\Social Club\SocialClubVulkanLayer.json
validation layer: loader_get_json: Failed to open JSON file D:\Games\lib\1.2.176.1\Bin\VkLayer_api_dump.json
validation layer: loader_get_json: Failed to open JSON file D:\Games\lib\1.2.176.1\Bin\VkLayer_device_simulation.json
validation layer: loader_get_json: Failed to open JSON file D:\Games\lib\1.2.176.1\Bin\VkLayer_gfxreconstruct.json
validation layer: loader_get_json: Failed to open JSON file D:\Games\lib\1.2.176.1\Bin\VkLayer_khronos_synchronization2.json
validation layer: loader_get_json: Failed to open JSON file D:\Games\lib\1.2.176.1\Bin\VkLayer_khronos_validation.json
validation layer: loader_get_json: Failed to open JSON file D:\Games\lib\1.2.176.1\Bin\VkLayer_monitor.json
validation layer: loader_get_json: Failed to open JSON file D:\Games\lib\1.2.176.1\Bin\VkLayer_screenshot.json
validation layer: verifyMetaLayerComponentLayers: Meta-layer VK_LAYER_LUNARG_override can't find component layer VK_LAYER_KHRONOS_validation at index 0.  Skipping this layer.
validation layer: Removing meta-layer VK_LAYER_LUNARG_override from instance layer list since it appears invalid.
validation layer: loaderValidateLayers: Layer 0 does not exist in the list of available layers
failed to create instance!

EDIT: In the BIN folder VkLayer_khronos_validation.dll/.json/.pdb exists so I run vulkaninfoSDK.exe and notice that it try to load from the file D:\Games\lib\1.2.176.1\Bin instead of D:\Games\lib\Vulkan\1.2.176.1\Bin so I think I found the problem. But WHY? The file is not here why is it skipping a folder ?

EDIT2: I changed the folder (removed the \Vulkan\ in the directory) and now errors are (with vulkaninfoSDK.exe):

ERROR: [Loader Message] Code 0 : loader_get_json: Failed to open JSON file C:\Program Files\Rockstar Games\Social Club\SocialClubVulkanLayer.json
WARNING: [Loader Message] Code 0 : loaderAddLayerProperties: D:\Games\lib\1.2.176.1\Bin\VkLayer_api_dump.json invalid layer manifest file version 1.2.0.  May cause errors.
WARNING: [Loader Message] Code 0 : loaderAddLayerProperties: D:\Games\lib\1.2.176.1\Bin\VkLayer_device_simulation.json invalid layer manifest file version 1.2.0.  May cause errors.
WARNING: [Loader Message] Code 0 : loaderAddLayerProperties: D:\Games\lib\1.2.176.1\Bin\VkLayer_gfxreconstruct.json invalid layer manifest file version 1.2.0.  May cause errors.
WARNING: [Loader Message] Code 0 : loaderAddLayerProperties: D:\Games\lib\1.2.176.1\Bin\VkLayer_khronos_synchronization2.json invalid layer manifest file version 1.2.0.  May cause errors.
WARNING: [Loader Message] Code 0 : loaderAddLayerProperties: D:\Games\lib\1.2.176.1\Bin\VkLayer_khronos_validation.json invalid layer manifest file version 1.2.0.  May cause errors.
WARNING: [Loader Message] Code 0 : loaderAddLayerProperties: D:\Games\lib\1.2.176.1\Bin\VkLayer_screenshot.json invalid layer manifest file version 1.2.0.  May cause errors.

and with the code I get:

validation layer: loaderGetDeviceRegistryFiles: GUID for 23 is not SoftwareComponent skipping
validation layer: loaderGetDeviceRegistryFiles: GUID for 24 is not SoftwareComponent skipping
validation layer: loader_get_json: Failed to open JSON file C:\Program Files\Rockstar Games\Social Club\SocialClubVulkanLayer.json
validation layer: loaderAddLayerProperties: D:\Games\lib\1.2.176.1\Bin\VkLayer_api_dump.json invalid layer manifest file version 1.2.0.  May cause errors.
validation layer: loaderAddLayerProperties: D:\Games\lib\1.2.176.1\Bin\VkLayer_device_simulation.json invalid layer manifest file version 1.2.0.  May cause errors.
validation layer: loaderAddLayerProperties: D:\Games\lib\1.2.176.1\Bin\VkLayer_gfxreconstruct.json invalid layer manifest file version 1.2.0.  May cause errors.
validation layer: loaderAddLayerProperties: D:\Games\lib\1.2.176.1\Bin\VkLayer_khronos_synchronization2.json invalid layer manifest file version 1.2.0.  May cause errors.
validation layer: loaderAddLayerProperties: D:\Games\lib\1.2.176.1\Bin\VkLayer_khronos_validation.json invalid layer manifest file version 1.2.0.  May cause errors.
validation layer: loaderAddLayerProperties: D:\Games\lib\1.2.176.1\Bin\VkLayer_screenshot.json invalid layer manifest file version 1.2.0.  May cause errors.
validation layer: Searching for ICD drivers named .\nvoglv64.dll
validation layer: Build ICD instance extension list
validation layer: Instance Extension: VK_KHR_device_group_creation (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.1
validation layer: Instance Extension: VK_KHR_external_fence_capabilities (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.1
validation layer: Instance Extension: VK_KHR_external_memory_capabilities (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.1
validation layer: Instance Extension: VK_KHR_external_semaphore_capabilities (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.1
validation layer: Instance Extension: VK_KHR_get_physical_device_properties2 (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.2
validation layer: Instance Extension: VK_KHR_get_surface_capabilities2 (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.1
validation layer: Instance Extension: VK_KHR_surface (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.25
validation layer: Instance Extension: VK_KHR_surface_protected_capabilities (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.1
validation layer: Instance Extension: VK_KHR_win32_surface (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.6
validation layer: Instance Extension: VK_EXT_debug_report (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.9
validation layer: Instance Extension: VK_EXT_debug_utils (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.2
validation layer: Instance Extension: VK_EXT_swapchain_colorspace (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.4
validation layer: Instance Extension: VK_NV_external_memory_capabilities (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.1
validation layer: Loading layer library D:\Games\lib\1.2.176.1\Bin\.\VkLayer_khronos_validation.dll
validation layer: Loading layer library C:\ProgramData\obs-studio-hook\.\graphics-hook64.dll
validation layer: Loading layer library C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll
validation layer: Build ICD instance extension list
validation layer: Instance Extension: VK_KHR_device_group_creation (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.1
validation layer: Instance Extension: VK_KHR_external_fence_capabilities (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.1
validation layer: Instance Extension: VK_KHR_external_memory_capabilities (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.1
validation layer: Instance Extension: VK_KHR_external_semaphore_capabilities (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.1
validation layer: Instance Extension: VK_KHR_get_physical_device_properties2 (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.2
validation layer: Instance Extension: VK_KHR_get_surface_capabilities2 (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.1
validation layer: Instance Extension: VK_KHR_surface (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.25
validation layer: Instance Extension: VK_KHR_surface_protected_capabilities (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.1
validation layer: Instance Extension: VK_KHR_win32_surface (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.6
validation layer: Instance Extension: VK_EXT_debug_report (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.9
validation layer: Instance Extension: VK_EXT_debug_utils (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.2
validation layer: Instance Extension: VK_EXT_swapchain_colorspace (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.4
validation layer: Instance Extension: VK_NV_external_memory_capabilities (C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll) version 0.0.1
validation layer: Unloading layer library C:\WINDOWS\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_60daf66a00f2e0b6\.\nvoglv64.dll
validation layer: Unloading layer library C:\ProgramData\obs-studio-hook\.\graphics-hook64.dll
validation layer: Unloading layer library D:\Games\lib\1.2.176.1\Bin\.\VkLayer_khronos_validation.dll

so why Rockestar Game? and why

invalid layer manifest file version 1.2.0. ?

EDIT: So I change the file location and I think it's working.

the final question is: loaderAddLayerProperties: D:\Games\lib\1.2.176.1\Bin\VkLayer_api_dump.json invalid layer manifest file version 1.2.0. May cause errors. why "May cause errors" and is it important?

And just for fun: why is it trying to load C:\Program Files\Rockstar Games\Social Club\SocialClubVulkanLayer.json? Is Rockstar in the development of Vulkan or anything?

Re edit: I re-uninstall/re-reinstall the sdk and ????? This time I'm 100% sure I did not move the file and it still try to load from \lib\1.2.176.1 and is skipping the \vulkan\ ???

tbh the first install of the sdk was there (without the \vulkan) and probably didn't work bcs I renamed a folder but why it kept the old path after re-install?

but anyway if I move it to match these directory it seems to work x)

I rerere-uninstall/reinstall the sdk in a totally different folder and guess what? sdk installed in D:\Prgm\1.2.176.1 when I run vulkaninfoSDK.exe : ERROR: [Loader Message] Code 0 : loader_get_json: Failed to open JSON file D:\Games\lib\1.2.176.1\Bin\VkLayer_api_dump.json

So I guess I'm stuck with the path of my first install

just for the joke:(yes I'm talkative) I rererere-uninstall/reinstall the sdk at its original location and now it try to load the file from D:\Games\lib\Vulkan\1.2.176.1\Bin\VkLayer_api_dump.json ? I probably messed-up with the installation but damn

In the Vulkan installation analysis tool I find duplicates. Idk why but it look at the previous and wrong directory first but the right directory is present

So I'm trying to remove unnecessary directory


Solution

  • The warnings are normal, as per SDK release notes. The Rockstar thing is some overlay or something that was uncleanly uninstalled (you could remove it in registry similar to below instructions if you want).

    You should check the value of %VULKAN_SDK% variable if it is correct.

    Then you should check HKLM\SOFTWARE\Khronos\Vulkan\ExplicitLayers and HKLM\SOFTWARE\WOW6432Node\Khronos\Vulkan\ExplicitLayers if it is correct and has no duplicates. (Alternatively you could uninstall first, and in that case there should be no SDK paths left in there)

    Also the configurator app allows overrides, so you need to check it is Tools->Reset, and set to "Fully controled by Vulkan apps". When closing it should warn that no Vulkan overrides are active, and you should click Yes.