fn create_primary_command_pools(
    queue_family_indices: &QueueFamilyIndices, logical_device: &Device,
  ) -> SarektResult<(vk::CommandPool, vk::CommandPool)> {
    info!("Command Queues Selected: {:?}", queue_family_indices);

    let gfx_pool_ci = vk::CommandPoolCreateInfo::builder()
      .queue_family_index(queue_family_indices.graphics_queue_family.unwrap())
      .flags(vk::CommandPoolCreateFlags::RESET_COMMAND_BUFFER) // TODO(issue#26) PERFORMANCE create one command pool for each framebuffer to allow resetting individually at the pool level?
      .build();

    let gfx_pool = unsafe { logical_device.create_command_pool(&gfx_pool_ci, None)? };

    let transfer_pool =
      if queue_family_indices.graphics_queue_family == queue_family_indices.transfer_queue_family {
        gfx_pool
      } else {
        let transfer_pool_ci = vk::CommandPoolCreateInfo::builder()
          .queue_family_index(queue_family_indices.transfer_queue_family.unwrap())
          .flags(vk::CommandPoolCreateFlags::RESET_COMMAND_BUFFER)
          .build();
        unsafe { logical_device.create_command_pool(&transfer_pool_ci, None)? }
      };

    Ok((gfx_pool, transfer_pool))
  }
// ================================================================================
//  Command & Descriptor Pool/Buffer Methods
// ================================================================================
/// Creates all command pools needed for drawing and presentation on one
/// thread.
///
/// return is (gfx command pool, transfer command pool).
///
/// May be expanded in the future (compute etc).
Command & Descriptor Pool/Buffer Methods
Creates all command pools needed for drawing and presentation on one
thread.

return is (gfx command pool, transfer command pool).

May be expanded in the future (compute etc).
Command & Descriptor Pool / Buffer Methods Creates all command pools needed for drawing and presentation on one thread . return is ( gfx command pool transfer command pool ) . May be expanded in the future ( compute etc ) .
fn create_primary_command_pools(
    queue_family_indices: &QueueFamilyIndices, logical_device: &Device,
  ) -> SarektResult<(vk::CommandPool, vk::CommandPool)> {
    info!("Command Queues Selected: {:?}", queue_family_indices);
    let gfx_pool_ci = vk::CommandPoolCreateInfo::builder()
      .queue_family_index(queue_family_indices.graphics_queue_family.unwrap())
      .flags(vk::CommandPoolCreateFlags::RESET_COMMAND_BUFFER) // TODO(issue#26) PERFORMANCE create one command pool for each framebuffer to allow resetting individually at the pool level?
      .build();
    let gfx_pool = unsafe { logical_device.create_command_pool(&gfx_pool_ci, None)? };
    let transfer_pool =
      if queue_family_indices.graphics_queue_family == queue_family_indices.transfer_queue_family {
        gfx_pool
      } else {
        let transfer_pool_ci = vk::CommandPoolCreateInfo::builder()
          .queue_family_index(queue_family_indices.transfer_queue_family.unwrap())
          .flags(vk::CommandPoolCreateFlags::RESET_COMMAND_BUFFER)
          .build();
        unsafe { logical_device.create_command_pool(&transfer_pool_ci, None)? }
      };
    Ok((gfx_pool, transfer_pool))
  }
fn create_primary_command_pools ( queue_family_indices : & QueueFamilyIndices , logical_device : & Device , ) -> SarektResult < ( vk :: CommandPool , vk :: CommandPool ) > { info ! ( " " queue_family_indices ) ; let gfx_pool_ci = vk :: CommandPoolCreateInfo :: builder ( ) . queue_family_index ( queue_family_indices . graphics_queue_family . unwrap ( ) ) . flags ( vk :: CommandPoolCreateFlags :: RESET_COMMAND_BUFFER ) // TODO(issue#26) PERFORMANCE create one command pool for each framebuffer to allow resetting individually at the pool level? . build ( ) ; let gfx_pool = unsafe { logical_device . create_command_pool ( & gfx_pool_ci , None ) ? } ; let transfer_pool = if queue_family_indices . graphics_queue_family == queue_family_indices . transfer_queue_family { gfx_pool } else { let transfer_pool_ci = vk :: CommandPoolCreateInfo :: builder ( ) . queue_family_index ( queue_family_indices . transfer_queue_family . unwrap ( ) ) . flags ( vk :: CommandPoolCreateFlags :: RESET_COMMAND_BUFFER ) . build ( ) ; unsafe { logical_device . create_command_pool ( & transfer_pool_ci , None ) ? } } ; Ok ( ( gfx_pool , transfer_pool ) ) }
Command & Descriptor Pool/Buffer Methods
Creates all command pools needed for drawing and presentation on one
thread.
Command & Descriptor Pool / Buffer Methods Creates all command pools needed for drawing and presentation on one thread .
queue_family_indices
&QueueFamilyIndices
logical_device
&Device
queue_family_indices
&QueueFamilyIndices
logical_device
&Device