}
}
else if(i->name=="offset")
- allowed = (variable && scope==INTERFACE_BLOCK);
+ allowed = (variable && scope==INTERFACE_BLOCK && iface_block->interface=="uniform");
+ else if(i->name=="align")
+ allowed = (scope==INTERFACE_BLOCK && iface_block->interface=="uniform");
else if(i->name=="points")
{
allowed = (stage->type==Stage::GEOMETRY && iface_layout && (iface_layout->interface=="in" || iface_layout->interface=="out"));
{
if(scope==STRUCT || scope==INTERFACE_BLOCK)
error(var, format("Constant qualifier not allowed on %s", descr));
+ if(!var.init_expression)
+ error(var, "Constant variable must have an initializer");
}
if(!var.interpolation.empty() || !var.sampling.empty())