Vulkan run error
Describe the bug run hellopbr demo in VS 2019 then exception
To Reproduce Steps to reproduce the behavior:
- FILAMENT_SUPPORTS_VULKAN=ON
- run hellopbr in vs2019
Expected behavior hellopbr demo running fine
Screenshots If applicable, add screenshots to help explain your problem.
Logs FEngine (64 bits) created at 000002ABDFF24080 (threading is enabled) FEngine resolved backend: Vulkan Vulkan device driver: NVIDIA 456.71 Selected physical device 'GeForce GTX 1650' from 2 physical devices. (vendor 0x10de, device 0x1f82, driver 0x7211c000, api 1.2) Sampleable depth formats: VK_FORMAT_D16_UNORM VK_FORMAT_X8_D24_UNORM_PACK32 VK_FORMAT_D32_SFLOAT VK_FORMAT_S8_UINT VK_FORMAT_D24_UNORM_S8_UINT VK_FORMAT_D32_SFLOAT_S8_UINT vkCreateSwapchain: 1024x640, VK_FORMAT_B8G8R8A8_UNORM, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, 3, VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR VULKAN ERROR: (UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout) Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout ] Object 0: handle = 0x2abe6e88bb8, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x4dae5635 | vkQueueSubmit(): pSubmits[0].pCommandBuffers[0] command buffer VkCommandBuffer 0x2abe6e88bb8[] expects VkImage 0xa43473000000002d[] (subresource: aspectMask 0x1 array layer 0, mip level 0) to be in layout VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL--instead, current layout is VK_IMAGE_LAYOUT_UNDEFINED.
D:\codebase\github\filament\out\samples\Debug\hellopbr.exe (进程 23540)已退出,代码为 -1。
Desktop (please complete the following information):
- OS: [win10]
- GPU: [e.g. NVIDIA GTX 1650]
- Backend: [Vulkan]
Smartphone (please complete the following information):
- Device: [e.g. Pixel 2]
- OS: [e.g. Android Pie 9.0]
Additional context callstack: exception at vkQueueSubmit hellopbr.exe!utils::debug_trap() 行 36 C++ hellopbr.exe!`anonymous namespace'::debugUtilsCallback(VkDebugUtilsMessageSeverityFlagBitsEXT severity, unsigned int types, const VkDebugUtilsMessengerCallbackDataEXT * cbdata, void * pUserData) 行 71 C++ VkLayer_khronos_validation.dll!debug_log_msg(const _debug_report_data * debug_data, unsigned int msg_flags, const LogObjectList & objects, const char * layer_prefix, const char * message, const char * text_vuid) 行 475 C++ VkLayer_khronos_validation.dll!LogMsgLocked(const _debug_report_data * debug_data, unsigned int msg_flags, const LogObjectList & objects, const std::string & vuid_text, char * err_msg) 行 735 C++ VkLayer_khronos_validation.dll!ValidationObject::LogError<VkCommandBuffer_T * __ptr64>(VkCommandBuffer_T * src_object, const std::string & vuid_text, const char * format, ...) 行 3413 C++ VkLayer_khronos_validation.dll!CoreChecks::ValidateCmdBufImageLayouts(const core_error::Location & loc, const CMD_BUFFER_STATE * pCB, const robin_hood::detail::Table<0,80,IMAGE_STATE const *,layer_data::optional<subresource_adapter::BothRangeMap<enum VkImageLayout,16>>,robin_hood::hash<IMAGE_STATE const *,void>,std::equal_to<IMAGE_STATE const *>> & globalImageLayoutMap, robin_hood::detail::Table<0,80,IMAGE_STATE const *,layer_data::optional<subresource_adapter::BothRangeMap<enum VkImageLayout,16>>,robin_hood::hash<IMAGE_STATE const *,void>,std::equal_to<IMAGE_STATE const *>> & overlayLayoutMap) 行 4346 C++ VkLayer_khronos_validation.dll!CommandBufferSubmitState::Validate(const core_error::Location & loc, VkCommandBuffer_T * cmd, unsigned int perf_pass) 行 3538 C++ VkLayer_khronos_validation.dll!CoreChecks::PreCallValidateQueueSubmit(VkQueue_T * queue, unsigned int submitCount, const VkSubmitInfo * pSubmits, VkFence_T * fence) 行 3613 C++ VkLayer_khronos_validation.dll!vulkan_layer_chassis::QueueSubmit(VkQueue_T * queue, unsigned int submitCount, const VkSubmitInfo * pSubmits, VkFence_T * fence) 行 1139 C++
hellopbr.exe!filament::backend::VulkanCommands::flush() 行 197 C++ hellopbr.exe!filament::backend::VulkanDriver::flush(int __formal) 行 394 C++ hellopbr.exe!filament::backend::invoke<filament::backend::VulkanDriver,void __cdecl(int),filament::backend::VulkanDriver &,int>(void(filament::backend::VulkanDriver::)(int) m, filament::backend::VulkanDriver & d, int && <args_0>) 行 118 C++ hellopbr.exe!filament::backend::trampoline<void (__cdecl filament::backend::VulkanDriver::)(int),filament::backend::VulkanDriver &,std::tuple
,0>(void(filament::backend::VulkanDriver::)(int) && m, filament::backend::VulkanDriver & d, std::tuple && t, std::integer_sequence<unsigned __int64,0> __formal) 行 123 C++ hellopbr.exe!filament::backend::apply<void (__cdecl filament::backend::VulkanDriver:: )(int),filament::backend::VulkanDriver &,std::tuple>(void(filament::backend::VulkanDriver::)(int) && m, filament::backend::VulkanDriver & d, std::tuple && t) 行 129 C++ hellopbr.exe!filament::backend::CommandType<void (__cdecl filament::backend::Driver:: )(int)>::Command<&filament::backend::Driver::flush>::execute<void (__cdecl filament::backend::VulkanDriver::)(int),filament::backend::VulkanDriver &>(void(filament::backend::VulkanDriver::)(int) && method, filament::backend::VulkanDriver & driver, filament::backend::CommandBase * base, __int64 * next) 行 167 C++ hellopbr.exe!filament::backend::ConcreteDispatcherfilament::backend::VulkanDriver::flush(filament::backend::Driver & driver, filament::backend::CommandBase * base, __int64 * next) 行 156 C++ hellopbr.exe!filament::backend::CommandBase::execute(filament::backend::Driver & driver) 行 102 C++ hellopbr.exe!filament::backend::CommandStream::execute'::2'::<lambda_1>::operator()() 行 91 C++
Looks like a duplicate of issue #4768.
Issue fixed after meger#4768
Duplicate of issue #4768.