pub fn enumerate_physical_devices<I>(&self, instance: I)
            -> VdResult<SmallVec<[vks::VkPhysicalDevice; 16]>>
            where I: Handle<Target=InstanceHandle> {
        let mut device_count = 0;
        let mut devices_raw = SmallVec::new();
        unsafe {
            error::check(self.instance_proc_addr_loader.vk.vkEnumeratePhysicalDevices(instance.handle().0,
                &mut device_count, ptr::null_mut()), "vkEnumeratePhysicalDevices", ())?;
            if device_count == 0 { panic!("No physical devices found."); }
            assert!(device_count as usize <= devices_raw.inline_size());
            devices_raw.set_len(device_count as usize);
            loop {
                let result = self.instance_proc_addr_loader.vk.vkEnumeratePhysicalDevices(instance.handle().0,
                    &mut device_count, devices_raw.as_mut_ptr());
                if result != CallResult::Incomplete as i32 {
                        error::check(result, "vkEnumeratePhysicalDevices", ())?;
                        break;
                    }
                }
            }
        if PRINT { println!("Available devices: {:?}", devices_raw); }
        Ok(devices_raw)
    }
/// Enumerates the physical devices accessible to a Vulkan instance.
///
/// https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkEnumeratePhysicalDevices.html
//
// *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t*
// pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
Enumerates the physical devices accessible to a Vulkan instance.


Enumerates the physical devices accessible to a Vulkan instance .
pub fn enumerate_physical_devices<I>(&self, instance: I)
            -> VdResult<SmallVec<[vks::VkPhysicalDevice; 16]>>
            where I: Handle<Target=InstanceHandle> {
        let mut device_count = 0;
        let mut devices_raw = SmallVec::new();
        unsafe {
            error::check(self.instance_proc_addr_loader.vk.vkEnumeratePhysicalDevices(instance.handle().0,
                &mut device_count, ptr::null_mut()), "vkEnumeratePhysicalDevices", ())?;
            if device_count == 0 { panic!("No physical devices found."); }
            assert!(device_count as usize <= devices_raw.inline_size());
            devices_raw.set_len(device_count as usize);
            loop {
                let result = self.instance_proc_addr_loader.vk.vkEnumeratePhysicalDevices(instance.handle().0,
                    &mut device_count, devices_raw.as_mut_ptr());
                if result != CallResult::Incomplete as i32 {
                        error::check(result, "vkEnumeratePhysicalDevices", ())?;
                        break;
                    }
                }
            }
        if PRINT { println!("Available devices: {:?}", devices_raw); }
        Ok(devices_raw)
    }
pub fn enumerate_physical_devices < I > ( & self , instance : I ) -> VdResult < SmallVec < [ vks :: VkPhysicalDevice ; 16 ] > > where I : Handle < Target = InstanceHandle > { let mut device_count = 0 ; let mut devices_raw = SmallVec :: new ( ) ; unsafe { error :: check ( self . instance_proc_addr_loader . vk . vkEnumeratePhysicalDevices ( instance . handle ( ) . 0 , & mut device_count , ptr :: null_mut ( ) ) , " " , ( ) ) ? ; if device_count == 0 { panic ! ( " " ) ; } assert ! ( device_count as usize devices_raw inline_size ( ) ) ; devices_raw . set_len ( device_count as usize ) ; loop { let result = self . instance_proc_addr_loader . vk . vkEnumeratePhysicalDevices ( instance . handle ( ) . 0 , & mut device_count , devices_raw . as_mut_ptr ( ) ) ; if result != CallResult :: Incomplete as i32 { error :: check ( result , " " , ( ) ) ? ; break ; } } } if PRINT { println ! ( " " devices_raw ) ; } Ok ( devices_raw ) }
Enumerates the physical devices accessible to a Vulkan instance.
Enumerates the physical devices accessible to a Vulkan instance .
&self
instance
I
&self
instance
I