Submit command buffer and wait for completion.
1047{
1050 return;
1051 }
1052
1053 auto& cmd_manager =
m_backend->get_command_manager();
1054
1055 it->second.cmd.end();
1056
1057 vk::SubmitInfo submit_info;
1058 submit_info.commandBufferCount = 1;
1059 submit_info.pCommandBuffers = &it->second.cmd;
1060
1061 vk::Queue queue;
1062 switch (it->second.type) {
1065 break;
1068 break;
1071 break;
1072 }
1073
1074 if (queue.submit(1, &submit_info, nullptr) != vk::Result::eSuccess) {
1076 "Failed to submit command buffer");
1077 return;
1078 }
1079 queue.waitIdle();
1080
1081 if (it->second.timestamp_pool) {
1082 for (const auto& query : it->second.timestamp_queries) {
1084 }
1085
1086 get_device().destroyQueryPool(it->second.timestamp_pool);
1087 it->second.timestamp_pool = nullptr;
1088 }
1089
1090 cmd_manager.free_command_buffer(it->second.cmd);
1091
1092 it->second.is_active = false;
1094}
#define MF_ERROR(comp, ctx,...)
TimestampResult resolve_timestamp(const CommandBufferState &state, const std::string &label, bool wait)
vk::Device get_device() const
Get logical device handle.
vk::Queue m_transfer_queue
Memory::HistoryBuffer< FinishedTimestamp > m_finished_timestamps
vk::Queue m_graphics_queue
std::unordered_map< CommandBufferID, CommandBufferState > m_command_buffers
vk::Queue m_compute_queue
std::shared_ptr< Core::VulkanBackend > m_backend
@ ShaderCompilation
Shader compilation tasks (Portal::Graphics::ShaderCompiler)
@ Portal
High-level user-facing API layer.