| 332 | } |
| 333 | |
| 334 | std::string finalize_code() const override |
| 335 | { |
| 336 | std::string code = finalize_preamble(); |
| 337 | |
| 338 | // Add global definitions (struct types, global variables, sampler state declarations, ...) |
| 339 | code += _blocks.at(0); |
| 340 | |
| 341 | // Add texture and sampler definitions |
| 342 | for (const sampler &info : _module.samplers) |
| 343 | code += _blocks.at(info.id); |
| 344 | |
| 345 | // Add storage definitions |
| 346 | for (const storage &info : _module.storages) |
| 347 | code += _blocks.at(info.id); |
| 348 | |
| 349 | // Add function definitions |
| 350 | for (const std::unique_ptr<function> &func : _functions) |
| 351 | code += _blocks.at(func->id); |
| 352 | |
| 353 | return code; |
| 354 | } |
| 355 | bool assemble_code_for_entry_point(const std::string &entry_point_name, std::string &code, std::string &, std::string &) const override |
| 356 | { |
| 357 | const function *const entry_point = find_function(entry_point_name); |
nothing calls this directly
no test coverage detected