aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-09-07 12:04:57 -0700
committerEric Anholt <[email protected]>2011-09-08 20:20:49 -0700
commit60df737ad57c20701b66d7cd3f63d1dc75745986 (patch)
treec79ef73f135d828c66efd18cf940263126ef1e55 /src/glsl/glsl_parser_extras.cpp
parent525cec98a5c65c27c62fed0cff706bca50bf8c6e (diff)
glsl: Don't do structure splitting until link time.
We were splitting on each side of an unlinked program, and the two sides lost track of which variables they referenced, resulting in assertion failure during validation. Fixes piglit link-struct-uniform-usage. Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r--src/glsl/glsl_parser_extras.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 8f740e6a8e9..8faddc578d4 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -891,8 +891,8 @@ do_common_optimization(exec_list *ir, bool linked, unsigned max_unroll_iteration
if (linked) {
progress = do_function_inlining(ir) || progress;
progress = do_dead_functions(ir) || progress;
+ progress = do_structure_splitting(ir) || progress;
}
- progress = do_structure_splitting(ir) || progress;
progress = do_if_simplification(ir) || progress;
progress = do_discard_simplification(ir) || progress;
progress = do_copy_propagation(ir) || progress;