/external/deqp-deps/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 …]
|
/external/angle/third_party/vulkan-deps/spirv-tools/src/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<spv::StorageClass>(type_inst->GetSingleWordInOperand(0)); in IsParameterTypeSupported() 209 type_inst->GetSingleWordInOperand(1)); in IsParameterTypeSupported()
|
/external/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<spv::StorageClass>(type_inst->GetSingleWordInOperand(0)); in IsParameterTypeSupported() 209 type_inst->GetSingleWordInOperand(1)); in IsParameterTypeSupported()
|
/external/deqp-deps/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 | 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 …]
|
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 …]
|
/external/swiftshader/third_party/SPIRV-Tools/source/opt/ |
D | replace_desc_array_access_using_var_index.cpp | 159 const Instruction* type_inst) const { in IsImageOrImagePtrType() 160 if (type_inst->opcode() == spv::Op::OpTypeImage || in IsImageOrImagePtrType() 161 type_inst->opcode() == spv::Op::OpTypeSampler || in IsImageOrImagePtrType() 162 type_inst->opcode() == spv::Op::OpTypeSampledImage) { in IsImageOrImagePtrType() 165 if (type_inst->opcode() == spv::Op::OpTypePointer) { in IsImageOrImagePtrType() 167 type_inst->GetSingleWordInOperand(kOpTypePointerInOperandType)); in IsImageOrImagePtrType() 170 if (type_inst->opcode() == spv::Op::OpTypeArray) { in IsImageOrImagePtrType() 172 type_inst->GetSingleWordInOperand(kOpTypeArrayInOperandType)); in IsImageOrImagePtrType() 175 if (type_inst->opcode() != spv::Op::OpTypeStruct) return false; in IsImageOrImagePtrType() 177 in_operand_idx < type_inst->NumInOperands(); ++in_operand_idx) { in IsImageOrImagePtrType() [all …]
|
D | eliminate_dead_members_pass.cpp | 141 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in MarkTypeAsFullyUsed() local 142 assert(type_inst != nullptr); in MarkTypeAsFullyUsed() 144 switch (type_inst->opcode()) { in MarkTypeAsFullyUsed() 147 for (uint32_t i = 0; i < type_inst->NumInOperands(); ++i) { in MarkTypeAsFullyUsed() 149 MarkTypeAsFullyUsed(type_inst->GetSingleWordInOperand(i)); in MarkTypeAsFullyUsed() 155 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 | 136 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in GetTypeAlignment() local 137 switch (type_inst->opcode()) { in GetTypeAlignment() 143 return GetTypeAlignment(type_inst->GetSingleWordInOperand(0)); in GetTypeAlignment() 146 return GetTypeAlignment(type_inst->GetSingleWordInOperand(0)); in GetTypeAlignment() 149 type_inst->ForEachInId([&max, this](const uint32_t* iid) { in GetTypeAlignment() 156 assert(spv::StorageClass(type_inst->GetSingleWordInOperand(0)) == in GetTypeAlignment() 167 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in GetTypeLength() local 168 switch (type_inst->opcode()) { in GetTypeLength() 171 return type_inst->GetSingleWordInOperand(0) / 8u; in GetTypeLength() 173 uint32_t raw_cnt = type_inst->GetSingleWordInOperand(1); in GetTypeLength() [all …]
|
D | desc_sroa.cpp | 316 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in GetNumBindingsUsedByType() local 319 if (type_inst->opcode() == spv::Op::OpTypePointer) { in GetNumBindingsUsedByType() 320 type_id = type_inst->GetSingleWordInOperand(1); in GetNumBindingsUsedByType() 321 type_inst = get_def_use_mgr()->GetDef(type_id); in GetNumBindingsUsedByType() 326 if (type_inst->opcode() == spv::Op::OpTypeArray) { in GetNumBindingsUsedByType() 327 uint32_t element_type_id = type_inst->GetSingleWordInOperand(0); in GetNumBindingsUsedByType() 328 uint32_t length_id = type_inst->GetSingleWordInOperand(1); in GetNumBindingsUsedByType() 339 if (type_inst->opcode() == spv::Op::OpTypeStruct && in GetNumBindingsUsedByType() 340 !descsroautil::IsTypeOfStructuredBuffer(context(), type_inst)) { in GetNumBindingsUsedByType() 342 for (uint32_t i = 0; i < type_inst->NumInOperands(); i++) in GetNumBindingsUsedByType() [all …]
|
/external/angle/third_party/vulkan-deps/spirv-tools/src/source/opt/ |
D | replace_desc_array_access_using_var_index.cpp | 159 const Instruction* type_inst) const { in IsImageOrImagePtrType() 160 if (type_inst->opcode() == spv::Op::OpTypeImage || in IsImageOrImagePtrType() 161 type_inst->opcode() == spv::Op::OpTypeSampler || in IsImageOrImagePtrType() 162 type_inst->opcode() == spv::Op::OpTypeSampledImage) { in IsImageOrImagePtrType() 165 if (type_inst->opcode() == spv::Op::OpTypePointer) { in IsImageOrImagePtrType() 167 type_inst->GetSingleWordInOperand(kOpTypePointerInOperandType)); in IsImageOrImagePtrType() 170 if (type_inst->opcode() == spv::Op::OpTypeArray) { in IsImageOrImagePtrType() 172 type_inst->GetSingleWordInOperand(kOpTypeArrayInOperandType)); in IsImageOrImagePtrType() 175 if (type_inst->opcode() != spv::Op::OpTypeStruct) return false; in IsImageOrImagePtrType() 177 in_operand_idx < type_inst->NumInOperands(); ++in_operand_idx) { in IsImageOrImagePtrType() [all …]
|
D | eliminate_dead_members_pass.cpp | 141 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in MarkTypeAsFullyUsed() local 142 assert(type_inst != nullptr); in MarkTypeAsFullyUsed() 144 switch (type_inst->opcode()) { in MarkTypeAsFullyUsed() 147 for (uint32_t i = 0; i < type_inst->NumInOperands(); ++i) { in MarkTypeAsFullyUsed() 149 MarkTypeAsFullyUsed(type_inst->GetSingleWordInOperand(i)); in MarkTypeAsFullyUsed() 155 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 | desc_sroa.cpp | 316 Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); in GetNumBindingsUsedByType() local 319 if (type_inst->opcode() == spv::Op::OpTypePointer) { in GetNumBindingsUsedByType() 320 type_id = type_inst->GetSingleWordInOperand(1); in GetNumBindingsUsedByType() 321 type_inst = get_def_use_mgr()->GetDef(type_id); in GetNumBindingsUsedByType() 326 if (type_inst->opcode() == spv::Op::OpTypeArray) { in GetNumBindingsUsedByType() 327 uint32_t element_type_id = type_inst->GetSingleWordInOperand(0); in GetNumBindingsUsedByType() 328 uint32_t length_id = type_inst->GetSingleWordInOperand(1); in GetNumBindingsUsedByType() 339 if (type_inst->opcode() == spv::Op::OpTypeStruct && in GetNumBindingsUsedByType() 340 !descsroautil::IsTypeOfStructuredBuffer(context(), type_inst)) { in GetNumBindingsUsedByType() 342 for (uint32_t i = 0; i < type_inst->NumInOperands(); i++) in GetNumBindingsUsedByType() [all …]
|
/external/deqp-deps/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 …]
|
/external/angle/third_party/vulkan-deps/spirv-tools/src/source/val/ |
D | validate_composites.cpp | 65 const Instruction* const type_inst = _.FindDef(*member_type); in GetExtractInsertValueType() local 66 assert(type_inst); in GetExtractInsertValueType() 67 switch (type_inst->opcode()) { in GetExtractInsertValueType() 69 *member_type = type_inst->word(2); in GetExtractInsertValueType() 70 const uint32_t vector_size = type_inst->word(3); in GetExtractInsertValueType() 79 *member_type = type_inst->word(2); in GetExtractInsertValueType() 80 const uint32_t num_cols = type_inst->word(3); in GetExtractInsertValueType() 90 auto size = _.FindDef(type_inst->word(3)); in GetExtractInsertValueType() 91 *member_type = type_inst->word(2); in GetExtractInsertValueType() 97 if (!_.GetConstantValUint64(type_inst->word(3), &array_size)) { in GetExtractInsertValueType() [all …]
|
/external/swiftshader/third_party/SPIRV-Tools/source/val/ |
D | validate_composites.cpp | 67 const Instruction* const type_inst = _.FindDef(*member_type); in GetExtractInsertValueType() local 68 assert(type_inst); in GetExtractInsertValueType() 69 switch (type_inst->opcode()) { in GetExtractInsertValueType() 71 *member_type = type_inst->word(2); in GetExtractInsertValueType() 72 const uint32_t vector_size = type_inst->word(3); in GetExtractInsertValueType() 81 *member_type = type_inst->word(2); in GetExtractInsertValueType() 82 const uint32_t num_cols = type_inst->word(3); in GetExtractInsertValueType() 92 auto size = _.FindDef(type_inst->word(3)); in GetExtractInsertValueType() 93 *member_type = type_inst->word(2); in GetExtractInsertValueType() 99 if (!_.GetConstantValUint64(type_inst->word(3), &array_size)) { in GetExtractInsertValueType() [all …]
|
/external/deqp-deps/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()
|
D | remove_unused_struct_member_reduction_opportunity_finder.cpp | 164 auto type_inst = context->get_def_use_mgr()->GetDef(next_type); in MarkAccessedMembersAsUsed() local 165 switch (type_inst->opcode()) { in MarkAccessedMembersAsUsed() 170 next_type = type_inst->GetSingleWordInOperand(0); in MarkAccessedMembersAsUsed() 183 unused_member_to_structs->at(member).erase(type_inst); in MarkAccessedMembersAsUsed() 185 next_type = type_inst->GetSingleWordInOperand(member); in MarkAccessedMembersAsUsed()
|
/external/angle/third_party/vulkan-deps/spirv-tools/src/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()
|
/external/swiftshader/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()
|