summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-11-01 15:55:14 -0600
committerBrian Paul <[email protected]>2008-11-01 16:02:56 -0600
commit58936b51af5806a5c260a30e961a37c77bdbdd17 (patch)
treea4e4d3c1c97cf1b56b0f38229885eda1b87a5a0c /src/mesa/shader
parent90cdb8a4de3cbbc7c87779f978be2f846cf7c07c (diff)
mesa: glsl tree print improvements
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/slang/slang_print.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c
index 4422f70159f..0840a0e2f6d 100644
--- a/src/mesa/shader/slang/slang_print.c
+++ b/src/mesa/shader/slang/slang_print.c
@@ -379,28 +379,43 @@ slang_print_tree(const slang_operation *op, int indent)
case SLANG_OPER_WHILE:
assert(op->num_children == 2);
spaces(indent);
+ printf("WHILE LOOP: locals = %p\n", op->locals);
+ indent += 3;
+ spaces(indent);
printf("WHILE cond:\n");
slang_print_tree(&op->children[0], indent + 3);
spaces(indent);
printf("WHILE body:\n");
slang_print_tree(&op->children[1], indent + 3);
+ indent -= 3;
+ spaces(indent);
+ printf("END WHILE LOOP\n");
break;
case SLANG_OPER_DO:
spaces(indent);
+ printf("DO LOOP: locals = %p\n", op->locals);
+ indent += 3;
+ spaces(indent);
printf("DO body:\n");
slang_print_tree(&op->children[0], indent + 3);
spaces(indent);
printf("DO cond:\n");
slang_print_tree(&op->children[1], indent + 3);
+ indent -= 3;
+ spaces(indent);
+ printf("END DO LOOP\n");
break;
case SLANG_OPER_FOR:
spaces(indent);
+ printf("FOR LOOP: locals = %p\n", op->locals);
+ indent += 3;
+ spaces(indent);
printf("FOR init:\n");
slang_print_tree(&op->children[0], indent + 3);
spaces(indent);
- printf("FOR while:\n");
+ printf("FOR condition:\n");
slang_print_tree(&op->children[1], indent + 3);
spaces(indent);
printf("FOR step:\n");
@@ -408,6 +423,7 @@ slang_print_tree(const slang_operation *op, int indent)
spaces(indent);
printf("FOR body:\n");
slang_print_tree(&op->children[3], indent + 3);
+ indent -= 3;
spaces(indent);
printf("ENDFOR\n");
/*