Setup command pools for primary and secondary command buffers, Split recording into multiple secondary buffers

This commit is contained in:
2025-02-14 17:20:57 -05:00
parent 129524f8ca
commit bc326e2c79
37 changed files with 615 additions and 162 deletions

View File

@@ -117,13 +117,22 @@ namespace fgl::editor
gui::drawStats( info );
}
void EditorGuiContext::endDraw( vk::raii::CommandBuffer& command_buffer )
void EditorGuiContext::endDraw( CommandBuffer& command_buffer )
{
ZoneScoped;
ImGui::Render();
constexpr static std::string_view label { "IMGUI Rendering" };
vk::DebugUtilsLabelEXT debug_label;
debug_label.pLabelName = label.data();
command_buffer->beginDebugUtilsLabelEXT( debug_label );
ImDrawData* data { ImGui::GetDrawData() };
ImGui_ImplVulkan_RenderDrawData( data, *command_buffer );
ImGui_ImplVulkan_RenderDrawData( data, **command_buffer );
command_buffer->endDebugUtilsLabelEXT();
//ImGui::UpdatePlatformWindows();
//ImGui::RenderPlatformWindowsDefault();
@@ -131,6 +140,6 @@ namespace fgl::editor
void EditorGuiContext::endDraw( FrameInfo& info )
{
return endDraw( info.command_buffer );
return endDraw( info.command_buffer.imgui_cb );
}
} // namespace fgl::editor

View File

@@ -17,7 +17,7 @@ namespace fgl::editor
void beginDraw();
void draw( engine::FrameInfo& info );
void endDraw( vk::raii::CommandBuffer& command_buffer );
void endDraw( engine::CommandBuffer& command_buffer );
void endDraw( engine::FrameInfo& info );
};
} // namespace fgl::editor