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

◆ allocate_command_buffer()

vk::CommandBuffer MayaFlux::Core::VKCommandManager::allocate_command_buffer ( )

Allocate a command buffer from the pool.

Returns
Command buffer handle

Definition at line 48 of file VKCommandManager.cpp.

49{
50 vk::CommandBufferAllocateInfo alloc_info {};
51 alloc_info.commandPool = m_command_pool;
52 alloc_info.level = vk::CommandBufferLevel::ePrimary;
53 alloc_info.commandBufferCount = 1;
54
55 try {
56 auto buffers = m_device.allocateCommandBuffers(alloc_info);
57 m_allocated_buffers.push_back(buffers[0]);
58 return buffers[0];
59 } catch (const vk::SystemError& e) {
61 "Failed to allocate command buffer: {}", e.what());
62 return nullptr;
63 }
64}
#define MF_ERROR(comp, ctx,...)
std::vector< vk::CommandBuffer > m_allocated_buffers
@ GraphicsBackend
Graphics/visual rendering backend (Vulkan, OpenGL)
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, MayaFlux::Journal::GraphicsBackend, m_allocated_buffers, m_command_pool, m_device, and MF_ERROR.

Referenced by begin_single_time_commands().

+ Here is the caller graph for this function: