X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fdebug.cpp;h=2f243dc73dc0d25518ce341597749f4255f45d8a;hb=2280a09a286bbff2eb41783f8023863f320a3736;hp=2e8433f28287713ca215c0a33e0df669cd6b1f55;hpb=aa834c69698b5f0804a19fee4ec2e632a51e38c2;p=libs%2Fgl.git diff --git a/source/glsl/debug.cpp b/source/glsl/debug.cpp index 2e8433f2..2f243dc7 100644 --- a/source/glsl/debug.cpp +++ b/source/glsl/debug.cpp @@ -8,7 +8,7 @@ namespace Msp { namespace GL { namespace SL { -const std::string &DumpTree::apply(Stage &stage) +std::string DumpTree::apply(Stage &stage) { formatted = format("Stage: %s\n", Stage::get_stage_name(stage.type)); tree.push_back(BRANCH); @@ -17,15 +17,8 @@ const std::string &DumpTree::apply(Stage &stage) for(std::map::const_iterator i=stage.types.begin(); i!=stage.types.end(); ++i) append(format("Type: %%%d %s", get_label(*i->second), i->first)); - set seen_interfaces; for(std::map::const_iterator i=stage.interface_blocks.begin(); i!=stage.interface_blocks.end(); ++i) - if(seen_interfaces.insert(i->second).second) - { - string text = format("Interface block: %%%d %s %s", get_label(*i->second), i->second->interface, i->second->block_name); - if(!i->second->instance_name.empty()) - text += format(" %s", i->second->instance_name); - append(text); - } + append(format("Interface block: %%%d %s", get_label(*i->second), i->first)); for(std::map::const_iterator i=stage.functions.begin(); i!=stage.functions.end(); ++i) append(format("Function: %%%d %s", get_label(*i->second), i->first)); @@ -395,7 +388,7 @@ void DumpTree::visit(InterfaceBlock &iface) vector branches; if(iface.type_declaration) - append(format("Type: %%%d %s", get_label(*iface.type_declaration), iface.type_declaration->name)); + branches.push_back(format("Type: %%%d %s", get_label(*iface.type_declaration), iface.type_declaration->name)); if(iface.layout) branches.push_back(iface.layout.get()); if(iface.members)