fn choose_physical_device(instance: &Instance, surface: &SurfaceKhr)
        -> VdResult<PhysicalDevice> {
    let mut preferred_device = None;
    for device in instance.physical_devices()? {
        if device_is_suitable(&device, surface)? {
            preferred_device = Some(device);
            break;
        }
    }
    if let Some(preferred_device) = preferred_device {
        Ok(preferred_device)
    } else {
        panic!("Failed to find a suitable device.");
    }
}
/// Returns a physical device from the list of available physical devices if
/// it meets the criteria specified in the above function.
Returns a physical device from the list of available physical devices if
it meets the criteria specified in the above function.
Returns a physical device from the list of available physical devices if it meets the criteria specified in the above function .
fn choose_physical_device(instance: &Instance, surface: &SurfaceKhr)
        -> VdResult<PhysicalDevice> {
    let mut preferred_device = None;
    for device in instance.physical_devices()? {
        if device_is_suitable(&device, surface)? {
            preferred_device = Some(device);
            break;
        }
    }
    if let Some(preferred_device) = preferred_device {
        Ok(preferred_device)
    } else {
        panic!("Failed to find a suitable device.");
    }
}
fn choose_physical_device ( instance : & Instance , surface : & SurfaceKhr ) -> VdResult < PhysicalDevice > { let mut preferred_device = None ; for device in instance . physical_devices ( ) ? { if device_is_suitable ( & device , surface ) ? { preferred_device = Some ( device ) ; break ; } } if let Some ( preferred_device ) = preferred_device { Ok ( preferred_device ) } else { panic ! ( " " ) ; } }
Returns a physical device from the list of available physical devices if
it meets the criteria specified in the above function.
Returns a physical device from the list of available physical devices if it meets the criteria specified in the above function .
instance
&Instance
surface
&SurfaceKhr
instance
&Instance
surface
&SurfaceKhr