diff options
author | Connor Abbott <[email protected]> | 2019-07-27 19:38:53 +0200 |
---|---|---|
committer | Connor Abbott <[email protected]> | 2019-07-28 23:38:31 +0200 |
commit | af95f80a24360ee30cffb35e386e93e94946204e (patch) | |
tree | 3602288b712db4cd0e56aea50b07e402126204fd /src/gallium | |
parent | d26d8c5617491bb9ade6db77dd9cb3a1c594ec2e (diff) |
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 <[email protected]>
Reviewed-by: Qiang Yu <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/lima/lima_program.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/lima/lima_program.c b/src/gallium/drivers/lima/lima_program.c index 61889d02ddf..c99b8cbf14e 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); |