You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version: 1.8 (18000)
Branch: docking Commit: bb26751(master/viewport/docking/etc.)
No other modifications were made
My Issue/Question:
When resizing viewports will cause Vulkan to crash. My speculation is that ImGui viewport does not recreate the swapchain/framebuffer/renderpass etc. when resizing. To my knowledge, by checking issues both open and closed, this is the first issue report. Let me know if you need anything else. I am willing to help.
GDB backtrace:
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff7807859 in __GI_abort () at abort.c:79
#2 0x00005555555f9593 in Sudo::check_vk_result (err=VK_ERROR_OUT_OF_DATE_KHR) at ../src/vulkan/VulkanImGui.cpp:14
#3 0x000055555573d528 in check_vk_result (err=VK_ERROR_OUT_OF_DATE_KHR) at ../vendor/imgui/backends/imgui_impl_vulkan.cpp:253
#4 0x0000555555742308 in ImGui_ImplVulkan_SwapBuffers (viewport=0x5555563dac50) at ../vendor/imgui/backends/imgui_impl_vulkan.cpp:1521
#5 0x00005555556d74a1 in ImGui::RenderPlatformWindowsDefault (platform_render_arg=0x0, renderer_render_arg=0x0) at ../vendor/imgui/imgui.cpp:11837
#6 0x00005555555fa8d1 in Sudo::VulkanImGui::end (this=0x555556318d00) at ../src/vulkan/VulkanImGui.cpp:154
#7 0x00005555555c952d in SandboxApplication::render (this=0x5555558da780) at ../sandbox/SandboxApplication.cpp:49
#8 0x00005555555d99ad in Sudo::Application::run (this=0x5555558da780) at ../src/Application.cpp:16
#9 0x00005555555d9458 in main (argc=1, argv=0x7fffffffdef8) at ../sandbox/main.cpp:9
Screenshots/Video
2021-01-26.08-43-31.mp4
Standalone, minimal, complete and verifiable example:(see #2261)
// Here's some code anyone can copy and paste to reproduce your issue//Create ContextImGui::CreateContext();
ImGuiIO&io= ::ImGui::GetIO(); (void)io;
ImGui::StyleColorsDark();
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable;
ImGui_ImplGlfw_InitForVulkan(window, true);
//Attach to your vulkan instanceImGui_ImplVulkan_InitInfoinit_info= {};
init_info.Instance=vulkan->getVulkanInstance(); //Vulkan Instanceinit_info.PhysicalDevice=vulkan->getDevice()->getPhysicalDevice(); //Vulkan Physical Deviceinit_info.Device=vulkan->getDevice()->getDevice(); // Vulkan Logical Deviceinit_info.QueueFamily=vulkan->getDevice()->getQueueFamily().graphics.value(); //Vulkan QueueFamilyinit_info.Queue=vulkan->getDevice()->getGraphicsQueue(); //Vulkan QUeueinit_info.PipelineCache=nullptr; // Pipeline Cache init_info.DescriptorPool=_imguiDescriptorPool; // Descritptor Poolinit_info.Allocator=nullptr;
init_info.MinImageCount=2; // Minimage count Swapchaininit_info.ImageCount=vulkan->getSwapchain()->getImageCount(); // Image Count Swapchaininit_info.CheckVkResultFn=check_vk_result; // CheckImGui_ImplVulkan_Init(&init_info, _imguiRenderPass); // Need to get our renderpass//Starting FramesImGui_ImplVulkan_NewFrame();
ImGui_ImplGlfw_NewFrame();
ImGui::NewFrame();
ImGui::ShowDemoWindow();
ImGuiIO&io= ::ImGui::GetIO();
ImGui::Render();
if (io.ConfigFlags&ImGuiConfigFlags_ViewportsEnable){
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
}
//record your vulkan command buffers and submitting
Configuration
Version/Branch of Dear ImGui:
Version: 1.8 (18000)
Branch: docking Commit: bb26751 (master/viewport/docking/etc.)
No other modifications were made
My Issue/Question:
When resizing viewports will cause Vulkan to crash. My speculation is that ImGui viewport does not recreate the swapchain/framebuffer/renderpass etc. when resizing. To my knowledge, by checking issues both open and closed, this is the first issue report. Let me know if you need anything else. I am willing to help.
GDB backtrace:
Screenshots/Video
2021-01-26.08-43-31.mp4
Standalone, minimal, complete and verifiable example: (see #2261)