Mesa (master): radeonsi: call nir_io_add_const_offset_to_base only once per shader

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Sep 29 09:56:48 UTC 2020


Module: Mesa
Branch: master
Commit: 1a19fae8680467e89dfea25bef39b41b21908dc3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1a19fae8680467e89dfea25bef39b41b21908dc3

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Mon Sep 28 13:14:29 2020 +0200

radeonsi: call nir_io_add_const_offset_to_base only once per shader

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6890>

---

 src/gallium/drivers/radeonsi/si_shader_nir.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 2d6c6127345..0794e542a4c 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -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);



More information about the mesa-commit mailing list