pub unsafe fn allocate_command_buffer(
        &self,
        logical_device: &ash::Device,
    ) -> Result<vk::CommandBuffer> {
        let create_info = vk::CommandBufferAllocateInfo {
            command_pool: self.command_pool,
            level: vk::CommandBufferLevel::PRIMARY,
            command_buffer_count: 1,
            ..Default::default()
        };
        let command_buffer = logical_device
            .allocate_command_buffers(&create_info)
            .context("unable to allocate command buffer")?;
        Ok(command_buffer[0])
    }
/// Allocate a new command buffer.
///
/// # Unsafe Because
///
/// - the caller must eventually call [Self::reset] or else resources will
///   be leaked
Allocate a new command buffer.
Allocate a new command buffer .
pub unsafe fn allocate_command_buffer(
        &self,
        logical_device: &ash::Device,
    ) -> Result<vk::CommandBuffer> {
        let create_info = vk::CommandBufferAllocateInfo {
            command_pool: self.command_pool,
            level: vk::CommandBufferLevel::PRIMARY,
            command_buffer_count: 1,
            ..Default::default()
        };
        let command_buffer = logical_device
            .allocate_command_buffers(&create_info)
            .context("unable to allocate command buffer")?;
        Ok(command_buffer[0])
    }
pub unsafe fn allocate_command_buffer ( & self , logical_device : & ash :: Device , ) -> Result < vk :: CommandBuffer > { let create_info = vk :: CommandBufferAllocateInfo { command_pool : self . command_pool , level : vk :: CommandBufferLevel :: PRIMARY , command_buffer_count : 1 , .. Default :: default ( ) } ; let command_buffer = logical_device . allocate_command_buffers ( & create_info ) . context ( " " ) ? ; Ok ( command_buffer [ 0 ] ) }
Allocate a new command buffer.
Allocate a new command buffer .
&self
logical_device
&ash::Device
unsafe because
the caller must eventually call [Self::reset] or else resources will
be leaked
the caller must eventually call [ Self :: reset ] or else resources will be leaked