diff options
Diffstat (limited to 'src/glsl/loop_unroll.cpp')
-rw-r--r-- | src/glsl/loop_unroll.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/loop_unroll.cpp b/src/glsl/loop_unroll.cpp index e1009169370..9472bc5a510 100644 --- a/src/glsl/loop_unroll.cpp +++ b/src/glsl/loop_unroll.cpp @@ -236,14 +236,14 @@ loop_unroll_visitor::visit_leave(ir_loop *ir) return visit_continue; } - iterations = ls->max_iterations; - /* Don't try to unroll loops where the number of iterations is not known * at compile-time. */ - if (iterations < 0) + if (ir->normative_bound < 0) return visit_continue; + iterations = ir->normative_bound; + /* Don't try to unroll loops that have zillions of iterations either. */ if (iterations > (int) max_iterations) |