+
+ if(var.interface=="uniform")
+ {
+ const TypeDeclaration *type = var.type_declaration;
+ while(const BasicTypeDeclaration *basic = dynamic_cast<const BasicTypeDeclaration *>(type))
+ type = basic->base_type;
+ if(dynamic_cast<const ImageTypeDeclaration *>(type))
+ {
+ int bind_point = (var.layout ? get_layout_value(*var.layout, "binding") : -1);
+ if(bind_point>=0)
+ {
+ used_bindings[0].insert(bind_point);
+ uniforms[var.name].bind_point = bind_point;
+ }
+ else
+ unbound_textures.push_back(&var);
+ }
+ }
+}
+
+void LocationAllocator::visit(InterfaceBlock &iface)
+{
+ if(!iface.instance_name.compare(0, 3, "gl_"))
+ return;
+
+ if(iface.interface=="uniform")
+ {
+ int bind_point = (iface.layout ? get_layout_value(*iface.layout, "binding") : -1);
+
+ if(bind_point>=0)
+ {
+ used_bindings[0].insert(bind_point);
+ uniforms[iface.block_name].bind_point = bind_point;
+ }
+ else
+ unbound_blocks.push_back(&iface);
+ }