summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2019-09-05 13:57:11 +0200
committerDylan Baker <dylan@pnwbakers.com>2019-09-05 08:44:57 -0700
commit95145376d188dbf609091b667e2d4ff8049ce16e (patch)
tree52b6a08863f166c800cde096701e78e27b9121f6
parent3ef013f0e986652bedbe7b2b8f9904113c866105 (diff)
downloadmesa-95145376d188dbf609091b667e2d4ff8049ce16e.tar.gz
radv: Call nir_propagate_invariant()
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> (cherry picked from commit 3f5b541fc8b2aae6e71783b7a9bb8eb2ffa3a74d)
-rw-r--r--src/amd/vulkan/radv_shader.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 9397c5d6f40..41bc73a882f 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -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);