X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fglsl%2Fdebug.cpp;h=60b7c2477cf093664f4fc2ac8bcfdb52f56fb5b1;hp=ef7e81f68af289943e7348a81edc8eb407637cf6;hb=03b2ea5c9c611cfa5f02afb49ed7e05743e691b4;hpb=4ecc965177df174ed2d26cfedf24665c8879acda diff --git a/source/glsl/debug.cpp b/source/glsl/debug.cpp index ef7e81f6..60b7c247 100644 --- a/source/glsl/debug.cpp +++ b/source/glsl/debug.cpp @@ -183,19 +183,10 @@ void DumpTree::visit(VariableReference &var) string text; if(var.declaration) text += format("%s ", get_label(*var.declaration)); - text += format("%s (var) -> %s", format_name(var.name), format_type(var.type)); + text += format("%s -> %s", format_name(var.name), format_type(var.type)); append(var, text); } -void DumpTree::visit(InterfaceBlockReference &iface) -{ - string text; - if(iface.declaration) - text += format("%s ", get_label(*iface.declaration)); - text += format("%s (iface) -> %s", format_name(iface.name), format_type(iface.type)); - append(iface, text); -} - void DumpTree::visit(MemberAccess &memacc) { string text = "Member access:"; @@ -373,6 +364,8 @@ void DumpTree::visit(StructDeclaration &strct) { append(strct, format("%s struct %s", get_label(strct), strct.name)); vector branches; + if(!strct.block_name.empty()) + branches.emplace_back(format("Interface block: %s", format_name(strct.block_name))); if(strct.extended_alignment) branches.emplace_back("Extended alignment"); branches.emplace_back(&strct.members); @@ -402,6 +395,8 @@ void DumpTree::visit(VariableDeclaration &var) vector branches; if(var.type_declaration) branches.emplace_back(format("Type: %s %s", get_label(*var.type_declaration), format_type(var.type_declaration->name))); + if(var.block_declaration) + branches.emplace_back(format("Interface block: %s", format_name(var.block_declaration->block_name))); if(var.layout) branches.emplace_back(var.layout.get()); if(var.array) @@ -416,29 +411,6 @@ void DumpTree::visit(VariableDeclaration &var) append_subtree(branches); } -void DumpTree::visit(InterfaceBlock &iface) -{ - string head = format("%s %s %s", get_label(iface), iface.interface, format_name(iface.block_name)); - if(!iface.instance_name.empty()) - head += format(" %s", format_name(iface.instance_name)); - if(iface.array) - head += "[]"; - if(iface.source==BUILTIN_SOURCE) - head += " (builtin)"; - else if(iface.linked_block) - head += " (linked)"; - append(iface, head); - - vector branches; - if(iface.type_declaration) - branches.emplace_back(format("Type: %s %s", get_label(*iface.type_declaration), format_type(iface.type_declaration->name))); - if(iface.layout) - branches.emplace_back(iface.layout.get()); - if(iface.members) - branches.emplace_back(iface.members.get()); - append_subtree(branches); -} - void DumpTree::visit(FunctionDeclaration &func) { string text = format("%s %s %s%s", get_label(func), format_type(func.return_type), format_name(func.name), (func.signature.empty() ? "(?)" : func.signature));