shader: Add pools and rename files

This commit is contained in:
ReinUsesLisp
2021-02-05 23:11:23 -03:00
committed by ameerj
parent be94ee88d2
commit 16cb00c521
30 changed files with 255 additions and 108 deletions

View File

@ -56,6 +56,13 @@ int main() {
auto cfg{std::make_unique<Flow::CFG>(env, 0)};
// fmt::print(stdout, "{}\n", cfg->Dot());
Program program{env, *cfg};
fmt::print(stdout, "{}\n", DumpProgram(program));
auto inst_pool{std::make_unique<ObjectPool<IR::Inst>>()};
auto block_pool{std::make_unique<ObjectPool<IR::Block>>()};
for (int i = 0; i < 8192 * 4; ++i) {
void(inst_pool->Create(IR::Opcode::Void, 0));
}
IR::Program program{TranslateProgram(*inst_pool, *block_pool, env, *cfg)};
fmt::print(stdout, "{}\n", IR::DumpProgram(program));
}