Overv / VulkanTutorial

Tutorial for the Vulkan graphics and compute API
https://vulkan-tutorial.com
Creative Commons Attribution Share Alike 4.0 International
3.15k stars 516 forks source link

Add `spirv-tools` package to 02_Development_environment.md #218

Closed jsgoller1 closed 3 years ago

jsgoller1 commented 3 years ago

When doing the validation layers tutorial, compiling and running the example produced the following error message:

validation layer: libSPIRV-Tools-opt.so: cannot open shared object file: No such file or directory  

and no other validation layer output. After some Googling, I discovered that installing spirv-tools fixes the above error message, and causes the expected validation layer messages to appear:

VUID-VkDebugUtilsMessengerCreateInfoEXT-flags-zerobitmask(ERROR / SPEC): msgNum: 0 - vkCreateDebugUtilsMessengerEXT: parameter pCreateInfo->flags must be 0. The Vulkan spec states: flags must be 0 (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkDebugUtilsMessengerCreateInfoEXT-flags-zerobitmask)
    Objects: 1
        [0] 0, type: 0, name: NULL
validation layer: OBJ ERROR : For VkInstance 0x563c653c9200[], VkDebugUtilsMessengerEXT 0x10000000001[] has not been destroyed. The Vulkan spec states: All child objects created using instance must have been destroyed prior to destroying instance (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyInstance-instance-00629)
validation layer: OBJ ERROR : For VkInstance 0x563c653c9200[], VkDebugUtilsMessengerEXT 0x10000000001[] has not been destroyed. The Vulkan spec states: All child objects created using instance must have been destroyed prior to destroying instance (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyInstance-instance-00629)

So this should be added to the Linux development environment setup instructions.

System info

(let me know if additional details are required)

Ubuntu 20.04.1 LTS, 64-bit

└─ $ ▶ uname -a 
Linux considerable-shouting 5.4.0-53-generic #59-Ubuntu SMP Wed Oct 21 09:38:44 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

└─ $ ▶ apt list --installed | grep vulkan
libvulkan-dev/focal,now 1.2.131.2-1 amd64 [installed]
libvulkan1/focal,now 1.2.131.2-1 amd64 [installed,automatic]
mesa-vulkan-drivers/focal-updates,now 20.0.8-0ubuntu1~20.04.1 amd64 [installed,automatic]
vulkan-tools/focal,now 1.2.131.1+dfsg1-1 amd64 [installed]
vulkan-validationlayers-dev/focal,now 1.2.131.2-1 amd64 [installed]
vulkan-validationlayers/focal,now 1.2.131.2-1 amd64 [installed,automatic]
maltekliemann commented 3 years ago

Slightly off-topic: Instead of installing all packages by hand, shouldn't Linux users download the LunarG Vulkan SDK and follow these instructions: Getting Started with the Linux Tarball Vulkan SDK, just like Windows and macOS users?

Overv commented 3 years ago

@maltekliemann Wouldn't it depend on how users want to manage their SDK? Some might prefer to have the system update the SDK for them.

maltekliemann commented 3 years ago

@Overv Of course. "Instead of installing all packages by hand, shouldn't Linux users [...]" was badly worded.

My thinking was that the SDK would be easier to handle than installing all the moving parts via the package manager. In particular, you can apply bug fixed fairly easily.

By the way, I tried using homebrew to install a Vulkan SDK on macOS - no luck! Latest MoltenVK version is 1.0.41.