From: Hyunjun Ko Date: Tue, 19 Nov 2019 07:20:10 +0000 (+0000) Subject: freedreno/ir3: enable nir_opt_loop_unroll on a6xx X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1ee2ad584c95233b5cdbbed9fa5997533dc80276;p=mesa.git freedreno/ir3: enable nir_opt_loop_unroll on a6xx If precision lowering happens at GLSL IR, loop_analysis at IR doesn't work as expected since it can't handle things like: "(expression bool < (expression float16_t f2fmp (var_ref ndx) ) (constant float16_t (1.000000)) )" So we'd rather do this optimization at the NIR stage. Reviewed-by: Alyssa Rosenzweig Reviewed-by: Kristian H. Kristensen Part-of: --- diff --git a/src/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c index b6b37d05206..284d634884d 100644 --- a/src/freedreno/ir3/ir3_nir.c +++ b/src/freedreno/ir3/ir3_nir.c @@ -116,6 +116,7 @@ static const nir_shader_compiler_options options_a6xx = { .vectorize_io = true, .lower_to_scalar = true, .has_imul24 = true, + .max_unroll_iterations = 32, }; const nir_shader_compiler_options * @@ -207,7 +208,6 @@ ir3_optimize_loop(nir_shader *s) progress |= OPT(s, nir_opt_if, false); progress |= OPT(s, nir_opt_remove_phis); progress |= OPT(s, nir_opt_undef); - } while (progress); }