- allowed = (scope==GLOBAL && dynamic_cast<ImageTypeDeclaration *>(type));
- err_descr = "variable of non-opaque type";
+ bool uniform = (variable->interface=="uniform");
+ allowed = (scope==GLOBAL && uniform && dynamic_cast<ImageTypeDeclaration *>(type));
+ err_descr = (uniform ? "variable of non-opaque type" : "non-uniform variable");