From: Connor Abbott Date: Sat, 27 Jul 2019 17:38:53 +0000 (+0200) Subject: lima/gp: Clean up lima_program_optimize_vs_nir() a little X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af95f80a24360ee30cffb35e386e93e94946204e;p=platform%2Fupstream%2Fmesa.git lima/gp: Clean up lima_program_optimize_vs_nir() a little Remove an unnecessary nir_lower_regs_to_ssa as that should be done by the state tracker, and add a missing DCE pass after running copy propagation in order to remove the dead copies. This shouldn't fix anything but the second part will reduce shader sizes. Signed-off-by: Connor Abbott Reviewed-by: Qiang Yu --- diff --git a/src/gallium/drivers/lima/lima_program.c b/src/gallium/drivers/lima/lima_program.c index 61889d0..c99b8cb 100644 --- a/src/gallium/drivers/lima/lima_program.c +++ b/src/gallium/drivers/lima/lima_program.c @@ -94,7 +94,6 @@ lima_program_optimize_vs_nir(struct nir_shader *s) NIR_PASS_V(s, nir_lower_viewport_transform); NIR_PASS_V(s, nir_lower_io, nir_var_all, type_size, 0); - NIR_PASS_V(s, nir_lower_regs_to_ssa); NIR_PASS_V(s, nir_lower_load_const_to_scalar); NIR_PASS_V(s, lima_nir_lower_uniform_to_scalar); NIR_PASS_V(s, nir_lower_io_to_scalar, @@ -124,6 +123,7 @@ lima_program_optimize_vs_nir(struct nir_shader *s) NIR_PASS_V(s, nir_lower_int_to_float); NIR_PASS_V(s, nir_lower_bool_to_float); NIR_PASS_V(s, nir_copy_prop); + NIR_PASS_V(s, nir_opt_dce); NIR_PASS_V(s, nir_lower_locals_to_regs); NIR_PASS_V(s, nir_convert_from_ssa, true); NIR_PASS_V(s, nir_remove_dead_variables, nir_var_function_temp);