Mesa (main): radv: stop running copy-propagation before nir_opt_deref

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 24 16:43:31 UTC 2021


Module: Mesa
Branch: main
Commit: 26d2e22eea6391f17d4ca19861ae5d210c9fab62
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=26d2e22eea6391f17d4ca19861ae5d210c9fab62

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Tue Nov 23 13:36:43 2021 +0000

radv: stop running copy-propagation before nir_opt_deref

spirv_to_nir() now does this.

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13924>

---

 src/amd/vulkan/radv_shader.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index f4ea6265c47..e55dd7693c3 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -546,8 +546,8 @@ radv_shader_compile_to_nir(struct radv_device *device, struct vk_shader_module *
        */
       NIR_PASS_V(nir, nir_lower_variable_initializers, nir_var_function_temp);
       NIR_PASS_V(nir, nir_lower_returns);
-      NIR_PASS_V(nir, nir_inline_functions);
-      NIR_PASS_V(nir, nir_copy_prop);
+      if (nir_inline_functions(nir))
+         NIR_PASS_V(nir, nir_copy_prop);
       NIR_PASS_V(nir, nir_opt_deref);
 
       /* Pick off the single entrypoint that we want */



More information about the mesa-commit mailing list