summaryrefslogtreecommitdiff
path: root/src/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-09-05 22:29:58 +0200
committerIan Romanick <ian.d.romanick@intel.com>2010-09-08 20:36:37 -0700
commite591c4625cae63660c5000fbab366e40fe154ab0 (patch)
tree06b65ce727933c9bc7be208085c7400ed5b37f6f /src/glsl/glsl_parser_extras.cpp
parent6d3a2c97f4a78e85545286e0e126cd3a27bd1cbd (diff)
glsl: add several EmitNo* options, and MaxUnrollIterations
This increases the chance that GLSL programs will actually work. Note that continues and returns are not yet lowered, so linking will just fail if not supported. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r--src/glsl/glsl_parser_extras.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 3dbec5d52c..400203d261 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -685,7 +685,7 @@ ast_struct_specifier::ast_struct_specifier(char *identifier,
}
bool
-do_common_optimization(exec_list *ir, bool linked)
+do_common_optimization(exec_list *ir, bool linked, unsigned max_unroll_iterations)
{
GLboolean progress = GL_FALSE;
@@ -718,7 +718,7 @@ do_common_optimization(exec_list *ir, bool linked)
loop_state *ls = analyze_loop_variables(ir);
progress = set_loop_controls(ir, ls) || progress;
- progress = unroll_loops(ir, ls) || progress;
+ progress = unroll_loops(ir, ls, max_unroll_iterations) || progress;
delete ls;
return progress;