diff options
author | Brian Paul <[email protected]> | 2009-06-26 11:33:05 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-06-26 13:16:34 -0600 |
commit | 8e6dd8bf7991d8fc4938af692e5ce880ef139b4d (patch) | |
tree | d5583ba9921b768351ea4c6a592c15d3d3c9aabe /src/mesa/shader/slang/slang_print.c | |
parent | aa48becb829932f410ef93cf1bbf02e0386ea646 (diff) |
glsl: overhaul 'return' statement handling
A new node type (SLANG_OPER_RETURN_INLINED) is used to denote 'return'
statements inside inlined functions which need special handling.
All glean glsl1 tests pass for EmitContReturn=FALSE and TRUE.
Diffstat (limited to 'src/mesa/shader/slang/slang_print.c')
-rw-r--r-- | src/mesa/shader/slang/slang_print.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c index bf1475f91d9..98c7877534f 100644 --- a/src/mesa/shader/slang/slang_print.c +++ b/src/mesa/shader/slang/slang_print.c @@ -261,6 +261,7 @@ slang_print_tree(const slang_operation *op, int indent) break; case SLANG_OPER_BLOCK_NEW_SCOPE: + case SLANG_OPER_NON_INLINED_CALL: spaces(indent); printf("{{ // new scope locals=%p outer=%p: ", (void *) op->locals, @@ -348,6 +349,13 @@ slang_print_tree(const slang_operation *op, int indent) slang_print_tree(&op->children[0], indent + 3); break; + case SLANG_OPER_RETURN_INLINED: + spaces(indent); + printf("RETURN_INLINED\n"); + if (op->num_children > 0) + slang_print_tree(&op->children[0], indent + 3); + break; + case SLANG_OPER_LABEL: spaces(indent); printf("LABEL %s\n", (char *) op->a_id); @@ -478,7 +486,7 @@ slang_print_tree(const slang_operation *op, int indent) (void *) scope, (void *) op->locals, (void *) op->locals->outer_scope); - assert(scope); + /*assert(scope);*/ } } break; |