nvpro-samples / vk_raytracing_tutorial_KHR

Ray tracing examples and tutorials using VK_KHR_ray_tracing
Apache License 2.0
1.34k stars 142 forks source link

Error with Validating layers #27

Closed Compiler closed 3 years ago

Compiler commented 3 years ago

After following this link https://nvpro-samples.github.io/vk_raytracing_tutorial_KHR/ I get these errors:


Vulkan Version:
 - available:  1.2.141
 - requesting: 1.2.0
___________________________
Available Instance Layers :
VK_LAYER_NV_optimus (v. 1.2.142 1) : NVIDIA Optimus layer
VK_LAYER_VALVE_steam_overlay (v. 1.2.136 1) : Steam Overlay Layer
VK_LAYER_VALVE_steam_fossilize (v. 1.2.136 1) : Steam Pipeline Caching Layer
VK_LAYER_OBS_HOOK (v. 1.2.131 1) : Open Broadcaster Software hook
VK_LAYER_OBS_HOOK (v. 1.2.131 1) : Open Broadcaster Software hook
VK_LAYER_EOS_Overlay (v. 1.2.136 1) : Vulkan overlay layer for Epic Online Services
VK_LAYER_EOS_Overlay (v. 1.2.136 1) : Vulkan overlay layer for Epic Online Services
VK_LAYER_NV_nsight-sys (v. 1.1.97 2) : NVIDIA Nsight Systems profiler layer
VK_LAYER_LUNARG_gfxreconstruct (v. 1.2.162 9005) : GFXReconstruct Capture Layer Version 0.9.5

Available Instance Extensions :
VK_KHR_device_group_creation (v. 1)
VK_KHR_external_fence_capabilities (v. 1)
VK_KHR_external_memory_capabilities (v. 1)
VK_KHR_external_semaphore_capabilities (v. 1)
VK_KHR_get_physical_device_properties2 (v. 2)
VK_KHR_get_surface_capabilities2 (v. 1)
VK_KHR_surface (v. 25)
VK_KHR_surface_protected_capabilities (v. 1)
VK_KHR_win32_surface (v. 6)
VK_EXT_debug_report (v. 9)
VK_EXT_debug_utils (v. 2)
VK_EXT_swapchain_colorspace (v. 4)
VK_NV_external_memory_capabilities (v. 1)
______________________
Used Instance Layers :
VK_LAYER_KHRONOS_validation
VK_LAYER_LUNARG_monitor

Used Instance Extensions :
VK_EXT_debug_utils
VK_EXT_debug_utils
VK_KHR_surface
VK_KHR_win32_surface
VK_KHR_get_physical_device_properties2
C:\Users\Work\Documents\VulkanRTXTut\shared_sources\nvvk\context_vk.cpp(305): Vulkan Error : VK_ERROR_LAYER_NOT_PRESENT
Assertion failed: !"Critical Vulkan Error", file C:\Users\Work\Documents\VulkanRTXTut\shared_sources\nvvk\error_vk.cpp, line 119```
mklefrancois commented 3 years ago

Hi, first you need the latest Vulkan SDK. As mentioned in the setup, the SDK version must be 1.2.161 and up and the log show that only 1.2.141 is available. As for the missing layer, in debug, the sample uses the validation layer, and I don’t see it mentioned in the list of available layers. Could you please check your installation of Vulkan SDK?

Compiler commented 3 years ago

I have installed 1.2.162.1 and the output is exactly the same: it says Vulkan Version:

I know it is linking to the right sdk because this is the input section of the linker image

Maybe I am missing something?

NBickford-NV commented 3 years ago

Hi Luke! Is it possible that https://github.com/nvpro-samples/vk_mini_path_tracer/issues/8 might be what you're running into? It's not quite the same thing (your system shows 1.2.141 while theirs showed 1.2.162), but you can see if the fix at https://github.com/nvpro-samples/vk_mini_path_tracer/issues/8#issuecomment-754170995 fixes it - what's going on is that sometimes old Vulkan SDK installations don't remove their old registry keys (which Vulkan looks at when deciding which layers to load).

Compiler commented 3 years ago

Wow, this is exactly what was happening. I was so convinced the code was faulty but this makes perfect sense. Thank you so much for your answer.