Vulkan-hpp m_dispatcher->getVkHeaderVersion() != VK_HEADER_VERSION

226 views Asked by At

i'm trying to use vulkan raii and create an Instance (and in fact instantiation a vk::raii::Context)

i got this error

/usr/include/vulkan/vulkan_raii.hpp:2660: const vk::raii::ContextDispatcher* vk::raii::Context::getDispatcher() const: Assertion `m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION' failed.

i've installed vulkan sdk with https://vulkan.lunarg.com/doc/view/latest/linux/getting_started_ubuntu.html

both version of libvulkan and vulkan headers etc are 1.3.261 The build us with CMake and i use FindVulkan

I updated vulkan-sdk and tried to use headers from vcpkg but didn't work App exits with SIGABRT right away

1

There are 1 answers

0
Wusiki Jeronii On

I have had 2 cases with this error:

  1. When updating packages (from MSYS2 repositories). Then the full deletion of the build folder and a complete rebuild of the project helped me.
  2. It was actually another mistake. Just when I joined my app to the GDB, this error was written. I added a breakpoint, and the first thing I saw was a very large number, which is definitely not the version of the headers. Checked without gdb. It turned out that m_valid returned false. So you need to check if the Vulkan library is initialized correctly.