summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_print_visitor.cpp
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2013-11-28 08:13:41 -0800
committerPaul Berry <stereotype441@gmail.com>2013-12-09 10:54:33 -0800
commite00b93a1f7b4bc7f5e887591c000524e13f80826 (patch)
tree4bfdfa0f56747019aed8c427fb3349adc1e53e7e /src/glsl/ir_print_visitor.cpp
parent2c17f97fe6a40e4a963fb4eec0ea0555f562b1be (diff)
downloadexternal_mesa3d-e00b93a1f7b4bc7f5e887591c000524e13f80826.zip
external_mesa3d-e00b93a1f7b4bc7f5e887591c000524e13f80826.tar.gz
external_mesa3d-e00b93a1f7b4bc7f5e887591c000524e13f80826.tar.bz2
glsl/loops: replace loop controls with a normative bound.
This patch replaces the ir_loop fields "from", "to", "increment", "counter", and "cmp" with a single integer ("normative_bound") that serves the same purpose. I've used the name "normative_bound" to emphasize the fact that the back-end is required to emit code to prevent the loop from running more than normative_bound times. (By contrast, an "informative" bound would be a bound that is informational only). Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/glsl/ir_print_visitor.cpp')
-rw-r--r--src/glsl/ir_print_visitor.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp
index f4109fb..857a27a 100644
--- a/src/glsl/ir_print_visitor.cpp
+++ b/src/glsl/ir_print_visitor.cpp
@@ -524,17 +524,8 @@ void
ir_print_visitor::visit(ir_loop *ir)
{
printf("(loop (");
- if (ir->counter != NULL)
- ir->counter->accept(this);
- printf(") (");
- if (ir->from != NULL)
- ir->from->accept(this);
- printf(") (");
- if (ir->to != NULL)
- ir->to->accept(this);
- printf(") (");
- if (ir->increment != NULL)
- ir->increment->accept(this);
+ if (ir->normative_bound >= 0)
+ printf("%d", ir->normative_bound);
printf(") (\n");
indentation++;