X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fdebug.cpp;h=a090c3622079bd9bfeedf2fc517a276d7877d463;hb=08d3b5a55fad7439b47fc93d8ba604cbeb7e19ca;hp=ef7e81f68af289943e7348a81edc8eb407637cf6;hpb=0585e361d8714ac4efc3ae3e1d5c8c9aa8841c34;p=libs%2Fgl.git diff --git a/source/glsl/debug.cpp b/source/glsl/debug.cpp index ef7e81f6..a090c362 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:"; @@ -364,8 +355,14 @@ void DumpTree::visit(ImageTypeDeclaration &type) branches.emplace_back(format("Dimensions: %s%s", dims[type.dimensions-1], (type.array ? " array" : ""))); if(type.base_type) branches.emplace_back(format("Element type: %s %s", get_label(*type.base_type), format_type(type.base_type->name))); + if(!type.format.empty()) + branches.emplace_back(format("Texel format: %s", type.format)); + if(type.sampled) + branches.emplace_back("Sampled"); if(type.shadow) branches.emplace_back("Shadow"); + if(type.multisample) + branches.emplace_back("Multisample"); append_subtree(branches); } @@ -373,6 +370,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 +401,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 +417,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));