Skip to content

Troubleshooting

LKostyra edited this page Aug 16, 2016 · 2 revisions

Troubleshooting

Following document gathers all known issues and problems that might happen when setting up the project and provides information on how to solve them.

nfRendererVk

Enabling debugging in Vulkan returns ERROR_LAYER_NOT_PRESENT error during Instance initialization

Vulkan Renderer makes use of LunarG Validation Layers in order to implement debugging support. First of all, make sure that their Vulkan SDK is installed on your system.

If LunarG's Vulkan SDK is installed, make sure their debugging layers are present on the system by launching vulkaninfo tool (should be installed together with Vulkan SDK and visible). It should return an output similar to this:

===========
VULKAN INFO
===========

Vulkan API Version: 1.0.21

INFO: [loader] Code 0 : Found manifest file F:\VulkanSDK\1.0.21.1\Bin\VkLayer_api_dump.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file F:\VulkanSDK\1.0.21.1\Bin\VkLayer_core_validation.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file F:\VulkanSDK\1.0.21.1\Bin\VkLayer_image.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file F:\VulkanSDK\1.0.21.1\Bin\VkLayer_object_tracker.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file F:\VulkanSDK\1.0.21.1\Bin\VkLayer_parameter_validation.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file F:\VulkanSDK\1.0.21.1\Bin\VkLayer_screenshot.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file F:\VulkanSDK\1.0.21.1\Bin\VkLayer_swapchain.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file F:\VulkanSDK\1.0.21.1\Bin\VkLayer_threading.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file F:\VulkanSDK\1.0.21.1\Bin\VkLayer_unique_objects.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file F:\VulkanSDK\1.0.21.1\Bin\VkLayer_vktrace_layer.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file C:\WINDOWS\system32\nv-vk64.json, version "1.0.0"

...

Instance Extensions:
====================
Instance Extensions     count = 3
        VK_KHR_surface                      : extension revision 25
        VK_KHR_win32_surface                : extension revision  5
        VK_EXT_debug_report                 : extension revision  2


Layers: count = 14
=======
VK_LAYER_LUNARG_api_dump (LunarG debug layer) Vulkan version 1.0.21, layer version 1
...
VK_LAYER_LUNARG_core_validation (LunarG Validation Layer) Vulkan version 1.0.21, layer version 1
...
VK_LAYER_LUNARG_image (LunarG Validation Layer) Vulkan version 1.0.21, layer version 1
...
VK_LAYER_LUNARG_object_tracker (LunarG Validation Layer) Vulkan version 1.0.21, layer version 1
...
VK_LAYER_LUNARG_parameter_validation (LunarG Validation Layer) Vulkan version 1.0.21, layer version 1
...
VK_LAYER_LUNARG_screenshot (LunarG image capture layer) Vulkan version 1.0.21, layer version 1
...
VK_LAYER_LUNARG_swapchain (LunarG Validation Layer) Vulkan version 1.0.21, layer version 1
...
VK_LAYER_GOOGLE_threading (Google Validation Layer) Vulkan version 1.0.21, layer version 1
...
VK_LAYER_GOOGLE_unique_objects (Google Validation Layer) Vulkan version 1.0.21, layer version 1
...
VK_LAYER_LUNARG_vktrace (Vktrace tracing library) Vulkan version 1.0.21, layer version 1
...
VK_LAYER_LUNARG_standard_validation (LunarG Standard Validation Layer) Vulkan version 1.0.21, layer version 1
...

The most important entries here are the ones beginning with VK_LAYER_LUNARG and having validation inside their names. These should automatically come up after installing Vulkan SDK.

If Vulkan SDK installation does not make VK_LAYER_LUNARG layers available, probably the installator failed to add required entries to your Windows registry and Vulkan Runtime Library fails to discover them. In such situation, you need to add the entries manually.

Launch registry editor (Menu Start -> Launch -> regedit) and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ExplicitLayers. If there is no ExplicitLayers key on this path, create one. Inside, add DWORD values with paths to .json files provided by Vulkan SDK. The list of the files, up-to-date with Vulkan SDK 1.0.21, goes as follows ( $(VK_SDK_PATH) should be replaced with a path to your Vulkan SDK installation):

$(VK_SDK_PATH)\Bin\VkLayer_api_dump.json
$(VK_SDK_PATH)\Bin\VkLayer_core_validation.json
$(VK_SDK_PATH)\Bin\VkLayer_image.json
$(VK_SDK_PATH)\Bin\VkLayer_object_tracker.json
$(VK_SDK_PATH)\Bin\VkLayer_parameter_validation.json
$(VK_SDK_PATH)\Bin\VkLayer_screenshot.json
$(VK_SDK_PATH)\Bin\VkLayer_swapchain.json
$(VK_SDK_PATH)\Bin\VkLayer_threading.json
$(VK_SDK_PATH)\Bin\VkLayer_unique_objects.json
$(VK_SDK_PATH)\Bin\VkLayer_vktrace_layer.json

After updating the Registry it should look a little something like this: Vulkan registry entries

Shut down the registry editor and relaunch vulkaninfo tool - the layers should be now visible and Vulkan Renderer should successfully launch, barfing loads of report messages every single frame.