for(list<Stage>::iterator i=module->stages.begin(); i!=module->stages.end(); ++i)
generate(*i);
ConstantIdAssigner().apply(*module, features);
for(list<Stage>::iterator i=module->stages.begin(); i!=module->stages.end(); ++i)
generate(*i);
ConstantIdAssigner().apply(*module, features);
{
for(list<Stage>::iterator i=module->stages.begin(); i!=module->stages.end(); ++i)
ConstantSpecializer().apply(*i, spec_values);
{
for(list<Stage>::iterator i=module->stages.begin(); i!=module->stages.end(); ++i)
ConstantSpecializer().apply(*i, spec_values);
IdentifierValidator().apply(stage);
ReferenceValidator().apply(stage);
ExpressionValidator().apply(stage);
IdentifierValidator().apply(stage);
ReferenceValidator().apply(stage);
ExpressionValidator().apply(stage);
any_removed |= UnusedFunctionRemover().apply(stage);
any_removed |= UnusedTypeRemover().apply(stage);
any_removed |= UnusedFunctionRemover().apply(stage);
any_removed |= UnusedTypeRemover().apply(stage);
resolve(stage, RESOLVE_VARIABLES|RESOLVE_FUNCTIONS);
PrecisionConverter().apply(stage);
}
resolve(stage, RESOLVE_VARIABLES|RESOLVE_FUNCTIONS);
PrecisionConverter().apply(stage);
}
// Collect bindings from all stages into the shared stage's maps
module->shared.texture_bindings.insert(stage.texture_bindings.begin(), stage.texture_bindings.end());
// Collect bindings from all stages into the shared stage's maps
module->shared.texture_bindings.insert(stage.texture_bindings.begin(), stage.texture_bindings.end());