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:";
branches.emplace_back(format("Vector: %d", type.size));
else if(type.kind==BasicTypeDeclaration::MATRIX)
branches.emplace_back(format("Matrix: %dx%d", type.size&0xFFFF, type.size>>16));
+ if(type.extended_alignment)
+ branches.emplace_back("Extended alignment");
append_subtree(branches);
}
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);
}
void DumpTree::visit(StructDeclaration &strct)
{
append(strct, format("%s struct %s", get_label(strct), strct.name));
- append_subtree(strct.members);
+ vector<Branch> 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);
+ append_subtree(branches);
}
void DumpTree::visit(VariableDeclaration &var)
vector<Branch> 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)
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<Branch> 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));