mirror of
https://github.com/ocornut/imgui.git
synced 2025-10-02 16:18:33 +00:00
Backends: Vulkan: ImGui_ImplVulkan_CreatePipeline() for secondary viewport always use the RenderPass created by the ImGui_ImplVulkanH_CreateOrResizeWindow(). (#8946, #8110)
This commit is contained in:
@@ -1322,8 +1322,6 @@ bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info)
|
||||
IM_ASSERT(info->DescriptorPoolSize > 0);
|
||||
if (info->UseDynamicRendering)
|
||||
IM_ASSERT(info->PipelineInfoMain.RenderPass == VK_NULL_HANDLE && info->PipelineInfoForViewports.RenderPass == VK_NULL_HANDLE);
|
||||
else if (info->PipelineInfoForViewports.RenderPass == NULL)
|
||||
info->PipelineInfoForViewports.RenderPass = info->PipelineInfoMain.RenderPass;
|
||||
|
||||
bd->VulkanInitInfo = *info;
|
||||
|
||||
@@ -2014,7 +2012,7 @@ static void ImGui_ImplVulkan_CreateWindow(ImGuiViewport* viewport)
|
||||
}
|
||||
else
|
||||
{
|
||||
IM_ASSERT(pipeline_info->RenderPass != VK_NULL_HANDLE && "Did you set ImGui_ImplVulkan_InitInfo::PipelineInfoForViewports.RenderPass?"); // Since 1.92.4 it is required.
|
||||
pipeline_info->RenderPass = wd->RenderPass;
|
||||
}
|
||||
#endif
|
||||
bd->PipelineForViewports = ImGui_ImplVulkan_CreatePipeline(v->Device, v->Allocator, VK_NULL_HANDLE, &v->PipelineInfoForViewports);
|
||||
|
@@ -69,8 +69,10 @@
|
||||
// Specify settings to create pipeline and swapchain
|
||||
struct ImGui_ImplVulkan_PipelineInfo
|
||||
{
|
||||
// For Main and Secondary viewports
|
||||
// For Main viewport only
|
||||
VkRenderPass RenderPass; // Ignored if using dynamic rendering
|
||||
|
||||
// For Main and Secondary viewports
|
||||
uint32_t Subpass; //
|
||||
VkSampleCountFlagBits MSAASamples = {}; // 0 defaults to VK_SAMPLE_COUNT_1_BIT
|
||||
#ifdef IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING
|
||||
|
Reference in New Issue
Block a user