if(!compiled)
throw invalid_operation("Compiler::get_combined_spirv");
SpirVGenerator gen;
- gen.apply(*module);
+ gen.apply(*module, features);
return gen.get_code();
}
return module->source_map;
}
-string Compiler::get_stage_debug(Stage::Type stage_type) const
+string Compiler::get_stage_debug(Stage::Type stage_type, bool use_colors) const
{
auto i = find_member(module->stages, stage_type, &Stage::type);
if(i!=module->stages.end())
- return DumpTree().apply(*i);
+ return DumpTree(use_colors).apply(*i);
throw key_error(Stage::get_stage_name(stage_type));
}
{
if(ConstantFolder().apply(stage))
resolve(stage, RESOLVE_EXPRESSIONS);
- ConstantConditionEliminator().apply(stage);
+ if(ConstantConditionEliminator().apply(stage))
+ resolve(stage, RESOLVE_VARIABLES);
bool any_inlined = false;
if(FunctionInliner().apply(stage))