fn missing_layers(
    entry: &Entry,
    required_layers: &[String],
) -> Result<Vec<String>> {
    let available_layer_properties =
        entry.enumerate_instance_layer_properties()?;

    let available_names: Vec<String> = available_layer_properties
        .iter()
        .map(|layer| {
            String::from_utf8(
                layer.layer_name.iter().map(|c| *c as u8).collect(),
            )
            .unwrap()
        })
        .collect();

    log::info!("Available layers {}", available_names.join("\n"));

    Ok(required_layers
        .iter()
        .cloned()
        .filter(|name| available_names.contains(name))
        .collect())
}
/// Get a list of all layers which are required but not avaialable for this
/// vulkan instance.
Get a list of all layers which are required but not avaialable for this
vulkan instance.
Get a list of all layers which are required but not avaialable for this vulkan instance .
fn missing_layers(
    entry: &Entry,
    required_layers: &[String],
) -> Result<Vec<String>> {
    let available_layer_properties =
        entry.enumerate_instance_layer_properties()?;
    let available_names: Vec<String> = available_layer_properties
        .iter()
        .map(|layer| {
            String::from_utf8(
                layer.layer_name.iter().map(|c| *c as u8).collect(),
            )
            .unwrap()
        })
        .collect();
    log::info!("Available layers {}", available_names.join("\n"));
    Ok(required_layers
        .iter()
        .cloned()
        .filter(|name| available_names.contains(name))
        .collect())
}
fn missing_layers ( entry : & Entry , required_layers : & [ String ] , ) -> Result < Vec < String > > { let available_layer_properties = entry . enumerate_instance_layer_properties ( ) ? ; let available_names : Vec < String > = available_layer_properties . iter ( ) . map ( | layer | { String :: from_utf8 ( layer . layer_name . iter ( ) . map ( | c | * c as u8 ) . collect ( ) , ) . unwrap ( ) } ) . collect ( ) ; log :: info ! ( " " available_names join ( " \n " ) ) ; Ok ( required_layers . iter ( ) . cloned ( ) . filter ( | name | available_names . contains ( name ) ) . collect ( ) ) }
Get a list of all layers which are required but not avaialable for this
vulkan instance.
Get a list of all layers which are required but not avaialable for this vulkan instance .
entry
&Entry
required_layers
&[String]