MayaFlux 0.3.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ free_command_buffer()

void MayaFlux::Core::VKCommandManager::free_command_buffer ( vk::CommandBuffer  command_buffer)

Free a command buffer back to the pool.

Definition at line 96 of file VKCommandManager.cpp.

97{
98 if (!command_buffer) {
99 return;
100 }
101
102 auto it = std::ranges::find(m_allocated_buffers, command_buffer);
103 if (it != m_allocated_buffers.end()) {
104 m_device.freeCommandBuffers(m_command_pool, 1, &command_buffer);
105 m_allocated_buffers.erase(it);
106 }
107
108 auto it2 = std::ranges::find(m_compute_allocated_buffers, command_buffer);
109 if (it2 != m_compute_allocated_buffers.end()) {
110 m_device.freeCommandBuffers(m_compute_command_pool, 1, &command_buffer);
112 }
113}
std::vector< vk::CommandBuffer > m_compute_allocated_buffers
std::vector< vk::CommandBuffer > m_allocated_buffers

References m_allocated_buffers, m_command_pool, m_compute_allocated_buffers, m_compute_command_pool, and m_device.

Referenced by end_single_time_commands().

+ Here is the caller graph for this function: