diff options
author | Paul Berry <[email protected]> | 2013-11-29 00:52:11 -0800 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-12-09 10:55:09 -0800 |
commit | 088494aa032bf32db8b67f1fb07e5797603a473d (patch) | |
tree | 75118fb62d60fa288e77d0e14552e929e51de4b0 /src/glsl/ir_reader.cpp | |
parent | 7ea3baa64da061f86a50c41081a26e0c2859e99c (diff) |
glsl/loops: Get rid of lower_bounded_loops and ir_loop::normative_bound.
Now that loop_controls no longer creates normatively bound loops,
there is no need for ir_loop::normative_bound or the
lower_bounded_loops pass.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/ir_reader.cpp')
-rw-r--r-- | src/glsl/ir_reader.cpp | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp index 72ce684b69c..4afe2810139 100644 --- a/src/glsl/ir_reader.cpp +++ b/src/glsl/ir_reader.cpp @@ -488,34 +488,16 @@ ir_reader::read_if(s_expression *expr, ir_loop *loop_ctx) ir_loop * ir_reader::read_loop(s_expression *expr) { - s_expression *s_bound_expr, *s_body, *s_bound; + s_expression *s_body; - s_pattern loop_pat[] = { "loop", s_bound_expr, s_body }; - s_pattern no_bound_pat[] = { }; - s_pattern bound_pat[] = { s_bound }; + s_pattern loop_pat[] = { "loop", s_body }; if (!MATCH(expr, loop_pat)) { - ir_read_error(expr, "expected (loop <bound> <body>)"); + ir_read_error(expr, "expected (loop <body>)"); return NULL; } ir_loop *loop = new(mem_ctx) ir_loop; - if (MATCH(s_bound_expr, no_bound_pat)) { - loop->normative_bound = -1; - } else if (MATCH(s_bound_expr, bound_pat)) { - s_int *value = SX_AS_INT(s_bound); - if (value == NULL) { - ir_read_error(s_bound_expr, "malformed loop bound"); - delete loop; - return NULL; - } - loop->normative_bound = value->value(); - } else { - ir_read_error(s_bound_expr, "malformed loop bound"); - delete loop; - return NULL; - } - read_instructions(&loop->body_instructions, s_body, loop); if (state->error) { delete loop; |