radv: Call nir_propagate_invariant()
authorConnor Abbott <cwabbott0@gmail.com>
Thu, 5 Sep 2019 11:57:11 +0000 (13:57 +0200)
committerConnor Abbott <cwabbott0@gmail.com>
Thu, 5 Sep 2019 12:05:46 +0000 (14:05 +0200)
Without this, invariant qualifiers don't do anything. Together with a
fix to the game, this fixes flickering in No Man's Sky.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_shader.c

index 729aaba..1ab64a6 100644 (file)
@@ -389,6 +389,8 @@ radv_shader_compile_to_nir(struct radv_device *device,
                NIR_PASS_V(nir, nir_remove_dead_variables,
                           nir_var_shader_in | nir_var_shader_out | nir_var_system_value);
 
+               NIR_PASS_V(nir, nir_propagate_invariant);
+
                NIR_PASS_V(nir, nir_lower_system_values);
                NIR_PASS_V(nir, nir_lower_clip_cull_distance_arrays);
                NIR_PASS_V(nir, radv_nir_lower_ycbcr_textures, layout);