Vulkan, Viewports: Fix for resizing viewport windows crashing. (#2472)

This commit is contained in:
MindSpunk
2019-04-05 15:50:21 +11:00
committed by omar
parent 0034e65c26
commit a45840746e
4 changed files with 43 additions and 16 deletions

View File

@ -101,14 +101,18 @@ struct ImGui_ImplVulkanH_Frame
VkCommandPool CommandPool;
VkCommandBuffer CommandBuffer;
VkFence Fence;
VkSemaphore ImageAcquiredSemaphore;
VkSemaphore RenderCompleteSemaphore;
VkImage Backbuffer;
VkImageView BackbufferView;
VkFramebuffer Framebuffer;
ImGui_ImplVulkan_FrameRenderBuffers RenderBuffers;
};
struct ImGui_ImplVulkanH_FrameSemaphores
{
VkSemaphore ImageAcquiredSemaphore;
VkSemaphore RenderCompleteSemaphore;
};
// Helper structure to hold the data needed by one rendering context into one OS window
// (Used by example's main.cpp. Used by multi-viewport features. Probably NOT used by your own engine/app.)
struct ImGui_ImplVulkanH_Window
@ -124,7 +128,10 @@ struct ImGui_ImplVulkanH_Window
VkClearValue ClearValue;
uint32_t FrameIndex; // Current frame being rendered to (0 <= FrameIndex < FrameInFlightCount)
uint32_t FramesQueueSize; // Number of simultaneous in-flight frames (returned by vkGetSwapchainImagesKHR, usually derived from min_image_count)
uint32_t SemaphoreIndex; // Current set of swapchain wait semaphores we're using (needs to be distinct from per frame data)
ImGui_ImplVulkanH_Frame* Frames;
ImGui_ImplVulkanH_FrameSemaphores* FrameSemaphores;
ImGui_ImplVulkanH_Window()
{