/third_party/skia/third_party/externals/spirv-tools/source/opt/ |
D | replace_desc_array_access_using_var_index.cpp | 158 const Instruction* type_inst) const { in IsImageOrImagePtrType() 159 if (type_inst->opcode() == SpvOpTypeImage || in IsImageOrImagePtrType() 160 type_inst->opcode() == SpvOpTypeSampler || in IsImageOrImagePtrType() 161 type_inst->opcode() == SpvOpTypeSampledImage) { in IsImageOrImagePtrType() 164 if (type_inst->opcode() == SpvOpTypePointer) { in IsImageOrImagePtrType() 166 type_inst->GetSingleWordInOperand(kOpTypePointerInOperandType)); in IsImageOrImagePtrType() 169 if (type_inst->opcode() == SpvOpTypeArray) { in IsImageOrImagePtrType() 171 type_inst->GetSingleWordInOperand(kOpTypeArrayInOperandType)); in IsImageOrImagePtrType() 174 if (type_inst->opcode() != SpvOpTypeStruct) return false; in IsImageOrImagePtrType() 176 in_operand_idx < type_inst->NumInOperands(); ++in_operand_idx) { in IsImageOrImagePtrType() [all …]
|
D | eliminate_dead_members_pass.cpp | 142 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in MarkTypeAsFullyUsed() local 143 assert(type_inst != nullptr); in MarkTypeAsFullyUsed() 145 switch (type_inst->opcode()) { in MarkTypeAsFullyUsed() 148 for (uint32_t i = 0; i < type_inst->NumInOperands(); ++i) { in MarkTypeAsFullyUsed() 150 MarkTypeAsFullyUsed(type_inst->GetSingleWordInOperand(i)); in MarkTypeAsFullyUsed() 156 type_inst->GetSingleWordInOperand(kArrayElementTypeIdx)); in MarkTypeAsFullyUsed() 192 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in MarkMembersAsLiveForExtract() local 194 switch (type_inst->opcode()) { in MarkMembersAsLiveForExtract() 197 type_id = type_inst->GetSingleWordInOperand(member_idx); in MarkMembersAsLiveForExtract() 203 type_id = type_inst->GetSingleWordInOperand(0); in MarkMembersAsLiveForExtract() [all …]
|
D | inst_buff_addr_check_pass.cpp | 134 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in GetTypeAlignment() local 135 switch (type_inst->opcode()) { in GetTypeAlignment() 141 return GetTypeAlignment(type_inst->GetSingleWordInOperand(0)); in GetTypeAlignment() 144 return GetTypeAlignment(type_inst->GetSingleWordInOperand(0)); in GetTypeAlignment() 147 type_inst->ForEachInId([&max, this](const uint32_t* iid) { in GetTypeAlignment() 154 assert(type_inst->GetSingleWordInOperand(0) == in GetTypeAlignment() 165 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in GetTypeLength() local 166 switch (type_inst->opcode()) { in GetTypeLength() 169 return type_inst->GetSingleWordInOperand(0) / 8u; in GetTypeLength() 171 uint32_t raw_cnt = type_inst->GetSingleWordInOperand(1); in GetTypeLength() [all …]
|
D | desc_sroa.cpp | 314 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in GetNumBindingsUsedByType() local 317 if (type_inst->opcode() == SpvOpTypePointer) { in GetNumBindingsUsedByType() 318 type_id = type_inst->GetSingleWordInOperand(1); in GetNumBindingsUsedByType() 319 type_inst = get_def_use_mgr()->GetDef(type_id); in GetNumBindingsUsedByType() 324 if (type_inst->opcode() == SpvOpTypeArray) { in GetNumBindingsUsedByType() 325 uint32_t element_type_id = type_inst->GetSingleWordInOperand(0); in GetNumBindingsUsedByType() 326 uint32_t length_id = type_inst->GetSingleWordInOperand(1); in GetNumBindingsUsedByType() 337 if (type_inst->opcode() == SpvOpTypeStruct && in GetNumBindingsUsedByType() 338 !descsroautil::IsTypeOfStructuredBuffer(context(), type_inst)) { in GetNumBindingsUsedByType() 340 for (uint32_t i = 0; i < type_inst->NumInOperands(); i++) in GetNumBindingsUsedByType() [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Tools/source/opt/ |
D | replace_desc_array_access_using_var_index.cpp | 158 const Instruction* type_inst) const { in IsImageOrImagePtrType() 159 if (type_inst->opcode() == SpvOpTypeImage || in IsImageOrImagePtrType() 160 type_inst->opcode() == SpvOpTypeSampler || in IsImageOrImagePtrType() 161 type_inst->opcode() == SpvOpTypeSampledImage) { in IsImageOrImagePtrType() 164 if (type_inst->opcode() == SpvOpTypePointer) { in IsImageOrImagePtrType() 166 type_inst->GetSingleWordInOperand(kOpTypePointerInOperandType)); in IsImageOrImagePtrType() 169 if (type_inst->opcode() == SpvOpTypeArray) { in IsImageOrImagePtrType() 171 type_inst->GetSingleWordInOperand(kOpTypeArrayInOperandType)); in IsImageOrImagePtrType() 174 if (type_inst->opcode() != SpvOpTypeStruct) return false; in IsImageOrImagePtrType() 176 in_operand_idx < type_inst->NumInOperands(); ++in_operand_idx) { in IsImageOrImagePtrType() [all …]
|
D | eliminate_dead_members_pass.cpp | 142 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in MarkTypeAsFullyUsed() local 143 assert(type_inst != nullptr); in MarkTypeAsFullyUsed() 145 switch (type_inst->opcode()) { in MarkTypeAsFullyUsed() 148 for (uint32_t i = 0; i < type_inst->NumInOperands(); ++i) { in MarkTypeAsFullyUsed() 150 MarkTypeAsFullyUsed(type_inst->GetSingleWordInOperand(i)); in MarkTypeAsFullyUsed() 156 type_inst->GetSingleWordInOperand(kArrayElementTypeIdx)); in MarkTypeAsFullyUsed() 192 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in MarkMembersAsLiveForExtract() local 194 switch (type_inst->opcode()) { in MarkMembersAsLiveForExtract() 197 type_id = type_inst->GetSingleWordInOperand(member_idx); in MarkMembersAsLiveForExtract() 203 type_id = type_inst->GetSingleWordInOperand(0); in MarkMembersAsLiveForExtract() [all …]
|
D | inst_buff_addr_check_pass.cpp | 134 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in GetTypeAlignment() local 135 switch (type_inst->opcode()) { in GetTypeAlignment() 141 return GetTypeAlignment(type_inst->GetSingleWordInOperand(0)); in GetTypeAlignment() 144 return GetTypeAlignment(type_inst->GetSingleWordInOperand(0)); in GetTypeAlignment() 147 type_inst->ForEachInId([&max, this](const uint32_t* iid) { in GetTypeAlignment() 154 assert(type_inst->GetSingleWordInOperand(0) == in GetTypeAlignment() 165 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in GetTypeLength() local 166 switch (type_inst->opcode()) { in GetTypeLength() 169 return type_inst->GetSingleWordInOperand(0) / 8u; in GetTypeLength() 171 uint32_t raw_cnt = type_inst->GetSingleWordInOperand(1); in GetTypeLength() [all …]
|
D | desc_sroa.cpp | 315 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in GetNumBindingsUsedByType() local 318 if (type_inst->opcode() == SpvOpTypePointer) { in GetNumBindingsUsedByType() 319 type_id = type_inst->GetSingleWordInOperand(1); in GetNumBindingsUsedByType() 320 type_inst = get_def_use_mgr()->GetDef(type_id); in GetNumBindingsUsedByType() 325 if (type_inst->opcode() == SpvOpTypeArray) { in GetNumBindingsUsedByType() 326 uint32_t element_type_id = type_inst->GetSingleWordInOperand(0); in GetNumBindingsUsedByType() 327 uint32_t length_id = type_inst->GetSingleWordInOperand(1); in GetNumBindingsUsedByType() 338 if (type_inst->opcode() == SpvOpTypeStruct && in GetNumBindingsUsedByType() 339 !descsroautil::IsTypeOfStructuredBuffer(context(), type_inst)) { in GetNumBindingsUsedByType() 341 for (uint32_t i = 0; i < type_inst->NumInOperands(); i++) in GetNumBindingsUsedByType() [all …]
|
/third_party/spirv-tools/source/opt/ |
D | replace_desc_array_access_using_var_index.cpp | 160 const Instruction* type_inst) const { in IsImageOrImagePtrType() 161 if (type_inst->opcode() == SpvOpTypeImage || in IsImageOrImagePtrType() 162 type_inst->opcode() == SpvOpTypeSampler || in IsImageOrImagePtrType() 163 type_inst->opcode() == SpvOpTypeSampledImage) { in IsImageOrImagePtrType() 166 if (type_inst->opcode() == SpvOpTypePointer) { in IsImageOrImagePtrType() 168 type_inst->GetSingleWordInOperand(kOpTypePointerInOperandType)); in IsImageOrImagePtrType() 171 if (type_inst->opcode() == SpvOpTypeArray) { in IsImageOrImagePtrType() 173 type_inst->GetSingleWordInOperand(kOpTypeArrayInOperandType)); in IsImageOrImagePtrType() 176 if (type_inst->opcode() != SpvOpTypeStruct) return false; in IsImageOrImagePtrType() 178 in_operand_idx < type_inst->NumInOperands(); ++in_operand_idx) { in IsImageOrImagePtrType() [all …]
|
D | eliminate_dead_members_pass.cpp | 142 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in MarkTypeAsFullyUsed() local 143 assert(type_inst != nullptr); in MarkTypeAsFullyUsed() 145 switch (type_inst->opcode()) { in MarkTypeAsFullyUsed() 148 for (uint32_t i = 0; i < type_inst->NumInOperands(); ++i) { in MarkTypeAsFullyUsed() 150 MarkTypeAsFullyUsed(type_inst->GetSingleWordInOperand(i)); in MarkTypeAsFullyUsed() 156 type_inst->GetSingleWordInOperand(kArrayElementTypeIdx)); in MarkTypeAsFullyUsed() 192 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in MarkMembersAsLiveForExtract() local 194 switch (type_inst->opcode()) { in MarkMembersAsLiveForExtract() 197 type_id = type_inst->GetSingleWordInOperand(member_idx); in MarkMembersAsLiveForExtract() 203 type_id = type_inst->GetSingleWordInOperand(0); in MarkMembersAsLiveForExtract() [all …]
|
D | inst_buff_addr_check_pass.cpp | 134 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in GetTypeAlignment() local 135 switch (type_inst->opcode()) { in GetTypeAlignment() 141 return GetTypeAlignment(type_inst->GetSingleWordInOperand(0)); in GetTypeAlignment() 144 return GetTypeAlignment(type_inst->GetSingleWordInOperand(0)); in GetTypeAlignment() 147 type_inst->ForEachInId([&max, this](const uint32_t* iid) { in GetTypeAlignment() 154 assert(type_inst->GetSingleWordInOperand(0) == in GetTypeAlignment() 165 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in GetTypeLength() local 166 switch (type_inst->opcode()) { in GetTypeLength() 169 return type_inst->GetSingleWordInOperand(0) / 8u; in GetTypeLength() 171 uint32_t raw_cnt = type_inst->GetSingleWordInOperand(1); in GetTypeLength() [all …]
|
D | desc_sroa.cpp | 315 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in GetNumBindingsUsedByType() local 318 if (type_inst->opcode() == SpvOpTypePointer) { in GetNumBindingsUsedByType() 319 type_id = type_inst->GetSingleWordInOperand(1); in GetNumBindingsUsedByType() 320 type_inst = get_def_use_mgr()->GetDef(type_id); in GetNumBindingsUsedByType() 325 if (type_inst->opcode() == SpvOpTypeArray) { in GetNumBindingsUsedByType() 326 uint32_t element_type_id = type_inst->GetSingleWordInOperand(0); in GetNumBindingsUsedByType() 327 uint32_t length_id = type_inst->GetSingleWordInOperand(1); in GetNumBindingsUsedByType() 338 if (type_inst->opcode() == SpvOpTypeStruct && in GetNumBindingsUsedByType() 339 !descsroautil::IsTypeOfStructuredBuffer(context(), type_inst)) { in GetNumBindingsUsedByType() 341 for (uint32_t i = 0; i < type_inst->NumInOperands(); i++) in GetNumBindingsUsedByType() [all …]
|
/third_party/spirv-tools/source/fuzz/ |
D | fuzzer_pass_add_composite_extract.cpp | 95 const auto* type_inst = in Apply() local 97 assert(type_inst && "Composite instruction has invalid type id"); in Apply() 99 switch (type_inst->opcode()) { in Apply() 102 fuzzerutil::GetArraySize(*type_inst, GetIRContext()); in Apply() 106 number_of_members = type_inst->GetSingleWordInOperand(1); in Apply() 109 number_of_members = type_inst->NumInOperands(); in Apply() 124 switch (type_inst->opcode()) { in Apply() 128 type_id = type_inst->GetSingleWordInOperand(0); in Apply() 131 type_id = type_inst->GetSingleWordInOperand(indices.back()); in Apply()
|
D | transformation_add_parameter.cpp | 179 opt::Instruction* type_inst = ir_context->get_def_use_mgr()->GetDef(type_id); in IsParameterTypeSupported() local 180 switch (type_inst->opcode()) { in IsParameterTypeSupported() 189 type_inst->GetSingleWordInOperand(0)); in IsParameterTypeSupported() 194 for (uint32_t i = 0; i < type_inst->NumInOperands(); i++) { in IsParameterTypeSupported() 196 type_inst->GetSingleWordInOperand(i))) { in IsParameterTypeSupported() 203 static_cast<SpvStorageClass>(type_inst->GetSingleWordInOperand(0)); in IsParameterTypeSupported() 209 type_inst->GetSingleWordInOperand(1)); in IsParameterTypeSupported()
|
D | fuzzer_util.cpp | 328 auto type_inst = ir_context->get_def_use_mgr()->GetDef(inst.type_id()); in CanMakeSynonymOf() local 329 if (type_inst->opcode() == SpvOpTypeVoid) { in CanMakeSynonymOf() 334 if (type_inst->opcode() == SpvOpTypePointer) { in CanMakeSynonymOf() 819 const opt::Instruction& type_inst) { in IsNullConstantSupported() argument 820 switch (type_inst.opcode()) { in IsNullConstantSupported() 843 return type_inst.GetSingleWordInOperand(0) == in IsNullConstantSupported() 897 auto* type_inst = context->get_def_use_mgr()->GetDef(type_id); in AddGlobalVariable() local 898 (void)type_inst; // Variable becomes unused in release mode. in AddGlobalVariable() 899 assert(type_inst && type_inst->opcode() == SpvOpTypePointer && in AddGlobalVariable() 900 GetStorageClassFromPointerType(type_inst) == storage_class && in AddGlobalVariable() [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Tools/source/fuzz/ |
D | fuzzer_pass_add_composite_extract.cpp | 95 const auto* type_inst = in Apply() local 97 assert(type_inst && "Composite instruction has invalid type id"); in Apply() 99 switch (type_inst->opcode()) { in Apply() 102 fuzzerutil::GetArraySize(*type_inst, GetIRContext()); in Apply() 106 number_of_members = type_inst->GetSingleWordInOperand(1); in Apply() 109 number_of_members = type_inst->NumInOperands(); in Apply() 124 switch (type_inst->opcode()) { in Apply() 128 type_id = type_inst->GetSingleWordInOperand(0); in Apply() 131 type_id = type_inst->GetSingleWordInOperand(indices.back()); in Apply()
|
D | transformation_add_parameter.cpp | 179 opt::Instruction* type_inst = ir_context->get_def_use_mgr()->GetDef(type_id); in IsParameterTypeSupported() local 180 switch (type_inst->opcode()) { in IsParameterTypeSupported() 189 type_inst->GetSingleWordInOperand(0)); in IsParameterTypeSupported() 194 for (uint32_t i = 0; i < type_inst->NumInOperands(); i++) { in IsParameterTypeSupported() 196 type_inst->GetSingleWordInOperand(i))) { in IsParameterTypeSupported() 203 static_cast<SpvStorageClass>(type_inst->GetSingleWordInOperand(0)); in IsParameterTypeSupported() 209 type_inst->GetSingleWordInOperand(1)); in IsParameterTypeSupported()
|
D | fuzzer_util.cpp | 328 auto type_inst = ir_context->get_def_use_mgr()->GetDef(inst.type_id()); in CanMakeSynonymOf() local 329 if (type_inst->opcode() == SpvOpTypeVoid) { in CanMakeSynonymOf() 334 if (type_inst->opcode() == SpvOpTypePointer) { in CanMakeSynonymOf() 819 const opt::Instruction& type_inst) { in IsNullConstantSupported() argument 820 switch (type_inst.opcode()) { in IsNullConstantSupported() 843 return type_inst.GetSingleWordInOperand(0) == in IsNullConstantSupported() 897 auto* type_inst = context->get_def_use_mgr()->GetDef(type_id); in AddGlobalVariable() local 898 (void)type_inst; // Variable becomes unused in release mode. in AddGlobalVariable() 899 assert(type_inst && type_inst->opcode() == SpvOpTypePointer && in AddGlobalVariable() 900 GetStorageClassFromPointerType(type_inst) == storage_class && in AddGlobalVariable() [all …]
|
/third_party/skia/third_party/externals/spirv-tools/source/fuzz/ |
D | fuzzer_pass_add_composite_extract.cpp | 95 const auto* type_inst = in Apply() local 97 assert(type_inst && "Composite instruction has invalid type id"); in Apply() 99 switch (type_inst->opcode()) { in Apply() 102 fuzzerutil::GetArraySize(*type_inst, GetIRContext()); in Apply() 106 number_of_members = type_inst->GetSingleWordInOperand(1); in Apply() 109 number_of_members = type_inst->NumInOperands(); in Apply() 124 switch (type_inst->opcode()) { in Apply() 128 type_id = type_inst->GetSingleWordInOperand(0); in Apply() 131 type_id = type_inst->GetSingleWordInOperand(indices.back()); in Apply()
|
D | transformation_add_parameter.cpp | 179 opt::Instruction* type_inst = ir_context->get_def_use_mgr()->GetDef(type_id); in IsParameterTypeSupported() local 180 switch (type_inst->opcode()) { in IsParameterTypeSupported() 189 type_inst->GetSingleWordInOperand(0)); in IsParameterTypeSupported() 194 for (uint32_t i = 0; i < type_inst->NumInOperands(); i++) { in IsParameterTypeSupported() 196 type_inst->GetSingleWordInOperand(i))) { in IsParameterTypeSupported() 203 static_cast<SpvStorageClass>(type_inst->GetSingleWordInOperand(0)); in IsParameterTypeSupported() 209 type_inst->GetSingleWordInOperand(1)); in IsParameterTypeSupported()
|
D | fuzzer_util.cpp | 328 auto type_inst = ir_context->get_def_use_mgr()->GetDef(inst.type_id()); in CanMakeSynonymOf() local 329 if (type_inst->opcode() == SpvOpTypeVoid) { in CanMakeSynonymOf() 334 if (type_inst->opcode() == SpvOpTypePointer) { in CanMakeSynonymOf() 819 const opt::Instruction& type_inst) { in IsNullConstantSupported() argument 820 switch (type_inst.opcode()) { in IsNullConstantSupported() 843 return type_inst.GetSingleWordInOperand(0) == in IsNullConstantSupported() 897 auto* type_inst = context->get_def_use_mgr()->GetDef(type_id); in AddGlobalVariable() local 898 (void)type_inst; // Variable becomes unused in release mode. in AddGlobalVariable() 899 assert(type_inst && type_inst->opcode() == SpvOpTypePointer && in AddGlobalVariable() 900 GetStorageClassFromPointerType(type_inst) == storage_class && in AddGlobalVariable() [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Tools/source/val/ |
D | validate_composites.cpp | 66 const Instruction* const type_inst = _.FindDef(*member_type); in GetExtractInsertValueType() local 67 assert(type_inst); in GetExtractInsertValueType() 68 switch (type_inst->opcode()) { in GetExtractInsertValueType() 70 *member_type = type_inst->word(2); in GetExtractInsertValueType() 71 const uint32_t vector_size = type_inst->word(3); in GetExtractInsertValueType() 80 *member_type = type_inst->word(2); in GetExtractInsertValueType() 81 const uint32_t num_cols = type_inst->word(3); in GetExtractInsertValueType() 91 auto size = _.FindDef(type_inst->word(3)); in GetExtractInsertValueType() 92 *member_type = type_inst->word(2); in GetExtractInsertValueType() 98 if (!_.GetConstantValUint64(type_inst->word(3), &array_size)) { in GetExtractInsertValueType() [all …]
|
/third_party/skia/third_party/externals/spirv-tools/source/val/ |
D | validate_composites.cpp | 66 const Instruction* const type_inst = _.FindDef(*member_type); in GetExtractInsertValueType() local 67 assert(type_inst); in GetExtractInsertValueType() 68 switch (type_inst->opcode()) { in GetExtractInsertValueType() 70 *member_type = type_inst->word(2); in GetExtractInsertValueType() 71 const uint32_t vector_size = type_inst->word(3); in GetExtractInsertValueType() 80 *member_type = type_inst->word(2); in GetExtractInsertValueType() 81 const uint32_t num_cols = type_inst->word(3); in GetExtractInsertValueType() 91 auto size = _.FindDef(type_inst->word(3)); in GetExtractInsertValueType() 92 *member_type = type_inst->word(2); in GetExtractInsertValueType() 98 if (!_.GetConstantValUint64(type_inst->word(3), &array_size)) { in GetExtractInsertValueType() [all …]
|
/third_party/spirv-tools/source/val/ |
D | validate_composites.cpp | 66 const Instruction* const type_inst = _.FindDef(*member_type); in GetExtractInsertValueType() local 67 assert(type_inst); in GetExtractInsertValueType() 68 switch (type_inst->opcode()) { in GetExtractInsertValueType() 70 *member_type = type_inst->word(2); in GetExtractInsertValueType() 71 const uint32_t vector_size = type_inst->word(3); in GetExtractInsertValueType() 80 *member_type = type_inst->word(2); in GetExtractInsertValueType() 81 const uint32_t num_cols = type_inst->word(3); in GetExtractInsertValueType() 91 auto size = _.FindDef(type_inst->word(3)); in GetExtractInsertValueType() 92 *member_type = type_inst->word(2); in GetExtractInsertValueType() 98 if (!_.GetConstantValUint64(type_inst->word(3), &array_size)) { in GetExtractInsertValueType() [all …]
|
/third_party/spirv-tools/source/reduce/ |
D | remove_struct_member_reduction_opportunity.cpp | 147 auto type_inst = context->get_def_use_mgr()->GetDef(next_type); in AdjustAccessedIndices() local 148 switch (type_inst->opcode()) { in AdjustAccessedIndices() 153 next_type = type_inst->GetSingleWordInOperand(0); in AdjustAccessedIndices() 173 next_type = type_inst->GetSingleWordInOperand(member); in AdjustAccessedIndices() 175 if (type_inst == struct_type_ && member > member_index_) { in AdjustAccessedIndices()
|