I have basic Vulkan application, "Hello triangle",derived from this tutorial. In debug mode I use two validations layers:
VK_LAYER_KHRONOS_validation
and VK_LAYER_LUNARG_monitor
On Windows I got no problem. Both layers load, I can see FPS counter in the title bar. But I am experiencing different behaviour on Linux (Ubuntu 18.04).
Only VK_LAYER_LUNARG_monitor
loads. No FPS counter appears in the title bar.
VK_LAYER_KHRONOS_validation
fails to load with the error:
ERROR: libVkLayer_khronos_validation.so: cannot open shared object file: No such file or directory
I performed Linux setup according to the guidelines appearing in this LunarG doc.
- Put the whole LunarG SDK in an arbitrary location on my Linux filesystem.
- Sourced
setup-env.sh
into.profile
file - Inside the setup-env.sh script I also added
VK_LOADER_DEBUG=all
in order to see detailed info from Vulkan Loader. - Verified that all the variables set by the script point to correct directories in the SDK. They do.
setup-env.sh:
VULKAN_SDK="$(dirname "$(readlink -f "${BASH_SOURCE:-$_}" )" )/x86_64"
export VULKAN_SDK
PATH="$VULKAN_SDK/bin:$PATH"
export PATH
LD_LIBRARY_PATH="$VULKAN_SDK/lib:${LD_LIBRARY_PATH:-}"
export LD_LIBRARY_PATH
VK_LAYER_PATH="$VULKAN_SDK/etc/vulkan/explicit_layer.d"
export VK_LAYER_PATH
export VK_LOADER_DEBUG=all
Here is the chunk I am gettin from debug output that show the failure of loading the layers:
DEBUG: Loading layer library /home/platform-thirdparty/vulkan-sdk/1.1.121.1/x86_64/lib/libVkLayer_monitor.so INFO: Inserted device layer VK_LAYER_LUNARG_monitor (/home/platform-thirdparty/vulkan-sdk/1.1.121.1/x86_64/lib/libVkLayer_monitor.so) Message:libVkLayer_khronos_validation.so: cannot open shared object file: No such file or directory ERROR: libVkLayer_khronos_validation.so: cannot open shared object file: No such file or directory
Even though it says that
Inserted device layer VK_LAYER_LUNARG_monitor
The monitor doesn't work.
If I replace VK_LAYER_KHRONOS_validation
with VK_LAYER_LUNARG_standard_validation
I am getting the same load fail error.
The debugger also shows that the loader did find all the manifest files for all the layers in the SDK.
I have no clue what else can be a problem.
My system setup:
Ubuntu 18.04 64bit, Nvidia RTX 3000 Nvidia Drivers: 430.0 VulkanSDK(LunarG): 1.1.121.1
LD_LIBRARY_PATH
is ignored. What happens if you edit the full path to the *.so in the json file? – krOoze