pub fn function_parameter(&mut self, result_type: spirv::Word) -> BuildResult<spirv::Word> {
        let selected_function = match self.selected_function {
            Some(f) => f,
            None => return Err(Error::DetachedFunctionParameter),
        };
        let id = self.id();
        let inst = dr::Instruction::new(
            spirv::Op::FunctionParameter,
            Some(result_type),
            Some(id),
            vec![],
        );
        self.module.functions[selected_function]
            .parameters
            .push(inst);
        Ok(id)
    }
/// Declares a formal parameter for the current function.
Declares a formal parameter for the current function.
Declares a formal parameter for the current function .
pub fn function_parameter(&mut self, result_type: spirv::Word) -> BuildResult<spirv::Word> {
        let selected_function = match self.selected_function {
            Some(f) => f,
            None => return Err(Error::DetachedFunctionParameter),
        };
        let id = self.id();
        let inst = dr::Instruction::new(
            spirv::Op::FunctionParameter,
            Some(result_type),
            Some(id),
            vec![],
        );
        self.module.functions[selected_function]
            .parameters
            .push(inst);
        Ok(id)
    }
pub fn function_parameter ( & mut self , result_type : spirv :: Word ) -> BuildResult < spirv :: Word > { let selected_function = match self . selected_function { Some ( f ) => f , None => return Err ( Error :: DetachedFunctionParameter ) , } ; let id = self . id ( ) ; let inst = dr :: Instruction :: new ( spirv :: Op :: FunctionParameter , Some ( result_type ) , Some ( id ) , vec ! [ ] , ) ; self . module . functions [ selected_function ] . parameters . push ( inst ) ; Ok ( id ) }
Declares a formal parameter for the current function.
Declares a formal parameter for the current function .
&mut self
result_type
spirv::Word
&mut self
result_type
spirv::Word