]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/debug.cpp
Refactor interface management
[libs/gl.git] / source / glsl / debug.cpp
index 32eb0ec307a05db3904e2313f74008e0127a32c3..b3eabd75de3c2aacab570ef6531b4ba4ce556fa5 100644 (file)
@@ -12,10 +12,6 @@ const std::string &DumpTree::apply(Stage &stage)
 {
        formatted = format("Stage %s\n", Stage::get_stage_name(stage.type));
        tree.push_back(BRANCH);
-       for(map<string, VariableDeclaration *>::const_iterator i=stage.in_variables.begin(); i!=stage.in_variables.end(); ++i)
-               append(format("Input: %%%d %s %s", get_label(*i->second), i->second->type, i->first));
-       for(map<string, VariableDeclaration *>::const_iterator i=stage.out_variables.begin(); i!=stage.out_variables.end(); ++i)
-               append(format("Output: %%%d %s %s", get_label(*i->second), i->second->type, i->first));
        last_branch();
        stage.content.visit(*this);
        return formatted;
@@ -88,6 +84,9 @@ void DumpTree::visit(Block &block)
        for(std::map<string, VariableDeclaration *>::const_iterator i=block.variables.begin(); i!=block.variables.end(); ++i)
                append(format("Variable %%%d %s %s", get_label(*i->second), i->second->type, i->first));
 
+       for(std::set<InterfaceBlock *>::const_iterator i=block.interfaces.begin(); i!=block.interfaces.end(); ++i)
+               append(format("Interface %%%d %s %s", get_label(*i->second), i->second->interface, i->second->name));
+
        bool labeled_body = (!block.types.empty() || !block.variables.empty());
        if(labeled_body)
        {