X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fglsl%2Fresolve.cpp;h=8bfe635ee73b8d2f3c0dd1bd9dd7414313117263;hb=3773733011653d67e47768cf031e95f8f68cf714;hp=02f224d66b4453d2469a2638e0ab0453d2cd6c4a;hpb=180698dbb41d312128c496721f1207c6688fe350;p=libs%2Fgl.git diff --git a/source/glsl/resolve.cpp b/source/glsl/resolve.cpp index 02f224d6..8bfe635e 100644 --- a/source/glsl/resolve.cpp +++ b/source/glsl/resolve.cpp @@ -225,7 +225,7 @@ void VariableResolver::visit(VariableReference &var) if(!declaration) { const map &blocks = stage->interface_blocks; - map::const_iterator i = blocks.find("_"+var.name); + map::const_iterator i = blocks.find(var.name); if(i!=blocks.end()) { /* The name refers to an interface block with an instance name rather @@ -259,7 +259,7 @@ void VariableResolver::visit(VariableReference &var) void VariableResolver::visit(InterfaceBlockReference &iface) { - map::iterator i = stage->interface_blocks.find("_"+iface.name); + map::iterator i = stage->interface_blocks.find(iface.name); InterfaceBlock *declaration = (i!=stage->interface_blocks.end() ? i->second : 0); r_any_resolved |= (declaration!=iface.declaration); iface.declaration = declaration; @@ -430,9 +430,9 @@ void VariableResolver::visit(InterfaceBlock &iface) { /* Block names can be reused in different interfaces. Prefix the name with the first character of the interface to avoid conflicts. */ - stage->interface_blocks.insert(make_pair(iface.interface+iface.block_name, &iface)); + stage->interface_blocks.insert(make_pair(format("%s %s", iface.interface, iface.block_name), &iface)); if(!iface.instance_name.empty()) - stage->interface_blocks.insert(make_pair("_"+iface.instance_name, &iface)); + stage->interface_blocks.insert(make_pair(iface.instance_name, &iface)); TraversingVisitor::visit(iface); }