MCPcopy Create free account
hub / github.com/crosire/reshade / finalize_code

Function finalize_code

source/effect_codegen_hlsl.cpp:334–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 2

finalize_preambleFunction · 0.85
atMethod · 0.80

Tested by

no test coverage detected