aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/program
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-09-05 22:29:58 +0200
committerIan Romanick <[email protected]>2010-09-08 20:36:37 -0700
commite591c4625cae63660c5000fbab366e40fe154ab0 (patch)
tree06b65ce727933c9bc7be208085c7400ed5b37f6f /src/mesa/program
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 <[email protected]>
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/ir_to_mesa.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index b3641032fb0..caa906abfad 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2719,7 +2719,7 @@ _mesa_ir_link_shader(GLcontext *ctx, struct gl_shader_program *prog)
do_div_to_mul_rcp(ir);
do_explog_to_explog2(ir);
- progress = do_common_optimization(ir, true) || progress;
+ progress = do_common_optimization(ir, true, options->MaxUnrollIterations) || progress;
if (options->EmitNoIfs)
progress = do_if_to_cond_assign(ir) || progress;
@@ -2799,7 +2799,7 @@ _mesa_glsl_compile_shader(GLcontext *ctx, struct gl_shader *shader)
/* Do some optimization at compile time to reduce shader IR size
* and reduce later work if the same shader is linked multiple times
*/
- while (do_common_optimization(shader->ir, false))
+ while (do_common_optimization(shader->ir, false, 32))
;
validate_ir_tree(shader->ir);