X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fdebug.cpp;h=6bf6eef9feb818276d6863262fa0bb71c3a797a4;hb=5f951824063db724807ea939ec10c75c3e4a1070;hp=4de8ac90ad927ed05175923827a25895ab176d71;hpb=90c3973fcadf28e25797656154e42dd3d2915144;p=libs%2Fgl.git diff --git a/source/glsl/debug.cpp b/source/glsl/debug.cpp index 4de8ac90..6bf6eef9 100644 --- a/source/glsl/debug.cpp +++ b/source/glsl/debug.cpp @@ -127,7 +127,11 @@ void DumpTree::visit(VariableReference &var) void DumpTree::visit(MemberAccess &memacc) { - annotated_branch(format("Member access: .%s", memacc.member), *memacc.left); + string text = "Member access:"; + if(memacc.declaration) + text += format(" %%%d", get_label(*memacc.declaration)); + text += format(" .%s", memacc.member); + annotated_branch(text, *memacc.left); } void DumpTree::visit(UnaryExpression &unary) @@ -241,7 +245,12 @@ void DumpTree::visit(VariableDeclaration &var) if(!var.init_expression) last_branch(); if(var.array) - annotated_branch("Array []", *var.array_size); + { + if(var.array_size) + annotated_branch("Array []", *var.array_size); + else + append("Array []"); + } last_branch(); if(var.init_expression)