summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-06-24 16:25:00 -0600
committerBrian Paul <[email protected]>2009-06-26 13:16:33 -0600
commit515513b40925ebd94502cf0511a414d8d4f52078 (patch)
tree80cb27e86fb8c82162f1f5c28e905df0c066bccb /src
parent09313043e7d5b91465846c9064b95871f9f03cc3 (diff)
glsl: fix up scoping for parent/children in slang_operation_copy()
This will need more testing, but no regressions seen so far.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/slang/slang_compile_operation.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c
index 48586c2d96d..3e2bdbc91ff 100644
--- a/src/mesa/shader/slang/slang_compile_operation.c
+++ b/src/mesa/shader/slang/slang_compile_operation.c
@@ -154,6 +154,15 @@ slang_operation_copy(slang_operation * x, const slang_operation * y)
return GL_FALSE;
}
}
+
+ /* update scoping for children */
+ for (i = 0; i < y->num_children; i++) {
+ if (y->children[i].locals &&
+ y->children[i].locals->outer_scope == y->locals) {
+ z.children[i].locals->outer_scope = z.locals;
+ }
+ }
+
#if 0
z.var = y->var;
z.fun = y->fun;