pub fn dedup_insert_type(&mut self, inst: &dr::Instruction) -> Option<spirv::Word> {
        for ty in &self.module.types_global_values {
            if ty.is_type_identical(inst) {
                if let Some(id) = ty.result_id {
                    return Some(id);
                }
            }
        }

        None
    }
/// Insert a OpType instruction, deduplicate it if needed and either return the existing ID
/// or a new unused ID if we can't find find the instruction already. Useful to uphold
/// the SPIR-V rule that non-aggregate types can't be duplicates.
Insert a OpType instruction, deduplicate it if needed and either return the existing ID
or a new unused ID if we can't find find the instruction already. Useful to uphold
the SPIR-V rule that non-aggregate types can't be duplicates.
Insert a OpType instruction deduplicate it if needed and either return the existing ID or a new unused ID if we can ' t find find the instruction already . Useful to uphold the SPIR - V rule that non - aggregate types can ' t be duplicates .
pub fn dedup_insert_type(&mut self, inst: &dr::Instruction) -> Option<spirv::Word> {
        for ty in &self.module.types_global_values {
            if ty.is_type_identical(inst) {
                if let Some(id) = ty.result_id {
                    return Some(id);
                }
            }
        }
        None
    }
pub fn dedup_insert_type ( & mut self , inst : & dr :: Instruction ) -> Option < spirv :: Word > { for ty in & self . module . types_global_values { if ty . is_type_identical ( inst ) { if let Some ( id ) = ty . result_id { return Some ( id ) ; } } } None }
Insert a OpType instruction, deduplicate it if needed and either return the existing ID
or a new unused ID if we can't find find the instruction already.
Insert a OpType instruction deduplicate it if needed and either return the existing ID or a new unused ID if we can ' t find find the instruction already .
&mut self
inst
&dr::Instruction
&mut self
inst
&dr::Instruction