pub fn undef(
        &mut self,
        result_type: spirv::Word,
        result_id: Option<spirv::Word>,
    ) -> spirv::Word {
        let id = match result_id {
            Some(v) => v,
            None => self.id(),
        };
        let inst = dr::Instruction::new(spirv::Op::Undef, Some(result_type), Some(id), vec![]);

        match (self.selected_function, self.selected_block) {
            (Some(selected_function), Some(selected_block)) => {
                self.module.functions[selected_function].blocks[selected_block]
                    .instructions
                    .push(inst)
            }
            _ => self.module.types_global_values.push(inst),
        }
        id
    }
/// Appends an OpUndef instruction to either the current block
/// or the module if no block is under construction.
Appends an OpUndef instruction to either the current block
or the module if no block is under construction.
Appends an OpUndef instruction to either the current block or the module if no block is under construction .
pub fn undef(
        &mut self,
        result_type: spirv::Word,
        result_id: Option<spirv::Word>,
    ) -> spirv::Word {
        let id = match result_id {
            Some(v) => v,
            None => self.id(),
        };
        let inst = dr::Instruction::new(spirv::Op::Undef, Some(result_type), Some(id), vec![]);
        match (self.selected_function, self.selected_block) {
            (Some(selected_function), Some(selected_block)) => {
                self.module.functions[selected_function].blocks[selected_block]
                    .instructions
                    .push(inst)
            }
            _ => self.module.types_global_values.push(inst),
        }
        id
    }
pub fn undef ( & mut self , result_type : spirv :: Word , result_id : Option < spirv :: Word > , ) -> spirv :: Word { let id = match result_id { Some ( v ) => v , None => self . id ( ) , } ; let inst = dr :: Instruction :: new ( spirv :: Op :: Undef , Some ( result_type ) , Some ( id ) , vec ! [ ] ) ; match ( self . selected_function , self . selected_block ) { ( Some ( selected_function ) , Some ( selected_block ) ) => { self . module . functions [ selected_function ] . blocks [ selected_block ] . instructions . push ( inst ) } _ => self . module . types_global_values . push ( inst ) , } id }
Appends an OpUndef instruction to either the current block
or the module if no block is under construction.
Appends an OpUndef instruction to either the current block or the module if no block is under construction .
&mut self
result_type
spirv::Word
result_id
Option<spirv::Word>
&mut self
result_type
spirv::Word
result_id
Option<spirv::Word>