radv: call nir_split_var_copies() before nir_lower_var_copies()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 23 May 2018 12:31:55 +0000 (14:31 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 24 May 2018 07:18:54 +0000 (09:18 +0200)
This doesn't nothing special currently because we don't create
any copy_var instructions, but this is needed for the next patch.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_shader.c

index 6ccbe81effaad7c1aed26c270eff4879a4d47d4e..7ed5d2a421ce55590e7a3a2be4b5a82fb729068b 100644 (file)
@@ -277,7 +277,10 @@ radv_shader_compile_to_nir(struct radv_device *device,
        nir_lower_tex(nir, &tex_options);
 
        nir_lower_vars_to_ssa(nir);
+
+       nir_split_var_copies(nir);
        nir_lower_var_copies(nir);
+
        nir_lower_global_vars_to_local(nir);
        nir_remove_dead_variables(nir, nir_var_local);
        nir_lower_subgroups(nir, &(struct nir_lower_subgroups_options) {