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

Method Build

test/val/val_code_generator.cpp:133–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133std::string CodeGenerator::Build() const {
134 std::ostringstream ss;
135
136 ss << capabilities_;
137 ss << extensions_;
138 ss << memory_model_;
139
140 for (const EntryPoint& entry_point : entry_points_) {
141 ss << "OpEntryPoint " << entry_point.execution_model << " %"
142 << entry_point.name << " \"" << entry_point.name << "\" "
143 << entry_point.interfaces << "\n";
144 }
145
146 for (const EntryPoint& entry_point : entry_points_) {
147 ss << entry_point.execution_modes << "\n";
148 }
149
150 ss << before_types_;
151 ss << types_;
152 ss << after_types_;
153
154 for (const EntryPoint& entry_point : entry_points_) {
155 ss << "\n";
156 ss << "%" << entry_point.name << " = OpFunction %void None %func\n";
157 ss << "%" << entry_point.name << "_entry = OpLabel\n";
158 ss << entry_point.body;
159 ss << "\nOpReturn\nOpFunctionEnd\n";
160 }
161
162 ss << add_at_the_end_;
163
164 return ss.str();
165}
166
167} // namespace val
168} // namespace spvtools

Callers 10

TEST_PFunction · 0.45
TEST_FFunction · 0.45
TEST_PFunction · 0.45
TEST_PFunction · 0.45
TEST_PFunction · 0.45
TEST_PFunction · 0.45
TEST_PFunction · 0.45
TEST_PFunction · 0.45
TEST_FFunction · 0.45
TEST_PFunction · 0.45

Calls 1

strMethod · 0.45

Tested by 10

TEST_PFunction · 0.36
TEST_FFunction · 0.36
TEST_PFunction · 0.36
TEST_PFunction · 0.36
TEST_PFunction · 0.36
TEST_PFunction · 0.36
TEST_PFunction · 0.36
TEST_PFunction · 0.36
TEST_FFunction · 0.36
TEST_PFunction · 0.36