diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-07-15 13:11:08 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-07-15 13:29:25 -0600 |
commit | bc4b1ca5636e68a6e6b0e3f88e9ff6b888837656 (patch) | |
tree | 7a2b47cb75dcb971c16ab6c5d575c97e1f393d66 /src/mesa | |
parent | f9c574d7192d2193ff3e12629a8db1a74b6dbf55 (diff) |
mesa: improved printing
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/shader/slang/slang_print.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c index f08c25ffdc..bb0da9e34d 100644 --- a/src/mesa/shader/slang/slang_print.c +++ b/src/mesa/shader/slang/slang_print.c @@ -156,7 +156,7 @@ print_variable(const slang_variable *v, int indent) spaces(indent); printf("VAR "); print_type(&v->type); - printf(" %s", (char *) v->a_name); + printf(" %s (at %p)", (char *) v->a_name, (void *) v); if (v->initializer) { printf(" :=\n"); slang_print_tree(v->initializer, indent + 3); @@ -171,10 +171,12 @@ static void print_binary(const slang_operation *op, const char *oper, int indent) { assert(op->num_children == 2); +#if 0 printf("binary at %p locals=%p outer=%p\n", (void *) op, (void *) op->locals, (void *) op->locals->outer_scope); +#endif slang_print_tree(&op->children[0], indent + 3); spaces(indent); printf("%s at %p locals=%p outer=%p\n", @@ -260,9 +262,14 @@ slang_print_tree(const slang_operation *op, int indent) case SLANG_OPER_BLOCK_NEW_SCOPE: spaces(indent); - printf("{{ // new scope locals=%p: ", (void*)op->locals); - for (i = 0; i < op->locals->num_variables; i++) { - printf("%s ", (char *) op->locals->variables[i]->a_name); + printf("{{ // new scope locals=%p outer=%p: ", + (void *) op->locals, + (void *) op->locals->outer_scope); + { + int i; + for (i = 0; i < op->locals->num_variables; i++) { + printf("%s ", (char *) op->locals->variables[i]->a_name); + } } printf("\n"); print_generic(op, NULL, indent+3); @@ -669,8 +676,8 @@ slang_print_function(const slang_function *f, GLboolean body) return; #endif - printf("FUNCTION %s (\n", - (char *) f->header.a_name); + printf("FUNCTION %s ( scope=%p\n", + (char *) f->header.a_name, (void *) f->parameters); for (i = 0; i < f->param_count; i++) { print_variable(f->parameters->variables[i], 3); |