glsl: don't run loop passes if loop unrolling is disabled
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
ce3f453f01
commit
e27333a568
|
@ -2108,12 +2108,14 @@ do_common_optimization(exec_list *ir, bool linked,
|
|||
OPT(optimize_split_arrays, ir, linked);
|
||||
OPT(optimize_redundant_jumps, ir);
|
||||
|
||||
loop_state *ls = analyze_loop_variables(ir);
|
||||
if (ls->loop_found) {
|
||||
OPT(set_loop_controls, ir, ls);
|
||||
OPT(unroll_loops, ir, ls, options);
|
||||
if (options->MaxUnrollIterations) {
|
||||
loop_state *ls = analyze_loop_variables(ir);
|
||||
if (ls->loop_found) {
|
||||
OPT(set_loop_controls, ir, ls);
|
||||
OPT(unroll_loops, ir, ls, options);
|
||||
}
|
||||
delete ls;
|
||||
}
|
||||
delete ls;
|
||||
|
||||
#undef OPT
|
||||
|
||||
|
|
Loading…
Reference in New Issue