From e00b93a1f7b4bc7f5e887591c000524e13f80826 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Thu, 28 Nov 2013 08:13:41 -0800 Subject: 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 Reviewed-by: Ian Romanick --- src/glsl/ir_clone.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/glsl/ir_clone.cpp') diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp index a66864a61d1..383627ae3e2 100644 --- a/src/glsl/ir_clone.cpp +++ b/src/glsl/ir_clone.cpp @@ -158,21 +158,13 @@ ir_loop::clone(void *mem_ctx, struct hash_table *ht) const { ir_loop *new_loop = new(mem_ctx) ir_loop(); - if (this->from) - new_loop->from = this->from->clone(mem_ctx, ht); - if (this->to) - new_loop->to = this->to->clone(mem_ctx, ht); - if (this->increment) - new_loop->increment = this->increment->clone(mem_ctx, ht); - if (this->counter) - new_loop->counter = this->counter->clone(mem_ctx, ht); + new_loop->normative_bound = this->normative_bound; foreach_iter(exec_list_iterator, iter, this->body_instructions) { ir_instruction *ir = (ir_instruction *)iter.get(); new_loop->body_instructions.push_tail(ir->clone(mem_ctx, ht)); } - new_loop->cmp = this->cmp; return new_loop; } -- cgit v1.2.3