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