summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-04-08 15:43:46 -0700
committerKenneth Graunke <[email protected]>2014-04-11 17:41:37 -0700
commitda22221aa365923e033a65c1fbe19ed27301d000 (patch)
tree8a5ebb22586a159dd16b6b5ce9dc582ed9ca5fc0 /src/glsl/glsl_parser_extras.cpp
parentf00a6483e997e8377b62940e6cbe8f750272e3e9 (diff)
glsl: Drop do_common_optimization's max_unroll_iterations parameter.
Now that we pass in gl_shader_compiler_options, it makes sense to just use options->MaxUnrollIterations, rather than passing a separate parameter. Half of the invocations already passed options->MaxUnrollIterations, while the other half passed in a hardcoded value of 32. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r--src/glsl/glsl_parser_extras.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index a42f3d23df0..1fcd5f8ca0a 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -1444,7 +1444,7 @@ _mesa_glsl_compile_shader(struct gl_context *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, false, 32, options,
+ while (do_common_optimization(shader->ir, false, false, options,
ctx->Const.NativeIntegers))
;
@@ -1492,7 +1492,6 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
bool
do_common_optimization(exec_list *ir, bool linked,
bool uniform_locations_assigned,
- unsigned max_unroll_iterations,
const struct gl_shader_compiler_options *options,
bool native_integers)
{
@@ -1543,7 +1542,7 @@ do_common_optimization(exec_list *ir, bool linked,
loop_state *ls = analyze_loop_variables(ir);
if (ls->loop_found) {
progress = set_loop_controls(ir, ls) || progress;
- progress = unroll_loops(ir, ls, max_unroll_iterations) || progress;
+ progress = unroll_loops(ir, ls, options->MaxUnrollIterations) || progress;
}
delete ls;