1

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 :

  • I'm compiling x64
  • I've uninstalled/reinstalled the sdk and it's still not working
  • The error message is : validation layers requested, but not available!
  • The sdk is the 1.2.176.1 from 05-May-2021. I downloaded the SDK Installer (.exe the first one)
  • To get available layer the code is:
uint32_t layerCount;
vkEnumerateInstanceLayerProperties(&layerCount, nullptr);
std::vector<VkLayerProperties> availableLayers(layerCount);
vkEnumerateInstanceLayerProperties(&layerCount, availableLayers.data());
  • If I skip the verification the error message is: (btw why Rockstar Game line 3??)
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!
  • I'm not a native English speaker nor a regular user of StackOverflow so if I made a mistake please tell me so I can progress

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

genpfault
  • 51,148
  • 11
  • 85
  • 139

2 Answers2

1

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.

krOoze
  • 12,301
  • 1
  • 20
  • 34
  • I still have the same issue, the `%VULKAN_SDK%` is correct, I uninstalled and reinstalled the sdk, reset it and select "Fully controled by Vulkan apps" but the layer are still not found and it keep looking in the wrong directory. Also I didn't find HKLM\software\... . The weirdest is that if I install it so the directory it's looking is right then it looks for the other one (the path for the previous install) – Dimethylebutane Jul 02 '21 at 17:13
  • @Dimethylebutane HKLM is in registry. Use `regedit`. – krOoze Jul 02 '21 at 17:23
  • Well I find duplicate, and another issue in the `Vulkan Installation Analysis` _(I edited my post with more information)_ – Dimethylebutane Jul 02 '21 at 17:25
  • ok so many duplicated (basically everything is duplicate), Should I delete wrong ones? – Dimethylebutane Jul 02 '21 at 17:29
  • @Dimethylebutane In that case I would recommend to uninstall, and then remove whatever is left, then reinstall. – krOoze Jul 02 '21 at 17:30
0

For the Rockstar problem, It seems that many game launchers install implicit layers for Vulkan. In my case It was a GOG layer causing the problem, but it seems that when you uninstall many of these programs, they do not remove their keys from the registry.

To fix the problem, check both

  • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ImplicitLayers

and

  • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ExplicitLayers

for a key that matches the .json that can not be found and delete it. The error should then stop.

I have that exact Rockstar key in the ExplicitLayers folder and found my GOG key in the ImplicitLayers folder.