/// Returns an iterator over all entry points in `spirv`, with information about the entry point.
Returns an iterator over all entry points in `spirv`, with information about the entry point.
Returns an iterator over all entry points in ` spirv ` with information about the entry point .
pub fn entry_points<'a>(
    spirv: &'a Spirv,
) -> impl Iterator<Item = (String, ExecutionModel, EntryPointInfo)> + 'a {
    spirv.iter_entry_point().filter_map(move |instruction| {
        let (execution_model, function_id, entry_point_name, interface) = match instruction {
            &Instruction::EntryPoint {
                ref execution_model,
                entry_point,
                ref name,
                ref interface,
                ..
            } => (execution_model, entry_point, name, interface),
            _ => return None,
        };
        let execution = shader_execution(&spirv, execution_model, function_id);
        let stage = ShaderStage::from(execution);
        let descriptor_requirements =
            descriptor_requirements(&spirv, function_id, stage, interface);
        let push_constant_requirements = push_constant_requirements(&spirv, stage);
        let specialization_constant_requirements = specialization_constant_requirements(&spirv);
        let input_interface = shader_interface(
            &spirv,
            interface,
            StorageClass::Input,
            matches!(
                execution_model,
                ExecutionModel::TessellationControl
                    | ExecutionModel::TessellationEvaluation
                    | ExecutionModel::Geometry
            ),
        );
        let output_interface = shader_interface(
            &spirv,
            interface,
            StorageClass::Output,
            matches!(execution_model, ExecutionModel::TessellationControl),
        );
        Some((
            entry_point_name.clone(),
            *execution_model,
            EntryPointInfo {
                execution,
                descriptor_requirements,
                push_constant_requirements,
                specialization_constant_requirements,
                input_interface,
                output_interface,
            },
        ))
    })
}
pub fn entry_points < ' a > ( spirv : & ' a Spirv , ) -> impl Iterator < Item = ( String , ExecutionModel , EntryPointInfo ) > + ' a { spirv . iter_entry_point ( ) . filter_map ( move | instruction | { let ( execution_model , function_id , entry_point_name , interface ) = match instruction { & Instruction :: EntryPoint { ref execution_model , entry_point , ref name , ref interface , .. } => ( execution_model , entry_point , name , interface ) , _ => return None , } ; let execution = shader_execution ( & spirv , execution_model , function_id ) ; let stage = ShaderStage :: from ( execution ) ; let descriptor_requirements = descriptor_requirements ( & spirv , function_id , stage , interface ) ; let push_constant_requirements = push_constant_requirements ( & spirv , stage ) ; let specialization_constant_requirements = specialization_constant_requirements ( & spirv ) ; let input_interface = shader_interface ( & spirv , interface , StorageClass :: Input , matches ! ( execution_model ExecutionModel TessellationControl ExecutionModel TessellationEvaluation ExecutionModel Geometry ) , ) ; let output_interface = shader_interface ( & spirv , interface , StorageClass :: Output , matches ! ( execution_model ExecutionModel TessellationControl ) , ) ; Some ( ( entry_point_name . clone ( ) , * execution_model , EntryPointInfo { execution , descriptor_requirements , push_constant_requirements , specialization_constant_requirements , input_interface , output_interface , } , ) ) } ) }
Returns an iterator over all entry points in `spirv`, with information about the entry point.
Returns an iterator over all entry points in ` spirv ` with information about the entry point .
spirv
&'a Spirv