summaryrefslogtreecommitdiffstats
path: root/src/glsl/loop_unroll.cpp
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2013-11-29 00:11:12 -0800
committerPaul Berry <stereotype441@gmail.com>2013-12-09 10:55:03 -0800
commit4d844cfa56220b7de8ca676ad222d89f81c60c09 (patch)
tree0b5fa5d797cccbc63f94a7add09549b7d1d2f2a5 /src/glsl/loop_unroll.cpp
parente734c9f677ef3e9e2e4f207e4e794651ea6643b4 (diff)
downloadexternal_mesa3d-4d844cfa56220b7de8ca676ad222d89f81c60c09.zip
external_mesa3d-4d844cfa56220b7de8ca676ad222d89f81c60c09.tar.gz
external_mesa3d-4d844cfa56220b7de8ca676ad222d89f81c60c09.tar.bz2
glsl/loops: Get rid of loop_variable_state::max_iterations.
This value is now redundant with loop_variable_state::limiting_terminator->iterations and ir_loop::normative_bound. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/glsl/loop_unroll.cpp')
-rw-r--r--src/glsl/loop_unroll.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/loop_unroll.cpp b/src/glsl/loop_unroll.cpp
index e100916..9472bc5 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)