1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Backends: Vulkan: Support for dynamic_rendering (#5446, #5037)

Co-authored-by: Caio Oliveira <cmarcelo@gmail.com>
Simplified for master branch.

# Conflicts:
#	backends/imgui_impl_vulkan.cpp
This commit is contained in:
sean 2022-02-19 20:15:58 +01:00 committed by ocornut
parent dcdb145713
commit 7812e836e4
2 changed files with 45 additions and 3 deletions

View file

@ -61,6 +61,8 @@ struct ImGui_ImplVulkan_InitInfo
VkSampleCountFlagBits MSAASamples; // >= VK_SAMPLE_COUNT_1_BIT (0 -> default to VK_SAMPLE_COUNT_1_BIT)
const VkAllocationCallbacks* Allocator;
void (*CheckVkResultFn)(VkResult err);
bool UseDynamicRendering; // Need to explicitly enable VK_KHR_dynamic_rendering extension to use this, even for Vulkan 1.3.
VkFormat ColorAttachmentFormat;
};
// Called by user code
@ -139,6 +141,7 @@ struct ImGui_ImplVulkanH_Window
VkPresentModeKHR PresentMode;
VkRenderPass RenderPass;
VkPipeline Pipeline; // The window pipeline may uses a different VkRenderPass than the one passed in ImGui_ImplVulkan_InitInfo
bool UseDynamicRendering;
bool ClearEnable;
VkClearValue ClearValue;
uint32_t FrameIndex; // Current frame being rendered to (0 <= FrameIndex < FrameInFlightCount)