fn build_vma(instance: &instance::VkInstance, phy_device: &VkPhysicalDevice, logic_device: &VkLogicalDevice) -> VkResult<vma::Allocator> {

        let allocator_ci = vma::AllocatorCreateInfo {
            physical_device: phy_device.handle,
            device: logic_device.handle.clone(),
            instance: instance.handle.clone(),
            // handle synchronization by myself.
            flags: vma::AllocatorCreateFlags::EXTERNALLY_SYNCHRONIZED,
            // tell vma use default block size.
            preferred_large_heap_block_size: 0,
            // this crate does not use `lost allocations` feature, so this field does not matter.
            frame_in_use_count: 0,
            // disable limitation on memory heap.
            heap_size_limits: None,
        };

        let allocator = vma::Allocator::new(&allocator_ci)
            .map_err(VkErrorKind::Vma)?;
        Ok(allocator)
    }
/// Create Vulkan Memory Allocator object for VkDevice.
Create Vulkan Memory Allocator object for VkDevice.
Create Vulkan Memory Allocator object for VkDevice .
fn build_vma(instance: &instance::VkInstance, phy_device: &VkPhysicalDevice, logic_device: &VkLogicalDevice) -> VkResult<vma::Allocator> {
        let allocator_ci = vma::AllocatorCreateInfo {
            physical_device: phy_device.handle,
            device: logic_device.handle.clone(),
            instance: instance.handle.clone(),
            // handle synchronization by myself.
            flags: vma::AllocatorCreateFlags::EXTERNALLY_SYNCHRONIZED,
            // tell vma use default block size.
            preferred_large_heap_block_size: 0,
            // this crate does not use `lost allocations` feature, so this field does not matter.
            frame_in_use_count: 0,
            // disable limitation on memory heap.
            heap_size_limits: None,
        };
        let allocator = vma::Allocator::new(&allocator_ci)
            .map_err(VkErrorKind::Vma)?;
        Ok(allocator)
    }
fn build_vma ( instance : & instance :: VkInstance , phy_device : & VkPhysicalDevice , logic_device : & VkLogicalDevice ) -> VkResult < vma :: Allocator > { let allocator_ci = vma :: AllocatorCreateInfo { physical_device : phy_device . handle , device : logic_device . handle . clone ( ) , instance : instance . handle . clone ( ) , // handle synchronization by myself. flags : vma :: AllocatorCreateFlags :: EXTERNALLY_SYNCHRONIZED , // tell vma use default block size. preferred_large_heap_block_size : 0 , // this crate does not use `lost allocations` feature, so this field does not matter. frame_in_use_count : 0 , // disable limitation on memory heap. heap_size_limits : None , } ; let allocator = vma :: Allocator :: new ( & allocator_ci ) . map_err ( VkErrorKind :: Vma ) ? ; Ok ( allocator ) }
Create Vulkan Memory Allocator object for VkDevice.
Create Vulkan Memory Allocator object for VkDevice .
instance
&instance::VkInstance
phy_device
&VkPhysicalDevice
logic_device
&VkLogicalDevice
instance
&instance::VkInstance
phy_device
&VkPhysicalDevice
logic_device
&VkLogicalDevice