Mesa (glsl-continue-return): glsl: fix up scoping for parent/ children in slang_operation_copy()
Brian Paul
brianp at kemper.freedesktop.org
Wed Jun 24 23:04:04 UTC 2009
Module: Mesa
Branch: glsl-continue-return
Commit: d07924e6ac14afd0b9eebc0df5317953ae8a0d9d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d07924e6ac14afd0b9eebc0df5317953ae8a0d9d
Author: Brian Paul <brianp at vmware.com>
Date: Wed Jun 24 16:25:00 2009 -0600
glsl: fix up scoping for parent/children in slang_operation_copy()
This will need more testing, but no regressions seen so far.
---
src/mesa/shader/slang/slang_compile_operation.c | 9 +++++++++
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 48586c2..3e2bdbc 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;
More information about the mesa-commit
mailing list