Issue with recent version of Vulkan


#1

Hello,

I ran into a bug after updating Vulkan on my computer. Here is the log:

A fatal error occurred and the program has to terminate!
- Error: RenderingAPIException
- Description: ERROR: [Validation] Code 0: [ VUID-VkRenderPassCreateInfo-pDependencies-00838 ] Object: VK_NULL_HANDLE (Type = 0) | Dependency 0 specifies a destination stage mask that contains stages not in the GRAPHICS pipeline as used by the destination subpass 0. The Vulkan spec states: For any element of pDependencies, if the dstSubpass is not VK_SUBPASS_EXTERNAL, all stage flags included in the dstStageMask member of that dependency must be a pipeline stage supported by the pipeline identified by the pipelineBindPoint member of the source subpass (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkRenderPassCreateInfo-pDependencies-00838)

- In function: VkBool32 bs::ct::debugMsgCallback(VkDebugReportFlagsEXT, VkDebugReportObjectTypeEXT, uint64_t, size_t, int32_t, const char *, const char *, void *)
- In file: test/extern/bsf/Source/Plugins/bsfVulkanRenderAPI/BsVulkanRenderAPI.cpp:75

Stack trace:
0) test/build-debug/bin/libbsf.so.1: bs::CrashHandler::getStackTrace[abi:cxx11]()+0x59 [0x7f6d2bee66a9]
1) test/build-debug/bin/libbsf.so.1: bs::CrashHandler::logErrorAndStackTrace(std::__cxx11::basic_string, bs::StdAlloc > const&, std::__cxx11::basic_string, bs::StdAlloc > const&, std::__cxx11::basic_string, bs::StdAlloc > const&, std::__cxx11::basic_string, bs::StdAlloc > const&, unsigned int) const+0x227 [0x7f6d2beca8b7]
2) test/build-debug/bin/libbsf.so.1: bs::CrashHandler::reportCrash(std::__cxx11::basic_string, bs::StdAlloc > const&, std::__cxx11::basic_string, bs::StdAlloc > const&, std::__cxx11::basic_string, bs::StdAlloc > const&, std::__cxx11::basic_string, bs::StdAlloc > const&, unsigned int) const+0x4f [0x7f6d2bee622f]
3) libbsfVulkanRenderAPI.so: bs::ct::debugMsgCallback(unsigned int, VkDebugReportObjectTypeEXT, unsigned long, unsigned long, int, char const*, char const*, void*)+0x330 [0x7f6d26830ed0]
4) /usr/lib/libVkLayer_core_validation.so: +0x1e0be2 [0x7f6d1f9d5be2]
5) /usr/lib/libVkLayer_core_validation.so: +0x1e16af [0x7f6d1f9d66af]
6) /usr/lib/libVkLayer_core_validation.so: +0x21cb71 [0x7f6d1fa11b71]
7) /usr/lib/libVkLayer_core_validation.so: +0x243278 [0x7f6d1fa38278]
8) /usr/lib/libVkLayer_core_validation.so: +0x1bd744 [0x7f6d1f9b2744]
9) /usr/lib/libVkLayer_object_lifetimes.so: +0x1c076a [0x7f6d1f5e876a]
10) /usr/lib/libVkLayer_object_lifetimes.so: +0x126e39 [0x7f6d1f54ee39]
11) /usr/lib/libVkLayer_stateless_validation.so: +0x23894a [0x7f6d1f1f394a]
12) /usr/lib/libVkLayer_stateless_validation.so: +0x1b124a [0x7f6d1f16c24a]
13) /usr/lib/libVkLayer_thread_safety.so: +0x179f9a [0x7f6d1edc1f9a]
14) /usr/lib/libVkLayer_thread_safety.so: +0xe6305 [0x7f6d1ed2e305]
15) libbsfVulkanRenderAPI.so: bs::ct::VulkanFramebuffer::createVariant(bs::Flags, bs::Flags, bs::Flags) const+0x386 [0x7f6d26894726]
16) libbsfVulkanRenderAPI.so: bs::ct::VulkanFramebuffer::VulkanFramebuffer(bs::ct::VulkanResourceManager*, bs::ct::VULKAN_FRAMEBUFFER_DESC const&)+0x92d [0x7f6d2689432d]
17) libbsfVulkanRenderAPI.so: bs::ct::VulkanFramebuffer* bs::ct::VulkanResourceManager::create(bs::ct::VULKAN_FRAMEBUFFER_DESC&)+0x51 [0x7f6d26823471]
18) libbsfVulkanRenderAPI.so: bs::ct::VulkanSwapChain::VulkanSwapChain(bs::ct::VulkanResourceManager*, VkSurfaceKHR_T*, unsigned int, unsigned int, bool, VkFormat, VkColorSpaceKHR, bool, VkFormat, bs::ct::VulkanSwapChain*)+0xcb4 [0x7f6d26891d24]
19) libbsfVulkanRenderAPI.so: bs::ct::VulkanSwapChain* bs::ct::VulkanResourceManager::create(VkSurfaceKHR_T*&, unsigned int&, unsigned int&, bool&, VkFormat&, VkColorSpaceKHR&, bool&, VkFormat&)+0x168 [0x7f6d268ea028]
20) libbsfVulkanRenderAPI.so: bs::ct::LinuxRenderWindow::initialize()+0xa60 [0x7f6d268e5f40]
21) test/build-debug/bin/libbsf.so.1: void std::__invoke_impl(std::__invoke_memfun_deref, void (bs::ct::CoreObject::*&)(), bs::ct::CoreObject*&)+0x71 [0x7f6d2bf0fa31]
22) test/build-debug/bin/libbsf.so.1: std::__invoke_result::type std::__invoke(void (bs::ct::CoreObject::*&)(), bs::ct::CoreObject*&)+0x32 [0x7f6d2bf0f962]
23) test/build-debug/bin/libbsf.so.1: void std::_Bind::__call(std::tuple<>&&, std::_Index_tuple<0ul>)+0x50 [0x7f6d2bf0f900]
24) test/build-debug/bin/libbsf.so.1: void std::_Bind::operator()<, void>()+0x33 [0x7f6d2bf0f863]
25) test/build-debug/bin/libbsf.so.1: std::_Function_handler >::_M_invoke(std::_Any_data const&)+0x1d [0x7f6d2bf0f57d]
26) test/build-debug/bin/libEditorWindow-d.so.0: std::function::operator()() const+0x3e [0x7f6d2d2cf1fe]
27) test/build-debug/bin/libbsf.so.1: bs::CoreObject::executeGpuCommand(std::shared_ptr const&, std::function)+0x36 [0x7f6d2bf0bb46]
28) test/build-debug/bin/libbsf.so.1: void std::__invoke_impl const&, std::function), std::shared_ptr&, std::function&>(std::__invoke_other, void (*&)(std::shared_ptr const&, std::function), std::shared_ptr&, std::function&)+0x68 [0x7f6d2bf0e108]
29) test/build-debug/bin/libbsf.so.1: std::__invoke_result const&, std::function), std::shared_ptr&, std::function&>::type std::__invoke const&, std::function), std::shared_ptr&, std::function&>(void (*&)(std::shared_ptr const&, std::function), std::shared_ptr&, std::function&)+0x47 [0x7f6d2bf0dff7]
30) test/build-debug/bin/libbsf.so.1: void std::_Bind, std::function))(std::shared_ptr const&, std::function)>::__call(std::tuple<>&&, std::_Index_tuple<0ul, 1ul>)+0x75 [0x7f6d2bf0df85]
31) test/build-debug/bin/libbsf.so.1: void std::_Bind, std::function))(std::shared_ptr const&, std::function)>::operator()<, void>()+0x33 [0x7f6d2bf0dec3]
32) test/build-debug/bin/libbsf.so.1: std::_Function_handler, std::function))(std::shared_ptr const&, std::function)> >::_M_invoke(std::_Any_data const&)+0x1d [0x7f6d2bf0da1d]
33) test/build-debug/bin/libEditorWindow-d.so.0: std::function::operator()() const+0x3e [0x7f6d2d2cf1fe]
34) test/build-debug/bin/libbsf.so.1: bs::CommandQueueBase::playbackWithNotify(std::queue > >*, std::function)+0x416 [0x7f6d2bf03956]
35) test/build-debug/bin/libbsf.so.1: bs::CoreThread::runCoreThread()+0x2b3 [0x7f6d2bf26fa3]
36) test/build-debug/bin/libbsf.so.1: void std::__invoke_impl(std::__invoke_memfun_deref, void (bs::CoreThread::*&)(), bs::CoreThread*&)+0x71 [0x7f6d2bf2ad51]
37) test/build-debug/bin/libbsf.so.1: std::__invoke_result::type std::__invoke(void (bs::CoreThread::*&)(), bs::CoreThread*&)+0x32 [0x7f6d2bf2ac82]
38) test/build-debug/bin/libbsf.so.1: void std::_Bind::__call(std::tuple<>&&, std::_Index_tuple<0ul>)+0x50 [0x7f6d2bf2ac20]
39) test/build-debug/bin/libbsf.so.1: void std::_Bind::operator()<, void>()+0x33 [0x7f6d2bf2ab83]
40) test/build-debug/bin/libbsf.so.1: std::_Function_handler >::_M_invoke(std::_Any_data const&)+0x1d [0x7f6d2bf2a89d]
41) test/build-debug/bin/libEditorWindow-d.so.0: std::function::operator()() const+0x3e [0x7f6d2d2cf1fe]
42) test/build-debug/bin/libbsf.so.1: bs::PooledThread::run()+0x16b [0x7f6d2be3741b]
43) test/build-debug/bin/libbsf.so.1: void std::__invoke_impl(std::__invoke_memfun_deref, void (bs::PooledThread::*&)(), bs::PooledThread*&)+0x71 [0x7f6d2be39ca1]
44) test/build-debug/bin/libbsf.so.1: std::__invoke_result::type std::__invoke(void (bs::PooledThread::*&)(), bs::PooledThread*&)+0x32 [0x7f6d2be39bd2]
45) test/build-debug/bin/libbsf.so.1: void std::_Bind::__call(std::tuple<>&&, std::_Index_tuple<0ul>)+0x50 [0x7f6d2be39b70]
46) test/build-debug/bin/libbsf.so.1: void std::_Bind::operator()<, void>()+0x33 [0x7f6d2be39af3]
47) test/build-debug/bin/libbsf.so.1: void std::__invoke_impl>(std::__invoke_other, std::_Bind&&)+0x1d [0x7f6d2be39aad]
48) test/build-debug/bin/libbsf.so.1: std::__invoke_result>::type std::__invoke>(std::_Bind&&)+0x1d [0x7f6d2be39a3d]
49) test/build-debug/bin/libbsf.so.1: _ZNSt6thread8_InvokerISt5tupleIJSt5_BindIFMN2bs12PooledThreadEFvvEPS4_EEEEE9_M_invokeIJLm0EEEEDTclsr3stdE8__invokespcl10_S_declvalIXT_EEEEESt12_Index_tupleIJXspT_EEE+0x25 [0x7f6d2be39a15]
50) test/build-debug/bin/libbsf.so.1: std::thread::_Invoker > >::operator()()+0x15 [0x7f6d2be399e5]
51) test/build-debug/bin/libbsf.so.1: std::thread::_State_impl > > >::_M_run()+0x19 [0x7f6d2be397c9]
52) /usr/lib/libstdc++.so.6: +0xbc063 [0x7f6d29935063]
53) /usr/lib/libpthread.so.0: +0x7a9d [0x7f6d294f1a9d]
54) /usr/lib/libc.so.6: clone+0x43 [0x7f6d29611b23]

Here are some info about the version of Vulkan I have on my machine:

Vulkan Instance Version: 1.1.101

Device Properties and Extensions :
==================================
GPU0
VkPhysicalDeviceProperties:
===========================
	apiVersion     = 0x40105f  (1.1.95)
	driverVersion  = 1754136576 (0x688e0000)
	vendorID       = 0x10de
	deviceID       = 0x1b82
	deviceType     = DISCRETE_GPU
	deviceName     = GeForce GTX 1070 Ti

Note that this issue does not appear when running the bsfExamples


#2

Thanks, I’ll probably upgrade to a more recent version before the next release. For now 1.1.85 is the latest supported version of the Vulkan SDK.

Note that this is just a validation error for debugging purposes only and shouldn’t occur in release mode.


#3

Yep that’s true, I could just deactivate this error while debugging.
Thanks for your time.