MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / AddExtInstImportIds

Method AddExtInstImportIds

source/opt/feature_manager.cpp:85–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void FeatureManager::AddExtInstImportIds(Module* module) {
86 extinst_importid_GLSLstd450_ = module->GetExtInstImportId("GLSL.std.450");
87 extinst_importid_OpenCL100DebugInfo_ =
88 module->GetExtInstImportId("OpenCL.DebugInfo.100");
89 // Match any version of NonSemantic.Shader.DebugInfo.
90 for (auto& ei : module->ext_inst_imports()) {
91 const std::string name = ei.GetInOperand(0).AsString();
92 if (name.compare(0, 29, "NonSemantic.Shader.DebugInfo.") == 0) {
93 extinst_importid_ShaderDebugInfo_ = ei.result_id();
94 break;
95 }
96 }
97}
98
99bool operator==(const FeatureManager& a, const FeatureManager& b) {
100 // We check that the addresses of the grammars are the same because they

Callers 1

AddExtInstImportMethod · 0.80

Calls 4

GetExtInstImportIdMethod · 0.80
ext_inst_importsMethod · 0.45
AsStringMethod · 0.45
result_idMethod · 0.45

Tested by

no test coverage detected