radeonsi: call nir_io_add_const_offset_to_base only once per shader

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6890>
This commit is contained in:
Samuel Pitoiset 2020-09-28 13:14:29 +02:00 committed by Marge Bot
parent a0e35c7562
commit 1a19fae868
1 changed files with 2 additions and 2 deletions

View File

@ -614,8 +614,8 @@ static void si_lower_io(struct nir_shader *nir)
/* This pass needs actual constants */
NIR_PASS_V(nir, nir_opt_constant_folding);
NIR_PASS_V(nir, nir_io_add_const_offset_to_base, nir_var_shader_in);
NIR_PASS_V(nir, nir_io_add_const_offset_to_base, nir_var_shader_out);
NIR_PASS_V(nir, nir_io_add_const_offset_to_base, nir_var_shader_in |
nir_var_shader_out);
/* Remove dead derefs, so that nir_validate doesn't fail. */
NIR_PASS_V(nir, nir_opt_dce);